Change paginator, to make easy customization using pagination.tpl

This commit is contained in:
Ibnu Maksum
2024-03-26 14:39:28 +07:00
parent 36a24238ef
commit 0767c6ab23
35 changed files with 336 additions and 224 deletions

View File

@ -46,7 +46,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>

View File

@ -48,7 +48,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -228,7 +228,7 @@
{/if}
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>

View File

@ -16,7 +16,7 @@
<div class="panel-body">
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
<div class="col-md-8">
<form id="site-search" method="post" action="{$_url}customers/list/">
<form id="site-search" method="post" action="{$_url}customers/">
<div class="input-group">
<input type="text" id="search-input" name="search" value="{$search}"
class="form-control" placeholder="{Lang::T('Search')}...">
@ -90,7 +90,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -163,7 +163,7 @@
{/foreach}
</table>
</div>
&nbsp; {$paginator['contents']}
&nbsp; {include file="pagination.tpl"}
</div>
{/if}
</div>

View File

@ -85,7 +85,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>

View File

@ -53,7 +53,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -50,7 +50,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

19
ui/ui/pagination.tpl Normal file
View File

@ -0,0 +1,19 @@
{if $paginator}
<nav aria-label="Page navigation pagination-sm">
<ul class="pagination">
<li {if empty($paginator['prev'])}class="disabled" {/if}>
<a href="{$paginator['url']}{$paginator['prev']}" aria-label="Previous">
<span aria-hidden="true">prev</span>
</a>
</li>
{foreach $paginator['pages'] as $page}
<li class="{if $paginator['page'] == $page}active{elseif $page == '...'}disabled{/if}"><a href="{$paginator['url']}{$page}">{$page}</a></li>
{/foreach}
<li {if $paginator['count']==$paginator['next']}class="disabled" {/if}>
<a href="{$paginator['url']}{$paginator['next']}" aria-label="Next">
<span aria-hidden="true">next</span>
</a>
</li>
</ul>
</nav>
{/if}

View File

@ -79,7 +79,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -61,7 +61,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -82,7 +82,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -64,7 +64,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -61,7 +61,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -51,7 +51,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
<div class="clearfix text-right total-sum mb10">
<h4 class="text-uppercase text-bold">{Lang::T('Total Income')}:</h4>

View File

@ -61,7 +61,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -34,7 +34,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -46,7 +46,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>

View File

@ -71,7 +71,7 @@
</tbody>
</table>
</div>
{$paginator['contents']}
{include file="pagination.tpl"}
</div>
</div>
</div>