[ADDED] List last N transactions in Admin Wallet Info
* N default is 25 * Can be set via Admin System Settings -> Wallet
This commit is contained in:
parent
f428ca1d2e
commit
5ef89d759e
@ -146,6 +146,13 @@ $aSettings['wallet'][] = array(
|
||||
'name' => 'wallet_cold_coins', 'value' => $setting->getValue('wallet_cold_coins'),
|
||||
'tooltip' => 'Amount of coins held in a pools cold wallet.'
|
||||
);
|
||||
$aSettings['wallet'][] = array(
|
||||
'display' => 'Transaction Limit', 'type' => 'text',
|
||||
'size' => 6,
|
||||
'default' => 25,
|
||||
'name' => 'wallet_transaction_limit', 'value' => $setting->getValue('wallet_transaction_limit'),
|
||||
'tooltip' => 'Maximum amount of transactions to list in Admin Wallet Info.'
|
||||
);
|
||||
$aSettings['statistics'][] = array(
|
||||
'display' => 'Ajax Refresh Interval', 'type' => 'select',
|
||||
'options' => array('5' => '5', '10' => '10', '15' => '15', '30' => '30', '60' => '60' ),
|
||||
|
||||
@ -23,6 +23,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
|
||||
$aGetInfo = $bitcoin->getinfo();
|
||||
$aGetPeerInfo = $bitcoin->getpeerinfo();
|
||||
$aGetTransactions = $bitcoin->listtransactions('', (int)$setting->getValue('wallet_transaction_limit', 25));
|
||||
if (is_array($aGetInfo) && array_key_exists('newmint', $aGetInfo)) {
|
||||
$dNewmint = $aGetInfo['newmint'];
|
||||
} else {
|
||||
@ -34,6 +35,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$dAccountAddresses = array();
|
||||
$aGetInfo = array('errors' => 'Unable to connect');
|
||||
$aGetPeerInfo = array();
|
||||
$aGetTransactions = array();
|
||||
$dBalance = 0;
|
||||
$dNewmint = -1;
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'alert alert-danger');
|
||||
@ -50,6 +52,8 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
|
||||
// Cold wallet balance
|
||||
if (! $dColdCoins = $setting->getValue('wallet_cold_coins')) $dColdCoins = 0;
|
||||
|
||||
// Tempalte specifics
|
||||
$smarty->assign("UNCONFIRMED", $dBlocksUnconfirmedBalance);
|
||||
$smarty->assign("BALANCE", $dBalance);
|
||||
$smarty->assign("ADDRESSCOUNT", $dAddressCount);
|
||||
@ -60,8 +64,8 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$smarty->assign("NEWMINT", $dNewmint);
|
||||
$smarty->assign("COININFO", $aGetInfo);
|
||||
$smarty->assign("PEERINFO", $aGetPeerInfo);
|
||||
|
||||
// Tempalte specifics
|
||||
$smarty->assign('PRECISION', $coin->getCoinValuePrevision());
|
||||
$smarty->assign("TRANSACTIONS", $aGetTransactions);
|
||||
} else {
|
||||
$debug->append('Using cached page', 3);
|
||||
}
|
||||
|
||||
@ -2,5 +2,6 @@
|
||||
{include file="admin/wallet/balance.tpl"}
|
||||
{include file="admin/wallet/status.tpl"}
|
||||
{include file="admin/wallet/peers.tpl"}
|
||||
{include file="admin/wallet/transactions.tpl"}
|
||||
{include file="admin/wallet/accounts.tpl"}
|
||||
</div>
|
||||
|
||||
33
templates/bootstrap/admin/wallet/transactions.tpl
Normal file
33
templates/bootstrap/admin/wallet/transactions.tpl
Normal file
@ -0,0 +1,33 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-connectdevelop fa-fw"></i> Last {$TRANSACTIONS|count} transactions
|
||||
</div>
|
||||
<div class="panel-body no-padding">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
<th class="text-center">Address</th>
|
||||
<th class="text-center">Category</th>
|
||||
<th class="text-right">Amount</th>
|
||||
<th class="text-right">Confirmations</th>
|
||||
<th class="text-right">Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach key=KEY item=ARRAY from=$TRANSACTIONS}
|
||||
<tr>
|
||||
<td>{$ARRAY['account']|default:"Default"}</td>
|
||||
<td class="text-center">{$ARRAY['address']}</td>
|
||||
<td class="text-center">{$ARRAY['category']|capitalize}</td>
|
||||
<td class="text-right">{$ARRAY['amount']|number_format:"$PRECISION"}</td>
|
||||
<td class="text-right">{$ARRAY['confirmations']}</td>
|
||||
<td class="text-right">{$ARRAY['time']|date_format:$GLOBAL.config.date}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user