From b62db02e8cd11236b2b089e2e902dd34e23ec950 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 19 Jan 2009 23:05:52 +0100 Subject: [PATCH] Adds administration page for names type. --- modules/profile.php | 12 ++++++++++++ templates/admin/index.tpl | 2 ++ 2 files changed, 14 insertions(+) diff --git a/modules/profile.php b/modules/profile.php index 51302ed..b6f5cfc 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -72,6 +72,7 @@ class ProfileModule extends PLModule 'admin/fonctions' => $this->make_hook('admin_fonctions', AUTH_MDP, 'admin'), 'admin/corps_enum' => $this->make_hook('admin_corps_enum', AUTH_MDP, 'admin'), 'admin/corps_rank' => $this->make_hook('admin_corps_rank', AUTH_MDP, 'admin'), + 'admin/names' => $this->make_hook('admin_names', AUTH_MDP, 'admin'), ); } @@ -812,6 +813,17 @@ class ProfileModule extends PLModule break; } } + function handler_admin_names(&$page, $action = 'list', $id = null) { + $page->setTitle('Administration - Types de noms'); + $page->assign('title', 'Gestion des types de noms'); + $table_editor = new PLTableEditor('admin/names', 'profile_name_enum', 'id', true); + $table_editor->describe('name', 'Nom', true); + $table_editor->describe('explanations', 'Explications', true); + $table_editor->describe('type', 'Type', true); + $table_editor->describe('flags', 'Flags', true); + $table_editor->describe('score', 'Score', true); + $table_editor->apply($page, $action, $id); + } function handler_admin_binets(&$page, $action = 'list', $id = null) { $page->setTitle('Administration - Binets'); $page->assign('title', 'Gestion des binets'); diff --git a/templates/admin/index.tpl b/templates/admin/index.tpl index 312d36d..5edf85e 100644 --- a/templates/admin/index.tpl +++ b/templates/admin/index.tpl @@ -155,6 +155,8 @@ Décorations   |   Sections +   |   + Noms -- 2.1.4