Adds Corps tables in admin pages.
authorStéphane Jacob <jacou@melix.net>
Thu, 18 Sep 2008 17:06:10 +0000 (19:06 +0200)
committerStéphane Jacob <jacou@melix.net>
Thu, 18 Sep 2008 17:06:10 +0000 (19:06 +0200)
modules/profile.php
templates/admin/index.tpl

index 322a13f..af0b78f 100644 (file)
@@ -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');
index 5606061..7a793c7 100644 (file)
       <a href="admin/fonctions">Fonctions</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/networking">Networking</a>
+      &nbsp;&nbsp;|&nbsp;&nbsp;
+      <a href="admin/corps_enum">Corps</a>
+      &nbsp;&nbsp;|&nbsp;&nbsp;
+      <a href="admin/corps_rank">Grade</a>
     </td>
   </tr>
   <tr class="pair">