Pagination added for admin area logs
This commit is contained in:
parent
b40f5d10ef
commit
3054f34f88
2 changed files with 10 additions and 2 deletions
|
@ -24,7 +24,11 @@ if (isset($_GET['type'])) {
|
|||
$type = $_GET['type'];
|
||||
$result_array['type'] = $type;
|
||||
}
|
||||
$result_array['limit'] = 20;
|
||||
if (isset($_GET['limit'])) {
|
||||
$result_array['limit'] = $_GET['limit'];
|
||||
} else {
|
||||
$result_array['limit'] = 20;
|
||||
}
|
||||
if(!$array['order'])
|
||||
$result_array['order'] = " DESC ";
|
||||
|
||||
|
|
|
@ -76,9 +76,13 @@
|
|||
</table>
|
||||
{$type = $smarty.get.type}
|
||||
{$nextPage = $smarty.get.page + 1}
|
||||
|
||||
{if $smarty.get.limit}
|
||||
{$limit = $smarty.get.limit}
|
||||
{/if}
|
||||
{if $type != ''}
|
||||
<a href="{$baseurl}/admin_area/action_logs.php?type={$type}&page={$nextPage}"><button class="col-md-5 btn btn-primary" id="fetch_more_logs" loadHit="1" loadType="{$type}" {if $total_logs < 1}disabled="disabled"{/if}>{if $total_logs < 1}End of results{else}Load More{/if}</button></a>
|
||||
{else}
|
||||
<a href="{$baseurl}/admin_area/action_logs.php?page={$nextPage}{if $limit > 1}&limit={$limit}{/if}"><button class="col-md-5 btn btn-primary" id="fetch_more_logs" loadHit="1" loadType="{$type}" {if $total_logs < 1}disabled="disabled"{/if}>{if $total_logs < 1}End of results{else}Load More{/if}</button></a>
|
||||
{/if}
|
||||
|
||||
<style type="text/css">
|
||||
|
|
Loading…
Add table
Reference in a new issue