From fd1ce8c503dd990f3025674a5ca9ffe7dfe31505 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 7 Dec 2008 21:45:15 +0100 Subject: [PATCH] More readable administration portal. Add admin/accounts page with a list of all administrators and all disabled accounts. Signed-off-by: Florent Bruneau --- modules/admin.php | 14 ++++ templates/admin/accounts.tpl | 52 +++++++++++++++ templates/admin/index.tpl | 149 ++++++++++++++++++++++++++----------------- 3 files changed, 155 insertions(+), 60 deletions(-) create mode 100644 templates/admin/accounts.tpl diff --git a/modules/admin.php b/modules/admin.php index a9eddc6..a8ce74b 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -47,6 +47,7 @@ class AdminModule extends PLModule 'admin/wiki' => $this->make_hook('wiki', AUTH_MDP, 'admin'), 'admin/ipwatch' => $this->make_hook('ipwatch', AUTH_MDP, 'admin'), 'admin/icons' => $this->make_hook('icons', AUTH_MDP, 'admin'), + 'admin/accounts' => $this->make_hook('accounts', AUTH_MDP, 'admin'), ); } @@ -1239,6 +1240,19 @@ class AdminModule extends PLModule sort($icons); $page->assign('icons', $icons); } + + function handler_accounts(&$page) + { + $page->changeTpl('admin/accounts.tpl'); + $page->assign('disabled', XDB::iterator('SELECT u.nom, u.prenom, u.promo, u.comment, u.hruid + FROM auth_user_md5 AS u + WHERE perms = \'disabled\' + ORDER BY nom, prenom')); + $page->assign('admins', XDB::iterator('SELECT u.nom, u.prenom, u.promo, u.hruid + FROM auth_user_md5 AS u + WHERE perms = \'admin\' + ORDER BY nom, prenom')); + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/templates/admin/accounts.tpl b/templates/admin/accounts.tpl new file mode 100644 index 0000000..648ff7d --- /dev/null +++ b/templates/admin/accounts.tpl @@ -0,0 +1,52 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2008 Polytechnique.org *} +{* http://opensource.polytechnique.org/ *} +{* *} +{* This program is free software; you can redistribute it and/or modify *} +{* it under the terms of the GNU General Public License as published by *} +{* the Free Software Foundation; either version 2 of the License, or *} +{* (at your option) any later version. *} +{* *} +{* This program is distributed in the hope that it will be useful, *} +{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} +{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} +{* GNU General Public License for more details. *} +{* *} +{* You should have received a copy of the GNU General Public License *} +{* along with this program; if not, write to the Free Software *} +{* Foundation, Inc., *} +{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} +{* *} +{**************************************************************************} + +

Comptes désactivés

+ + + + {iterate from=$disabled item=user} + + + + + {/iterate} +
NomCommentaire
+ {$user.prenom} {$user.nom} ({$user.promo}) + + {$user.comment|default='(none)'} +
+ +

Administrateurs du site

+ + + + {iterate from=$admins item=user} + + + + {/iterate} +
Utilisateur
+ {$user.prenom} {$user.nom} ({$user.promo}) +
+ +{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/admin/index.tpl b/templates/admin/index.tpl index f6b59cc..bdc5473 100644 --- a/templates/admin/index.tpl +++ b/templates/admin/index.tpl @@ -22,11 +22,11 @@

Administration Polytechnique.org

- - +
Système
+ + + + + + + + + + + + + + + + + + + +
{icon name=wrench} Services
Postfix - Postfix :   Blacklist   |   Whitelist @@ -37,70 +37,93 @@
Accès au site - Sécurité :   + Auth Groupes X +   |   Logs des sessions   |   Actions   |   - Emails + IP surveillées +
Emails + MLs +   |   + MX défaillants   |   Perdus de vue   |   - IPs + Surveillés +
Forums + Gestion des mises au ban +
Trésorerie + Paiements +
Divers + Coupures +   |   + Icônes

- - +
Contenu du site
+ + + + + + + + + + + + + Dynamap + + +
{icon name=user_suit} Utilisateurs
Comptes - Utilisateurs :   - Ajout + Ajout promotion   |   - Edit/Su/Logs + Edition   |   Homonymes   |   - AX/X.org -   |   Décès -   |   - Décédés actifs -   |   - Synchro AX -   |   - Google Apps
AX - Infos dynamiques :   - Coupures + AX/X.org   |   - MX défaillants + Synchro AX +
Administration + Décédés actifs   |   - Astuces + Administrateurs/Désactivations   |   - Icônes + Google Apps
{icon name=user_gray} Champs
Emploi - Champs profil :   Formations   |   - Binets -   |   - Skins -   |   - Décorations -   |   - Sections -   |   Secteurs   |   Sous-secteurs @@ -109,69 +132,75 @@
Profil - Newsletter :   - Liste + Binets   |   - Catégories + Décorations +   |   + Sections
Géoloc - Administrer :   - Auth Groupes X + Synchro   |   - Listes -
Compte - Valider demandes :   - Valider -   |   - Événements -   |   - Réponses automatiques + Skins
+ +
+ + + + + + + + +
{icon name=page_edit} Editorial
Page d'accueil - Trésorerie :   - Paiements + Astuces +   |   + Événements
Newletter - Géoloc :   - Synchro + Liste   |   - Dynamap + Catégories
AX-Letter - Wiki :   - Pages et permissions + Edition +   |   + Inscriptions et Permissions
Wiki - AX-Letter :   - Edition -   |   - Inscriptions et Permissions + Pages et permissions
Sondages - Sondages :   Gestion des sondages
Validations - Forums :   - Gestion des mises au ban + Réponses automatiques
-- 2.1.4