Adds admnistration pages for sub-sectors and functions, and a suitable edition page...
authorStéphane Jacob <jacou@melix.net>
Fri, 6 Jun 2008 01:19:58 +0000 (03:19 +0200)
committerStéphane Jacob <jacou@melix.net>
Fri, 6 Jun 2008 01:20:06 +0000 (03:20 +0200)
modules/profile.php
templates/admin/index.tpl

index 467f11e..b75fbe0 100644 (file)
@@ -59,6 +59,8 @@ class ProfileModule extends PLModule
             'admin/sections'  => $this->make_hook('admin_sections', AUTH_MDP, 'admin'),
             'admin/secteurs'  => $this->make_hook('admin_secteurs', AUTH_MDP, 'admin'),
             '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'),
 
         );
     }
@@ -763,16 +765,32 @@ class ProfileModule extends PLModule
     }
     function handler_admin_sections(&$page, $action = 'list', $id = null) {
         $page->assign('xorg_title','Polytechnique.org - Administration - Sections');
-        $page->assign('title', 'Gestion des Sections');
+        $page->assign('title', 'Gestion des sections');
         $table_editor = new PLTableEditor('admin/sections','sections','id');
         $table_editor->describe('text','intitulé',true);
         $table_editor->apply($page, $action, $id);
     }
+    function handler_admin_ss_secteurs(&$page, $action = 'list', $id = null) {
+        $page->assign('xorg_title', 'Polytechnique.org - Administration - Sous-secteurs');
+        $page->assign('title', 'Gestion des sous-secteurs');
+        $table_editor = new PLTableEditor('admin/ss_secteurs', 'emploi_ss_secteur', 'id', true);
+        $table_editor->describe('label', 'intitulé', true);
+        $table_editor->apply($page, $action, $id);
+    }
+    function handler_admin_fonctions(&$page, $action = 'list', $id = null) {
+        $page->assign('xorg_title', 'Polytechnique.org - 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);
+        $table_editor->apply($page, $action, $id);
+    }
     function handler_admin_secteurs(&$page, $action = 'list', $id = null) {
-        $page->assign('xorg_title','Polytechnique.org - Administration - Secteurs');
-        $page->assign('title', 'Gestion des Secteurs');
-        $table_editor = new PLTableEditor('admin/secteurs','emploi_secteur','id');
-        $table_editor->describe('label','intitulé',true);
+        $page->assign('xorg_title', 'Polytechnique.org - Administration - Secteurs');
+        $page->assign('title', 'Gestion des secteurs');
+        $table_editor = new PLTableEditor('admin/secteurs', 'emploi_secteur', 'id', true);
+        $table_editor->describe('label', 'intitulé', true);
         $table_editor->apply($page, $action, $id);
     }
     function handler_admin_medals(&$page, $action = 'list', $id = null) {
index f2ff716..f6b59cc 100644 (file)
@@ -1,23 +1,23 @@
 {**************************************************************************}
-{*                                    *}
-{*  Copyright (C) 2003-2008 Polytechnique.org               *}
-{*  http://opensource.polytechnique.org/                  *}
-{*                                    *}
+{*                                                                        *}
+{*  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         *}
-{*                                    *}
+{*  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               *}
+{*                                                                        *}
 {**************************************************************************}
 
 <h1>Administration Polytechnique.org</h1>
       <a href="admin/sections">Sections</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/secteurs">Secteurs</a>
+      &nbsp;&nbsp;|&nbsp;&nbsp;
+      <a href="admin/ss_secteurs">Sous-secteurs</a>
+      &nbsp;&nbsp;|&nbsp;&nbsp;
+      <a href="admin/fonctions">Fonctions</a>
     </td>
   </tr>
   <tr class="pair">
       <strong>Newsletter&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/newsletter">Liste</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
-      <a href="admin/newsletter/categories">Catégories</a>      
+      <a href="admin/newsletter/categories">Catégories</a>
     </td>
   </tr>
   <tr class="impair">