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}