From 1485a0252879d10842481006f28d9d3d2df4b146 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 11 Jan 2014 13:45:55 +0100 Subject: [PATCH] [ADDED] Invitation overview to admin dashboard * Split up dashboard default template into subfiles * Added new invitation overview * Updated page file Fixes #1357 once merged. --- public/include/pages/admin/dashboard.inc.php | 10 ++ .../mpos/admin/dashboard/default.tpl | 93 +------------------ .../mpos/admin/dashboard/invitations.tpl | 21 +++++ .../templates/mpos/admin/dashboard/status.tpl | 37 ++++++++ .../templates/mpos/admin/dashboard/users.tpl | 25 +++++ .../mpos/admin/dashboard/version.tpl | 37 ++++++++ 6 files changed, 134 insertions(+), 89 deletions(-) create mode 100644 public/templates/mpos/admin/dashboard/invitations.tpl create mode 100644 public/templates/mpos/admin/dashboard/status.tpl create mode 100644 public/templates/mpos/admin/dashboard/users.tpl create mode 100644 public/templates/mpos/admin/dashboard/version.tpl diff --git a/public/include/pages/admin/dashboard.inc.php b/public/include/pages/admin/dashboard.inc.php index 12dcb984..35121969 100644 --- a/public/include/pages/admin/dashboard.inc.php +++ b/public/include/pages/admin/dashboard.inc.php @@ -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']); diff --git a/public/templates/mpos/admin/dashboard/default.tpl b/public/templates/mpos/admin/dashboard/default.tpl index 36e129e2..89237007 100644 --- a/public/templates/mpos/admin/dashboard/default.tpl +++ b/public/templates/mpos/admin/dashboard/default.tpl @@ -1,91 +1,6 @@ {nocache} -
-

MPOS Version Information

- - - - - - - - - - - - - - - - - - - - - - - - - -
ComponentCurrentInstalled
MPOS{$VERSION['CURRENT']['CORE']} - {$VERSION['INSTALLED']['CORE']} -
Config{$VERSION['CURRENT']['CONFIG']} - {$VERSION['INSTALLED']['CONFIG']} -
Database{$VERSION['CURRENT']['DB']} - {$VERSION['INSTALLED']['DB']} -
-
- -
-

Users

- - - - - - - - - - - - - - - - - - - -
TotalActiveLockedAdminsNo Fees
{$USER_INFO.total}{$USER_INFO.active}{$USER_INFO.locked}{$USER_INFO.admins}{$USER_INFO.nofees}
-
- -
-

MPOS Status

- - - - - - - - - - - - - - - - - - - -
CronjobsWallet
ErrorsDisabledErrors
- {if $CRON_ERROR == 0}None - OK{else}{$CRON_ERROR}{/if} - - {if $CRON_DISABLED == 0}None - OK{else}{$CRON_DISABLED}{/if} - - {$WALLET_ERROR|default:"None - OK"} -
-
+{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} diff --git a/public/templates/mpos/admin/dashboard/invitations.tpl b/public/templates/mpos/admin/dashboard/invitations.tpl new file mode 100644 index 00000000..d8b60599 --- /dev/null +++ b/public/templates/mpos/admin/dashboard/invitations.tpl @@ -0,0 +1,21 @@ +{nocache} +
+

Invitations

+ + + + + + + + + + + + + + + +
TotalActivatedOutstanding
{$INVITATION_INFO.total}{$INVITATION_INFO.activated}{$INVITATION_INFO.outstanding}
+
+{/nocache} diff --git a/public/templates/mpos/admin/dashboard/status.tpl b/public/templates/mpos/admin/dashboard/status.tpl new file mode 100644 index 00000000..b4695040 --- /dev/null +++ b/public/templates/mpos/admin/dashboard/status.tpl @@ -0,0 +1,37 @@ +{nocache} +
+

MPOS Version Information

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentCurrentInstalled
MPOS{$VERSION['CURRENT']['CORE']} + {$VERSION['INSTALLED']['CORE']} +
Config{$VERSION['CURRENT']['CONFIG']} + {$VERSION['INSTALLED']['CONFIG']} +
Database{$VERSION['CURRENT']['DB']} + {$VERSION['INSTALLED']['DB']} +
+
+{/nocache} diff --git a/public/templates/mpos/admin/dashboard/users.tpl b/public/templates/mpos/admin/dashboard/users.tpl new file mode 100644 index 00000000..3ca86cef --- /dev/null +++ b/public/templates/mpos/admin/dashboard/users.tpl @@ -0,0 +1,25 @@ +{nocache} +
+

Users

+ + + + + + + + + + + + + + + + + + + +
TotalActiveLockedAdminsNo Fees
{$USER_INFO.total}{$USER_INFO.active}{$USER_INFO.locked}{$USER_INFO.admins}{$USER_INFO.nofees}
+
+{/nocache} diff --git a/public/templates/mpos/admin/dashboard/version.tpl b/public/templates/mpos/admin/dashboard/version.tpl new file mode 100644 index 00000000..b4695040 --- /dev/null +++ b/public/templates/mpos/admin/dashboard/version.tpl @@ -0,0 +1,37 @@ +{nocache} +
+

MPOS Version Information

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentCurrentInstalled
MPOS{$VERSION['CURRENT']['CORE']} + {$VERSION['INSTALLED']['CORE']} +
Config{$VERSION['CURRENT']['CONFIG']} + {$VERSION['INSTALLED']['CONFIG']} +
Database{$VERSION['CURRENT']['DB']} + {$VERSION['INSTALLED']['DB']} +
+
+{/nocache}