From 6389096941565193f9f13436be27ab9678eeb2b3 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 11 May 2012 02:15:35 +0200 Subject: [PATCH] Add fixed userlist templates --- frontend/locales/english.lng | 9 +++++++++ frontend/module.admin.users.php | 31 ++++++++++++++++++++++++++++++ frontend/templates/admin.users.tpl | 26 +++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 frontend/module.admin.users.php create mode 100644 frontend/templates/admin.users.tpl diff --git a/frontend/locales/english.lng b/frontend/locales/english.lng index ef5e58d..b0babf5 100644 --- a/frontend/locales/english.lng +++ b/frontend/locales/english.lng @@ -28,6 +28,7 @@ title-login; Login to your VPS panel title-reinstall; Reinstall your VPS title-password; Set new root password title-console; Out-of-band console +title-admin-userlist; User overview button-login; Login button-reinstall; Reinstall @@ -104,3 +105,11 @@ console-title-hostname; Hostname console-title-port; Port console-title-username; Username console-title-password; Password + +admin-title-username; Username +admin-title-email; Email address +admin-title-accesslevel; Access level +admin-level-enduser; End user +admin-level-reseller; Reseller +admin-level-nodeadmin; Node administrator +admin-level-masteradmin; Master administrator diff --git a/frontend/module.admin.users.php b/frontend/module.admin.users.php new file mode 100644 index 0000000..acb8399 --- /dev/null +++ b/frontend/module.admin.users.php @@ -0,0 +1,31 @@ +data as $row) +{ + $sUserEntry = new User($row); + $sUserList[] = array( + 'id' => $sUserEntry->sId, + 'username' => $sUserEntry->sUsername, + 'email' => $sUserEntry->sEmailAddress, + 'accesslevel' => $sUserEntry->sAccessLevel + ); +} + +$sPageContents = Templater::InlineRender("admin.users", $locale->strings, array( + 'users' => $sUserList +)); diff --git a/frontend/templates/admin.users.tpl b/frontend/templates/admin.users.tpl new file mode 100644 index 0000000..632ef9e --- /dev/null +++ b/frontend/templates/admin.users.tpl @@ -0,0 +1,26 @@ +

<%!title-admin-userlist>

+ + + + + + + + <%foreach user in users> + + + + + + <%/foreach> +
<%!admin-title-username><%!admin-title-email><%!admin-title-accesslevel>
<%?user[username]><%?user[email]> + <%if user[accesslevel] == 1> + <%!admin-level-enduser> + <%/if><%if user[accesslevel] == 10> + <%!admin-level-reseller> + <%/if><%if user[accesslevel] == 20> + <%!admin-level-nodeadmin> + <%/if><%if user[accesslevel] == 30> + <%!admin-level-masteradmin> + <%/if> +