Add search function to member's document and comment list

This commit is contained in:
Kijin Sung 2019-09-13 18:11:49 +09:00
parent 180b6668db
commit 2238679527
12 changed files with 138 additions and 35 deletions

View file

@ -9,10 +9,16 @@
</a>
</li>
</ul>
<form class="search" action="{Context::getRequestUri()}" method="get" no-error-return-url="true">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="{$act}" />
<input type="search" name="search_keyword" value="{escape($search_keyword, false)}">
<button type="submit">{$lang->cmd_search}</button>
</form>
<div class="pn">
<a cond="$page != 1" href="{getUrl('page',$page-1,'module_srl','','document_srl','')}" class="prev">{$lang->cmd_prev}</a>
<strong>{$page} / {$page_navigation->last_page}</strong>
<a cond="$page != $page_navigation->last_page" href="{getUrl('page',$page+1,'module_srl','','document_srl','')}" class="next">{$lang->cmd_next}</a>
</div>
</div>
<include target="./common_footer.html" />
<include target="./common_footer.html" />

View file

@ -53,6 +53,11 @@
.lt .title em{font-size:12px;color:#333;color:#6352d2}
.lt .auth{display:block;font-size:12px}
.lt .auth .time{padding:0 5px;border-left:1px solid #bfbfbf}
/* Search */
.search { clear: both; text-align: center; padding: 4px 0; }
.search input[type=search] { font-size: 12px; line-height: 16px; padding: 3px; width: 160px; height: 24px; box-sizing: border-box; }
.search select { font-size: 12px; line-height: 16px; padding: 3px; height: 24px; box-sizing: border-box; }
.search button { font-size: 12px; line-height: 16px; padding: 3px 8px; height: 24px; box-sizing: border-box; }
/* Pagination */
.pn{font-size:12px;text-align:center;background:#f2f0ec;padding:15px 0;border-top:1px solid #fff}
.pn a{color:#333;text-decoration:none}
@ -100,4 +105,4 @@
}
.xm ul.mtab>li:first-child a span {
border-left: 0 none;
}
}

View file

@ -9,10 +9,21 @@
</a>
</li>
</ul>
<form class="search" action="{Context::getRequestUri()}" method="get" no-error-return-url="true">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="{$act}" />
<select name="search_target" title="{$lang->search_target}">
<option value="title" selected="selected"|cond="$search_target == 'title'">{$lang->title}</option>
<option value="title_content" selected="selected"|cond="$search_target == 'title_content'">{$lang->title_content}</option>
<option value="content" selected="selected"|cond="$search_target == 'content'">{$lang->content}</option>
</select>
<input type="search" name="search_keyword" value="{escape($search_keyword, false)}">
<button type="submit">{$lang->cmd_search}</button>
</form>
<div class="pn">
<a cond="$page != 1" href="{getUrl('page',$page-1,'module_srl','','document_srl','')}" class="prev">{$lang->cmd_prev}</a>
<strong>{$page} / {$page_navigation->last_page}</strong>
<a cond="$page != $page_navigation->last_page" href="{getUrl('page',$page+1,'module_srl','','document_srl','')}" class="next">{$lang->cmd_next}</a>
</div>
</div>
<include target="./common_footer.html" />
<include target="./common_footer.html" />