// Pagination fix
This commit is contained in:
1 parent
07073afa1f
commit
7e9cdbb163
2 files changed
+8
-4
No files matched your search
@@ -56,7 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{if !$simple_header && $list_total > 20}
|
{if !$simple_header && $list_total > $pagination[0]}
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
{* Choose number of results per page *}
|
{* Choose number of results per page *}
|
||||||
<span class="pagination">
|
<span class="pagination">
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
/ {$list_total} {l s='result(s)'}
|
/ {$list_total} {l s='result(s)'}
|
||||||
<input type="hidden" id="pagination-items-page" name="{$table}_pagination" value="{$selected_pagination|intval}" />
|
<input type="hidden" id="pagination-items-page" name="{$list_id}_pagination" value="{$selected_pagination|intval}" />
|
||||||
</span>
|
</span>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('.pagination-items-page').on('click',function(e){
|
$('.pagination-items-page').on('click',function(e){
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('.pagination-link').on('click',function(e){
|
$('.pagination-link').on('click',function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$('#submitFilter'+'{$table}').val($(this).data("page")).closest("form").submit();
|
$('#submitFilter'+'{$list_id}').val($(this).data("page")).closest("form").submit();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -642,8 +642,12 @@ class HelperListCore extends Helper
|
|||||||
*/
|
*/
|
||||||
public function displayListFooter()
|
public function displayListFooter()
|
||||||
{
|
{
|
||||||
|
if (!isset($this->list_id))
|
||||||
|
$this->list_id = $this->table;
|
||||||
|
|
||||||
$this->footer_tpl->assign(array_merge($this->tpl_vars, array(
|
$this->footer_tpl->assign(array_merge($this->tpl_vars, array(
|
||||||
'current' => $this->currentIndex
|
'current' => $this->currentIndex,
|
||||||
|
'list_id' => $this->list_id
|
||||||
)));
|
)));
|
||||||
return $this->footer_tpl->fetch();
|
return $this->footer_tpl->fetch();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user