Allow adjusting the tx row limit
This commit is contained in:
parent
1d6cbd44a6
commit
1a5d216b7a
@ -10,18 +10,20 @@ if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
|
$iLimit = 30;
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
$aTransactions = $transaction->getAllTransactions(@$_REQUEST['start'], @$_REQUEST['filter'], 5);
|
$aTransactions = $transaction->getAllTransactions(@$_REQUEST['start'], @$_REQUEST['filter'], $iLimit);
|
||||||
$iCountTransactions = $transaction->getCountAllTransactions();
|
$iCountTransactions = $transaction->getCountAllTransactions();
|
||||||
$aTransactionTypes = $transaction->getTypes();
|
$aTransactionTypes = $transaction->getTypes();
|
||||||
if (!$aTransactions) $_SESSION['POPUP'][] = array('CONTENT' => 'Could not find any transaction', 'TYPE' => 'errormsg');
|
if (!$aTransactions) $_SESSION['POPUP'][] = array('CONTENT' => 'Could not find any transaction', 'TYPE' => 'errormsg');
|
||||||
|
$smarty->assign('LIMIT', $iLimit);
|
||||||
|
$smarty->assign('TRANSACTIONS', $aTransactions);
|
||||||
|
$smarty->assign('TRANSACTIONTYPES', $aTransactionTypes);
|
||||||
|
$smarty->assign('TXSTATUS', array('' => '', 'Confirmed' => 'Confirmed', 'Unconfirmed' => 'Unconfirmed', 'Orphan' => 'Orphan'));
|
||||||
|
$smarty->assign('COUNTTRANSACTIONS', $iCountTransactions);
|
||||||
} else {
|
} else {
|
||||||
$debug->append('Using cached page', 3);
|
$debug->append('Using cached page', 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
$smarty->assign('TRANSACTIONS', $aTransactions);
|
|
||||||
$smarty->assign('TRANSACTIONTYPES', $aTransactionTypes);
|
|
||||||
$smarty->assign('TXSTATUS', array('' => '', 'Confirmed' => 'Confirmed', 'Unconfirmed' => 'Unconfirmed', 'Orphan' => 'Orphan'));
|
|
||||||
$smarty->assign('COUNTTRANSACTIONS', $iCountTransactions);
|
|
||||||
$smarty->assign('CONTENT', 'default.tpl');
|
$smarty->assign('CONTENT', 'default.tpl');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="left">
|
<td class="left">
|
||||||
{if $COUNTTRANSACTIONS / 5 > 1}
|
{if $COUNTTRANSACTIONS / $LIMIT > 1}
|
||||||
{if $smarty.request.start > 0}
|
{if $smarty.request.start > 0}
|
||||||
<a href="{$smarty.server.PHP_SELF}?page=admin&action=transactions&start={$smarty.request.start|default:"0" - 5}"><img src="{$PATH}/images/prev.png" /></a>
|
<a href="{$smarty.server.PHP_SELF}?page=admin&action=transactions&start={$smarty.request.start|default:"0" - 5}"><img src="{$PATH}/images/prev.png" /></a>
|
||||||
{else}
|
{else}
|
||||||
@ -12,8 +12,8 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td class="right">
|
<td class="right">
|
||||||
{if $COUNTTRANSACTIONS / 5 > 1}
|
{if $COUNTTRANSACTIONS / $LIMIT > 1}
|
||||||
{if $COUNTTRANSACTIONS - $smarty.request.start - 5 > 0}
|
{if $COUNTTRANSACTIONS - $smarty.request.start - $LIMIT > 0}
|
||||||
<a href="{$smarty.server.PHP_SELF}?page=admin&action=transactions&start={$smarty.request.start|default:"0" + 5}"><img src="{$PATH}/images/next.png" /></a>
|
<a href="{$smarty.server.PHP_SELF}?page=admin&action=transactions&start={$smarty.request.start|default:"0" + 5}"><img src="{$PATH}/images/next.png" /></a>
|
||||||
{else}
|
{else}
|
||||||
<img src="{$PATH}/images/next.png" />
|
<img src="{$PATH}/images/next.png" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user