90 lines
2.9 KiB
HTML
90 lines
2.9 KiB
HTML
#define pageSplite(currentPage, totalPage,totalRow,pageSize, link)
|
||
#if(totalPage <= 0 || currentPage > totalPage) #return #end
|
||
#setLocal(startPage = currentPage - 1)
|
||
#if(startPage < 1)
|
||
#setLocal(startPage = 1)
|
||
#end
|
||
#setLocal(endPage = currentPage + 3)
|
||
#if(endPage > totalPage)
|
||
#setLocal(endPage = totalPage)
|
||
#end
|
||
<div class="row-fluid">
|
||
<div class="span61" style="width: 33%">
|
||
<div>
|
||
#if(_locale=='zh_CN')
|
||
共有 <span class="">#(totalRow)</span> 条记录, 当前第 <span class=""> <span
|
||
id="currentPage"> #(currentPage) </span> /#(totalPage)
|
||
</span>页
|
||
#else
|
||
Total <span class="">#(totalRow)</span> Rows, Current <span class=""> <span
|
||
id="currentPage"> #(currentPage) </span> / #(totalPage)
|
||
</span> Pages
|
||
#end
|
||
</div>
|
||
</div>
|
||
<div class="span62" style="width: 33%; margin-top: -25px;margin-left:70px">
|
||
<div class="dataTables_paginate paging_bootstrap pagination" style="font-size:5px;">
|
||
<ul>
|
||
<li class="first" style='cursor: pointer'>
|
||
<a href="#(link)1-#(pageSize)">
|
||
<span class="hidden-480">|<</span>
|
||
</a>
|
||
</li>
|
||
<li class="prev" style='cursor: pointer'>
|
||
<a href="#(link)#(currentPage - 1)-#(pageSize)">
|
||
<span class="hidden-480"><</span>
|
||
</a>
|
||
</li>
|
||
#for(i : [startPage..endPage])
|
||
#if(currentPage == i)
|
||
<li class="active" style='cursor: pointer' id=''>
|
||
<a>#(i)</a>
|
||
</li>
|
||
#else
|
||
<li style='cursor: pointer' id=''>
|
||
<a href="#(link)#(i)-#(pageSize)">#(i)</a>
|
||
</li>
|
||
#end
|
||
#end
|
||
<li class="next" style='cursor: pointer'>
|
||
#if(currentPage!=totalPage)
|
||
<a href="#(link)#(currentPage + 1)-#(pageSize)">
|
||
<span class="hidden-480">></span>
|
||
</a>
|
||
#else
|
||
<a href="#(link)#(currentPage)-#(pageSize)">
|
||
<span class="hidden-480">></span>
|
||
</a>
|
||
#end
|
||
</li>
|
||
<li class="last" style='cursor: pointer'>
|
||
<a href="#(link)#(totalPage)-#(pageSize)">
|
||
<span class="hidden-480">>|</span>
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="span63" style="width: 18%; float: right;">
|
||
<div class="dataTables_length">
|
||
<input type="hidden" name="pageNo" id="pageNo" value="#(pageSize)" />
|
||
#if(_locale=='zh_CN')每页显示#end <select name="pageSize" style="width: 60px"
|
||
onchange="query(this,'#(link)')" id="newPageSize"
|
||
class="option2_1">
|
||
<option value="10" #(pageSize==10? "selected":"")>10</option>
|
||
<option value="20" #(pageSize==20? "selected":"")>20</option>
|
||
<option value="30" #(pageSize==30? "selected":"")>30</option>
|
||
<option value="50" #(pageSize==50? "selected":"")>50</option>
|
||
<option value="100" #(pageSize==100? "selected":"")>100</option>
|
||
<option value="200" #(pageSize==200? "selected":"")>200</option>
|
||
</select> #if(_locale=='zh_CN')条 #else Rows / Page #end
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
function query(obj, url) {
|
||
location.href = url + "1-" + $(obj).val();
|
||
}
|
||
</script>
|
||
#end
|