[ADDED] Invitation overview to admin dashboard

* Split up dashboard default template into subfiles
* Added new invitation overview
* Updated page file

Fixes #1357 once merged.
This commit is contained in:
Sebastian Grewe 2014-01-11 13:45:55 +01:00
parent 9a959164a6
commit 1485a02528
6 changed files with 134 additions and 89 deletions

View File

@ -46,6 +46,16 @@ $aUserInfo = array(
);
$smarty->assign('USER_INFO', $aUserInfo);
// Fetch invitation information
if (!$setting->getValue('disable_invitations')) {
$aInvitationInfo = array(
'total' => $invitation->getCount(),
'activated' => $invitation->getCountFiltered('is_activated', 1),
'outstanding' => $invitation->getCountFiltered('is_activated', 0)
);
$smarty->assign('INVITATION_INFO', $aInvitationInfo);
}
// Wallet status
$smarty->assign('WALLET_ERROR', $aGetInfo['errors']);

View File

@ -1,91 +1,6 @@
{nocache}
<article class="module width_quarter">
<header><h3>MPOS Version Information</h3></header>
<table width="25%" class="tablesorter" cellspacing="0">
<thead>
<tr>
<th>Component</th>
<th align="center">Current</th>
<th align="center">Installed</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>MPOS</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['CORE']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['CORE'] == $VERSION['CURRENT']['CORE']}green{else}red{/if}">{$VERSION['INSTALLED']['CORE']}</font>
</td>
</tr>
<tr>
<td><strong>Config</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['CONFIG']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['CONFIG'] == $VERSION['CURRENT']['CONFIG']}green{else}red{/if}">{$VERSION['INSTALLED']['CONFIG']}</font>
</td>
</tr>
<tr>
<td><strong>Database</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['DB']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['DB'] == $VERSION['CURRENT']['DB']}green{else}red{/if}">{$VERSION['INSTALLED']['DB']}</font>
</td>
</tr>
</tbody>
</table>
</article>
<article class="module width_quarter">
<header><h3>Users</h3></header>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="center">Total</th>
<th align="center">Active</th>
<th align="center">Locked</th>
<th align="center">Admins</th>
<th align="center">No Fees</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">{$USER_INFO.total}</td>
<td align="center">{$USER_INFO.active}</td>
<td align="center">{$USER_INFO.locked}</td>
<td align="center">{$USER_INFO.admins}</td>
<td align="center">{$USER_INFO.nofees}</td>
</tr>
</tbody>
</table>
</article>
<article class="module width_quarter">
<header><h3>MPOS Status</h3></header>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th colspan="2" align="center">Cronjobs</th>
<th align="center">Wallet</th>
</tr>
<tr>
<th align="center"><strong>Errors</strong></th>
<th align="center"><strong>Disabled</strong></th>
<th align="center"><strong>Errors</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">
<a href="{$smarty.server.PHP_SELF}?page=admin&action=monitoring">{if $CRON_ERROR == 0}None - OK{else}{$CRON_ERROR}{/if}</a>
</td>
<td align="center">
<a href="{$smarty.server.PHP_SELF}?page=admin&action=monitoring">{if $CRON_DISABLED == 0}None - OK{else}{$CRON_DISABLED}{/if}</a>
</td>
<td align="center">
<a href="{$smarty.server.PHP_SELF}?page=admin&action=wallet">{$WALLET_ERROR|default:"None - OK"}</a>
</td>
</tr>
</tbody>
</table>
</article>
{include file="admin/dashboard/version.tpl"}
{include file="admin/dashboard/users.tpl"}
{include file="admin/dashboard/status.tpl"}
{if $GLOBAL.config.disable_invitations|default:"0" == 0}{include file="admin/dashboard/invitations.tpl"}{/if}
{/nocache}

View File

@ -0,0 +1,21 @@
{nocache}
<article class="module width_quarter">
<header><h3>Invitations</h3></header>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="center">Total</th>
<th align="center">Activated</th>
<th align="center">Outstanding</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">{$INVITATION_INFO.total}</td>
<td align="center">{$INVITATION_INFO.activated}</td>
<td align="center">{$INVITATION_INFO.outstanding}</td>
</tr>
</tbody>
</table>
</article>
{/nocache}

View File

@ -0,0 +1,37 @@
{nocache}
<article class="module width_quarter">
<header><h3>MPOS Version Information</h3></header>
<table width="25%" class="tablesorter" cellspacing="0">
<thead>
<tr>
<th>Component</th>
<th align="center">Current</th>
<th align="center">Installed</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>MPOS</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['CORE']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['CORE'] == $VERSION['CURRENT']['CORE']}green{else}red{/if}">{$VERSION['INSTALLED']['CORE']}</font>
</td>
</tr>
<tr>
<td><strong>Config</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['CONFIG']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['CONFIG'] == $VERSION['CURRENT']['CONFIG']}green{else}red{/if}">{$VERSION['INSTALLED']['CONFIG']}</font>
</td>
</tr>
<tr>
<td><strong>Database</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['DB']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['DB'] == $VERSION['CURRENT']['DB']}green{else}red{/if}">{$VERSION['INSTALLED']['DB']}</font>
</td>
</tr>
</tbody>
</table>
</article>
{/nocache}

View File

@ -0,0 +1,25 @@
{nocache}
<article class="module width_quarter">
<header><h3>Users</h3></header>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="center">Total</th>
<th align="center">Active</th>
<th align="center">Locked</th>
<th align="center">Admins</th>
<th align="center">No Fees</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">{$USER_INFO.total}</td>
<td align="center">{$USER_INFO.active}</td>
<td align="center">{$USER_INFO.locked}</td>
<td align="center">{$USER_INFO.admins}</td>
<td align="center">{$USER_INFO.nofees}</td>
</tr>
</tbody>
</table>
</article>
{/nocache}

View File

@ -0,0 +1,37 @@
{nocache}
<article class="module width_quarter">
<header><h3>MPOS Version Information</h3></header>
<table width="25%" class="tablesorter" cellspacing="0">
<thead>
<tr>
<th>Component</th>
<th align="center">Current</th>
<th align="center">Installed</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>MPOS</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['CORE']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['CORE'] == $VERSION['CURRENT']['CORE']}green{else}red{/if}">{$VERSION['INSTALLED']['CORE']}</font>
</td>
</tr>
<tr>
<td><strong>Config</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['CONFIG']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['CONFIG'] == $VERSION['CURRENT']['CONFIG']}green{else}red{/if}">{$VERSION['INSTALLED']['CONFIG']}</font>
</td>
</tr>
<tr>
<td><strong>Database</strong></td>
<td align="center"><font color="green">{$VERSION['CURRENT']['DB']}</font></td>
<td align="center">
<font color="{if $VERSION['INSTALLED']['DB'] == $VERSION['CURRENT']['DB']}green{else}red{/if}">{$VERSION['INSTALLED']['DB']}</font>
</td>
</tr>
</tbody>
</table>
</article>
{/nocache}