From 4962a9ce7497378e6d4de4e573241fbd1a364502 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Thu, 18 Sep 2008 19:06:10 +0200 Subject: [PATCH] Adds Corps tables in admin pages. --- modules/profile.php | 19 +++++++++++++++++++ templates/admin/index.tpl | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/modules/profile.php b/modules/profile.php index 322a13f..af0b78f 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -68,6 +68,8 @@ class ProfileModule extends PLModule 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'), 'admin/ss_secteurs' => $this->make_hook('admin_ss_secteurs', AUTH_MDP, 'admin'), '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'), ); } @@ -887,6 +889,23 @@ class ProfileModule extends PLModule $table_editor->describe('link', 'lien web', true); $table_editor->apply($page, $action, $id); } + function handler_admin_corps_enum(&$page, $action = 'list', $id = null) { + $page->setTitle('Administration - Corps'); + $page->assign('title', 'Gestion des Corps'); + $table_editor = new PLTableEditor('admin/corps_enum', 'profile_corps_enum', 'id'); + $table_editor->describe('name', 'intitulé', true); + $table_editor->describe('abbreviation', 'abbréviation', true); + $table_editor->describe('still_exists', 'existe encore ?', true); + $table_editor->apply($page, $action, $id); + } + function handler_admin_corps_rank(&$page, $action = 'list', $id = null) { + $page->setTitle('Administration - Grade dans les Corps'); + $page->assign('title', 'Gestion des grade dans les Corps'); + $table_editor = new PLTableEditor('admin/corps_rank', 'profile_corps_rank_enum', 'id'); + $table_editor->describe('name', 'intitulé', true); + $table_editor->describe('abbreviation', 'abbréviation', true); + $table_editor->apply($page, $action, $id); + } function handler_admin_medals(&$page, $action = 'list', $id = null) { $page->setTitle('Administration - Distinctions'); $page->assign('title', 'Gestion des Distinctions'); diff --git a/templates/admin/index.tpl b/templates/admin/index.tpl index 5606061..7a793c7 100644 --- a/templates/admin/index.tpl +++ b/templates/admin/index.tpl @@ -114,6 +114,10 @@ Fonctions   |   Networking +   |   + Corps +   |   + Grade -- 2.1.4