From b6e9d1ca670556c5e79f80c85b00d6447d932159 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 28 Mar 2009 19:47:31 +0100 Subject: [PATCH] Adds admin page for sectors. --- modules/profile.php | 17 +++++++++-------- templates/admin/index.tpl | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/profile.php b/modules/profile.php index 3556ec8..1c9915e 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -68,7 +68,7 @@ class ProfileModule extends PLModule 'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'), 'admin/networking' => $this->make_hook('admin_networking', AUTH_MDP, 'admin'), 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'), - 'admin/fonctions' => $this->make_hook('admin_fonctions', AUTH_MDP, 'admin'), + 'admin/sectors' => $this->make_hook('admin_sectors', 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'), @@ -891,13 +891,14 @@ class ProfileModule extends PLModule $table_editor->describe('text','intitulé',true); $table_editor->apply($page, $action, $id); } - function handler_admin_fonctions(&$page, $action = 'list', $id = null) { - $page->setTitle('Administration - Fonctions'); - $page->assign('title', 'Gestion des fonctions'); - $table_editor = new PLTableEditor('admin/fonctions', 'fonctions_def', 'id', true); - $table_editor->describe('fonction_fr', 'intitulé', true); - $table_editor->describe('fonction_en', 'intitulé (ang)', true); - $table_editor->describe('flags', 'titre', true); + function handler_admin_sectors(&$page, $action = 'list', $id = null) { + $page->setTitle('Administration - Secteurs'); + $page->assign('title', 'Gestion des secteurs'); + $table_editor = new PLTableEditor('admin/sectors', 'profile_job_subsubsector_enum', 'id', true); + $table_editor->describe('sectorid', 'id du secteur', false); + $table_editor->describe('subsectorid', 'id du sous-secteur', false); + $table_editor->describe('name', 'nom', true); + $table_editor->describe('flags', 'affichage', true); $table_editor->apply($page, $action, $id); } function handler_admin_networking(&$page, $action = 'list', $id = null) { diff --git a/templates/admin/index.tpl b/templates/admin/index.tpl index f36bd70..4cb8e87 100644 --- a/templates/admin/index.tpl +++ b/templates/admin/index.tpl @@ -136,7 +136,7 @@ Emploi - Fonctions + Secteurs   |   Networking   |   -- 2.1.4