From 16019034280368d14cf7f8e8fc358f837dc8ddc8 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 4 Jan 2009 22:06:13 +0100 Subject: [PATCH] Tabbed page for admin/user. Signed-off-by: Florent Bruneau --- Makefile | 9 ++- core | 2 +- htdocs/css/base.css | 2 + htdocs/css/keynote.css | 29 ++++++--- modules/admin.php | 2 + templates/admin/utilisateurs.tpl | 126 +++++++++++++++++++++++---------------- 6 files changed, 110 insertions(+), 60 deletions(-) diff --git a/Makefile b/Makefile index 958a9b1..d982bca 100644 --- a/Makefile +++ b/Makefile @@ -164,7 +164,10 @@ $(MEDAL_THUMBNAILS): $(subst /medals/thumb/,/medals/,$(@F)) JQUERY_PLUGINS=color JQUERY_PLUGINS_PATHES=$(addprefix htdocs/javascript/jquery.,$(addsuffix .js,$(JQUERY_PLUGINS))) -jquery: htdocs/javascript/jquery.js htdocs/javascript/jquery.autocomplete.js $(JQUERY_PLUGINS_PATHES) +JQUERY_UI=core tabs +JQUERY_UI_PATHES=$(addprefix htdocs/javascript/ui.,$(addsuffix .js,$(JQUERY_UI))) + +jquery: htdocs/javascript/jquery.js htdocs/javascript/jquery.autocomplete.js $(JQUERY_PLUGINS_PATHES) $(JQUERY_UI_PATHES) htdocs/javascript/jquery.js: DOWNLOAD_SRC = http://jquery.com/src/jquery-latest.min.js htdocs/javascript/jquery.js: @@ -178,6 +181,10 @@ $(JQUERY_PLUGINS_PATHES): DOWNLOAD_SRC = http://plugins.jquery.com/files/$(@F).t $(JQUERY_PLUGINS_PATHES): @$(download) +$(JQUERY_UI_PATHES): DOWNLOAD_SRC = http://ui.jquery.com/latest/ui/$(@F) +$(JQUERY_UI_PATHES): + @$(download) + ################################################################################ .PHONY: build dist clean core wiki build-wiki banana htdocs/images/banana htdocs/css/banana.css include/banana/banana.inc.php http* check diff --git a/core b/core index 35fff9b..3b6b056 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 35fff9b04585817e74f4709f36b70d959ce3224c +Subproject commit 3b6b056cf9637480527957d1a6f45f0f68b10a05 diff --git a/htdocs/css/base.css b/htdocs/css/base.css index a8e2a1e..128b11c 100644 --- a/htdocs/css/base.css +++ b/htdocs/css/base.css @@ -67,4 +67,6 @@ display: none; } +.ui-tabs-hide { display: none; } + /* vim: set et ts=4 sts=4 sw=4: */ diff --git a/htdocs/css/keynote.css b/htdocs/css/keynote.css index 9f33b87..0b95b5f 100644 --- a/htdocs/css/keynote.css +++ b/htdocs/css/keynote.css @@ -360,46 +360,59 @@ div.long td.rt { width: 85%; } [ onglets des profils ] *******************************************************************************/ -.wizard { +.wizard, .ui-tabs-nav { + margin: 0; + padding: 0; margin-left: -16px; + clear: both; } -.wizard .wiz_header { +.wizard .wiz_header, .ui-tabs-nav { height: 32px; width: 100%; background: url('../images/skins/wiz_background.png') top right repeat-x; margin-bottom: 1em; + text-align: left; } -.wizard .wiz_header .wiz_tab { +.wizard .wiz_header .wiz_tab, .ui-tabs-nav li { background: url('../images/skins/wiz_normal.png') #aaa top left repeat-x; height: 100%; text-align: center; font-size: 75%; border-right: 1px solid #888; + float: left; + vertical-align: middle; } -.wizard .wiz_header .wiz_tab:hover { +.ui-tabs-nav li { + margin: 0; + padding: 0; + list-style-type: none; +} + +.wizard .wiz_header .wiz_tab:hover, .ui-tabs-nav li:hover { background: url('../images/skins/wiz_hover.png') #777 top left repeat-x; color: #fff; } -.wizard .wiz_header .active, .wizard .wiz_header .active:hover { +.wizard .wiz_header .active, .wizard .wiz_header .active:hover, li.ui-tabs-selected { background: url('../images/skins/wiz_active.png') #444 top left repeat-x; color: #fff; } -.wizard .wiz_header a { +.wizard .wiz_header a, .ui-tabs-nav a { color: #000; text-decoration: none; } -.wizard .wiz_header a.active { +.wizard .wiz_header a.active, .ui-tabs-selected a { color: #fff; } -.wizard .wiz_content { +.wizard .wiz_content, .ui-tabs-panel { margin-left: 16px; + clear: both; } .flags .texte { diff --git a/modules/admin.php b/modules/admin.php index 2ea835e..de8381f 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -465,6 +465,8 @@ class AdminModule extends PLModule $page->trigSuccess('Données du compte mise à jour avec succès'); $user = User::getWithUID($user->id()); } + $page->addJsLink('ui.core.js'); + $page->addJsLink('ui.tabs.js'); // Processes admin requests, if any. diff --git a/templates/admin/utilisateurs.tpl b/templates/admin/utilisateurs.tpl index c68cf78..4d5af27 100644 --- a/templates/admin/utilisateurs.tpl +++ b/templates/admin/utilisateurs.tpl @@ -31,8 +31,8 @@ {elseif $user} - {literal} + {/literal} +
+ + +
{xsrf_token_field}

Informations sur le compte

@@ -157,7 +170,7 @@ function ban_read()
+
+ +
+

Gestion des emails de {$user->login()}

+
{xsrf_token_field} @@ -376,57 +395,9 @@ Pour ceci changer ses permissions en 'disabled'.
--->

* à ne modifier qu'avec l'accord express de l'utilisateur !!!

-
- {xsrf_token_field} - - - - - - - - - - - - - - - - - - - - - -
- Permissions sur les forums -
- Poster - - - - Bannir -
- Lire - - - - Bannir -
- Commentaire - - -
- - -
-
- {javascript name="ajax"} {test_email hruid=$user->login()} @@ -516,6 +487,61 @@ Pour ceci changer ses permissions en 'disabled'. +
+ +
+ +

Gestion de l'accès au forums de {$user->login()}

+ +
+ {xsrf_token_field} + + + + + + + + + + + + + + + + + + + + + +
+ Permissions sur les forums +
+ Poster + + + + Bannir +
+ Lire + + + + Bannir +
+ Commentaire + + +
+ + +
+
+
+ + {/if} {/if} -- 2.1.4