remove the too complicated thing for menu, use a good old template
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 22 Jul 2006 19:51:41 +0000 (19:51 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 22 Jul 2006 19:51:41 +0000 (19:51 +0000)
instead.

remove all menu related thingies.
create a new kind of page: SIMPLE, and convert the ugly 'simple'
assignments

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@570 839d8a87-29fc-0310-9880-83ba4fa771e5

32 files changed:
hooks/README
hooks/banana.inc.php
hooks/emails.inc.php
hooks/lists.inc.php
hooks/money.inc.php
hooks/newsletter.inc.php
hooks/search.inc.php
hooks/tmp.inc.php
include/platal.inc.php
include/platal/page.inc.php
include/xorg.inc.php
include/xorg/globals.inc.php
include/xorg/hook.inc.php
include/xorg/menu.inc.php [deleted file]
modules/geoloc.php
modules/profile.php
modules/register.php
modules/search.php
templates/skin/common.bandeau.head.tpl
templates/skin/common.menu.tpl [new file with mode: 0644]
templates/skin/default.tpl
templates/skin/espace.tpl
templates/skin/humlinux.tpl
templates/skin/linux.tpl
templates/skin/liteskin.tpl
templates/skin/nbviolet.tpl
templates/skin/newxorg.tpl
templates/skin/oldtimes.tpl
templates/skin/openweb.tpl
templates/skin/sharky.tpl
templates/skin/spectral.tpl
templates/skin/trapped.tpl

index 86ad06b..5ae46ff 100644 (file)
@@ -2,9 +2,6 @@ config()
     function used to create new config entries in $globals.
     usually, a module need to create a ....Config class to store the defaults.
 
-menu()
-    function used to add entries to $globals->menu    
-
 subscribe($forlife, $uid, $promo, $pass)
     triggered when a user subscription is sucessfull
 
index 15615c4..588a94b 100644 (file)
@@ -43,15 +43,6 @@ function banana_config()
 }
 
 // }}}
-// {{{ menu HOOK
-
-function banana_menu()
-{
-    global $globals;
-    $globals->menu->addPrivateEntry(XOM_SERVICES, 10, 'Forums & PA', 'banana/');
-}
-
-// }}}
 // {{{ subscribe HOOK
 
 function banana_subscribe($forlife, $uid, $promo, $password)
index 1a2f5a3..996eedf 100644 (file)
@@ -31,8 +31,6 @@ class MailConfig
     var $alias_dom  = '';
     var $alias_dom2 = '';
 
-    var $send_form  = true;
-
     function shorter_domain()
     {
         if (empty($this->domain2) || strlen($this->domain2)>strlen($this->domain)) {
@@ -51,20 +49,4 @@ function emails_config()
     $globals->mail = new MailConfig;
 }
 // }}}
-// {{{ menu HOOK
-
-function emails_menu()
-{
-    global $globals;
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   00, 'Mes emails',          'emails');
-
-    if ($globals->mail->send_form) {
-        $globals->menu->addPrivateEntry(XOM_SERVICES, 00, 'Envoyer un mail', 'emails/send');
-    }
-
-    $globals->menu->addPrivateEntry(XOM_SERVICES, 40, 'Patte cassée',        'emails/broken');
-    
-}
-
-// }}}
 ?>
index f209ecb..a84448d 100644 (file)
@@ -42,15 +42,6 @@ function lists_config()
 }
 
 // }}}
-// {{{ menu HOOK
-
-function lists_menu()
-{
-    global $globals;
-    $globals->menu->addPrivateEntry(XOM_SERVICES, 20, 'Listes de diffusion',   'lists');
-}
-
-// }}}
 // {{{ subscribe HOOK
 
 function lists_subscribe($forlife, $uid, $promo, $password)
index 7549511..5390aef 100644 (file)
@@ -42,17 +42,5 @@ function money_config()
 }
 
 // }}}
-// {{{ menu HOOK
-
-
-function money_menu()
-{
-    global $globals;
-    if ($globals->money->mpay_enable) {
-        $globals->menu->addPrivateEntry(XOM_SERVICES, 30, 'Télépaiements', 'payment');
-    }
-}
-
-// }}}
 
 ?>
index bdaaec5..e88f50c 100644 (file)
@@ -38,15 +38,6 @@ function newsletter_config() {
 }
 
 // }}}
-// {{{ menu HOOK
-
-function newsletter_menu()
-{
-    global $globals;
-    $globals->menu->addPrivateEntry(XOM_INFOS, 0, 'Lettres mensuelles', 'nl');
-}
-
-// }}}
 // {{{ subscribe HOOK
 
 function newsletter_subscribe($forlife, $uid, $promo, $password)
index f102adb..26b7d22 100644 (file)
@@ -47,15 +47,5 @@ function search_subscribe($forlife, $uid, $promo, $pass)
     user_reindex($uid);
 }
 // }}}
-// {{{ menu HOOK
-
-function search_menu()
-{
-    global $globals;
-    $globals->menu->addPrivateEntry(XOM_GROUPS, 00, 'Annuaire',         'search');
-    $globals->menu->addPublicEntry(XOM_EXT,     00, 'Annuaire de l\'X', 'search');
-}
-
-// }}}
 
 ?>
index 6f75b57..def0722 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function tmp_menu()
-{
-    global $globals;
-
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   10, 'Mon profil',         'profile/edit');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   20, 'Mes contacts',       'carnet/contacts');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   30, 'Mon carnet',         'carnet/');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   40, 'Mon mot de passe',   'password');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   50, 'Mes préférences',    'prefs');
-
-    $globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Trombi promo',       'trombi');
-    $globals->menu->addPrivateEntry(XOM_GROUPS,   20, 'Conseil Pro.',       'referent/search');
-    if ($globals->geoloc->use_map())
-        $globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Planisphère',    'geoloc/');
-    $globals->menu->addPrivateEntry(XOM_GROUPS,   30, 'Groupes X',          'http://www.polytechnique.net/plan');
-
-    $globals->menu->addPrivateEntry(XOM_INFOS,    10, 'Documentations',     'Docs/');
-    $globals->menu->addPrivateEntry(XOM_INFOS,    20, 'Nous contacter',     'Docs/NousContacter');
-    $globals->menu->addPrivateEntry(XOM_INFOS,    30, 'Carrières',          'Docs/Emploi');
-
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    00, 'Marketing',          'marketing');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    10, 'Administration',     'admin/');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    20, 'Clear cache',        'purge_cache');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    30, 'Trackers',           'http://trackers.polytechnique.org');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    40, 'Support',            'http://support.polytechnique.org');
-
-    $globals->menu->addPublicEntry(XOM_US,    00, 'Me connecter !',         'events');
-    $globals->menu->addPublicEntry(XOM_US,    10, 'M\'inscrire',            'register/');
-    $globals->menu->addPublicEntry(XOM_US,    20, 'Pourquoi m\'inscrire ?', 'Docs/PourquoiM\'Inscrire');
-
-    $globals->menu->addPublicEntry(XOM_EXT,   10, 'Associations X',         'http://www.polytechnique.net/');
-    $globals->menu->addPublicEntry(XOM_EXT,   20, 'Recrutement',            'http://www.manageurs.com/');
-
-    $globals->menu->addPublicEntry(XOM_INFOS, 00, 'A propos du site',       'Docs/APropos');
-    $globals->menu->addPublicEntry(XOM_INFOS, 10, 'Nous contacter',         'Docs/NousContacter');
-    $globals->menu->addPublicEntry(XOM_INFOS, 20, 'FAQ',                    'Docs/FAQ');
-}
-
 // {{{ subscribe HOOK
 
 function tmp_subscribe($forlife, $uid, $promo, $password)
 {
-
     require_once('notifs.inc.php');
     register_watch_op($uid, WATCH_INSCR);
     inscription_notifs_base($uid);
index 93cf3cb..b4d0491 100644 (file)
@@ -35,7 +35,8 @@ define('PERMS_USER',  'user');
 define('PERMS_ADMIN', 'admin');
 
 define('SKINNED', 0);
-define('NO_SKIN', 1);
+define('SIMPLE',  1);
+define('NO_SKIN', 2);
 
 require_once('platal/env.inc.php');
 
index d37f4df..ccbd60c 100644 (file)
@@ -41,7 +41,7 @@ class PlatalPage extends Smarty
     // }}}
     // {{{ function PlatalPage()
 
-    function PlatalPage($tpl, $type=SKINNED)
+    function PlatalPage($tpl, $type = SKINNED)
     {
         global $globals;
 
@@ -83,7 +83,7 @@ class PlatalPage extends Smarty
     // }}}
     // {{{ function changeTpl()
 
-    function changeTpl($tpl, $type=SKINNED)
+    function changeTpl($tpl, $type = SKINNED)
     {
        $this->_tpl       = $tpl;
        $this->_page_type = $type;
@@ -103,10 +103,14 @@ class PlatalPage extends Smarty
         $this->assign("xorg_errors", $this->_errors);
         $this->assign("xorg_failure", $this->_failure);
 
-        if ($this->_page_type == NO_SKIN) {
+        switch ($this->_page_type) {
+          case NO_SKIN:
             $this->display($this->_tpl);
             exit;
-        } else {
+
+          case SIMPLE:
+            $page->assign('simple', true);
+          case SKINNED:
            $this->register_modifier('escape_html', 'escape_html');
            $this->default_modifiers = Array('@escape_html');
         }
index 8c121dc..e655036 100644 (file)
@@ -31,7 +31,7 @@ require_once('platal/page.inc.php');
 
 class XorgPage extends PlatalPage
 {
-    function XorgPage($tpl, $type=SKINNED)
+    function XorgPage($tpl, $type = SKINNED)
     {
         $this->PlatalPage($tpl, $type);
     }
@@ -39,9 +39,7 @@ class XorgPage extends PlatalPage
     function run()
     {
         global $globals;
-        if ($this->_page_type != NO_SKIN) {
-            $this->assign('menu', $globals->menu->menu());
-        }
+        $this->assign('globals', $globals);
         $this->_run('skin/'.S::v('skin', 'default.tpl'));
     }
 }
@@ -55,7 +53,7 @@ class XorgAdmin extends XorgPage
 {
     // {{{ function XorgAdmin()
 
-    function XorgAdmin($tpl, $type=SKINNED)
+    function XorgAdmin($tpl, $type = SKINNED)
     {
         $this->XorgPage($tpl, $type);
         check_perms();
index 6e85264..5ad3363 100644 (file)
@@ -34,19 +34,15 @@ class XorgGlobals extends PlatalGlobals
     {
         global $globals;
         require_once('xorg/hook.inc.php');
-        require_once('xorg/menu.inc.php');
 
         $globals       = new XorgGlobals;
         $globals->core = new CoreConfig;
         $globals->hook = new XOrgHook();
-        $globals->menu = new XOrgMenu();
 
         $globals->hook->config(null);
 
         $globals->read_config();
 
-        $globals->hook->menu(null);
-
         $globals->dbconnect();
         if ($globals->debug & 1) {
             $globals->db->trace_on();
index 77a4ad4..c992f45 100644 (file)
@@ -46,7 +46,7 @@
 class XOrgHook
 {
     // {{{ properties
-    
+
     /**
      * list of all the modules names that have implemented some reactions to our triggers
      *
@@ -54,7 +54,7 @@ class XOrgHook
      * @access private
      */
     var $_mods = Array();
-    
+
     // }}}
     // {{{ constructor XOrgHook()
 
@@ -85,17 +85,6 @@ class XOrgHook
     }
 
     // }}}
-    // {{{ function menu
-
-    function menu()
-    {
-        foreach ($this->_mods as $mod) {
-            if (!function_exists($mod.'_menu')) continue;
-            call_user_func($mod.'_menu');
-        }
-    }
-
-    // }}}
     // {{{ function subscribe
 
     function subscribe($forlife, $uid, $promo, $pass)
@@ -107,20 +96,6 @@ class XOrgHook
     }
 
     // }}}
-    // {{{ function prefs
-
-    function prefs()
-    {
-        $res = Array();
-        foreach ($this->_mods as $mod) {
-            if (!function_exists($mod.'_prefs')) continue;
-            $res = array_merge($res, call_user_func($mod.'_prefs'));
-        }
-        usort($res, create_function('$a, $b', 'return strcmp($a["weight"], $b["weight"]);'));
-        return $res;
-    }
-
-    // }}}
 }
 
 // }}}
diff --git a/include/xorg/menu.inc.php b/include/xorg/menu.inc.php
deleted file mode 100644 (file)
index 8e81558..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 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                *
- ***************************************************************************/
-
-// {{{ defines
-
-define('XOM_NO',0);
-define('XOM_CUSTOM',   "Personnaliser");
-define('XOM_SERVICES', "Services");
-define('XOM_GROUPS',   "Communauté X");
-define('XOM_ADMIN',    "***");
-
-define('XOM_US',       'Polytechniciens');
-define('XOM_EXT',      'Visiteurs');
-
-define('XOM_INFOS',    "Informations");
-
-// }}}
-// {{{ class XOrgMenu
-
-/**
- * Class used for the left menu construction
- *
- * @category XOrgCore
- * @package  XOrgCore
- * @author   Pierre Habouzit <pierre.habouzit@m4x.org>
- * @access   public
- */
-
-class XOrgMenu
-{
-    // {{{ properties
-
-    var $_ext = Array();
-    var $_int = Array();
-    
-    // }}}
-    // {{{ constructor
-
-    function XOrgMenu()
-    {
-        $this->_int[XOM_NO]       = array();
-        $this->_int[XOM_CUSTOM]   = array();
-        $this->_int[XOM_SERVICES] = array();
-        $this->_int[XOM_GROUPS]   = array();
-        $this->_int[XOM_INFOS]    = array();
-        $this->_int[XOM_ADMIN]    = array();
-
-        $this->_ext[XOM_US]       = array();
-        $this->_ext[XOM_EXT]      = array();
-        $this->_ext[XOM_INFOS]    = array();
-    }
-
-    // }}}
-    // {{{ function addPublicEntry
-
-    function addPublicEntry($head, $prio, $text, $url)
-    {
-        $this->_ext[$head][] = Array($prio, 'text' => $text, 'url' => $url);
-    }
-
-    // }}}
-    // {{{ function addPrivateEntry
-
-    function addPrivateEntry($head, $prio, $text, $url)
-    {
-        $this->_int[$head][] = Array($prio, 'text' => $text, 'url' => $url);
-    }
-
-    // }}}
-    // {{{ function menu()
-
-    function menu()
-    {
-        $res = S::logged() ? $this->_int : $this->_ext;
-        if (S::identified()) {
-            $res[XOM_NO][] = Array(0, 'text' => 'Déconnexion',
-                                   'url' => 'exit');
-        } elseif (Cookie::has('ORGaccess')) {
-            $res[XOM_NO][] = Array(0, 'text' => 'Déconnexion totale',
-                                   'url' => 'exit/forget');
-        }
-        if (!S::has_perms()) {
-            unset($res[XOM_ADMIN]);
-        }
-        foreach (array_keys($res) as $key) {
-            if (empty($res[$key])) {
-                unset($res[$key]);
-            } else {
-                sort($res[$key]);
-            }
-        }
-        return $res;
-    }
-
-    // }}}
-}
-
-// }}}
-
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
-?>
index 3ea7f4f..370a121 100644 (file)
@@ -151,8 +151,7 @@ class GeolocModule extends PLModule
 
         // to debug sql use the next line
         if (Env::has('debug')) {
-            $page->changeTpl('geoloc/getData.tpl');
-            $page->assign('simple', true);
+            $page->changeTpl('geoloc/getData.tpl', SIMPLE);
         } else {
             header("Content-type: text/xml");
             $page->changeTpl('geoloc/getData.tpl', NO_SKIN);
index 36f5205..0727241 100644 (file)
@@ -161,8 +161,7 @@ class ProfileModule extends PLModule
         global $globals;
         require_once 'user.func.inc.php';
 
-        $page->changeTpl('fiche.tpl');
-        $page->assign('simple', true);
+        $page->changeTpl('fiche.tpl', SIMPLE);
 
         $view = 'private';
         if (!S::logged() || Env::get('view') == 'public') $view = 'public';
@@ -403,8 +402,7 @@ class ProfileModule extends PLModule
             return PL_NOT_FOUND;
         }
 
-        $page->changeTpl('fiche_referent.tpl');
-        $page->assign('simple', true);
+        $page->changeTpl('fiche_referent.tpl', SIMPLE);
 
         $res = XDB::query(
                 "SELECT  prenom, nom, user_id, promo, cv, a.alias AS bestalias
index 93575fe..d2ca34f 100644 (file)
@@ -146,8 +146,7 @@ class RegisterModule extends PLModule
         }
 
         $_SESSION['sub_state'] = $sub_state;
-        $page->changeTpl('register/step'.intval($sub_state['step']).'.tpl');
-        $page->assign('simple', true);
+        $page->changeTpl('register/step'.intval($sub_state['step']).'.tpl', SIMPLE);
         if (isset($err)) {
             $page->trig($err);
         }
index 6024d6f..e48af11 100644 (file)
@@ -193,11 +193,7 @@ class SearchModule extends PLModule
         require_once 'geoloc.inc.php';
 
 
-        $page->changeTpl('search/index.tpl');
-
-        if ($mode == 'mini') {
-            $page->assign('simple', true);
-        }
+        $page->changeTpl('search/index.tpl', $mode == 'mini' ? SIMPLE : SKINNED);
 
         $page->assign('advanced',1);
         $page->assign('public_directory',0);
index 1839a42..6ef56a1 100644 (file)
@@ -20,7 +20,6 @@
 {*                                                                        *}
 {**************************************************************************}
 
-
 {literal}
     <!-- BANDEAU DEBUT -->
     <style type="text/css">
diff --git a/templates/skin/common.menu.tpl b/templates/skin/common.menu.tpl
new file mode 100644 (file)
index 0000000..ec918a3
--- /dev/null
@@ -0,0 +1,94 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2006 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{only_public}
+<div class="menu_title">Polytechniciens</div>
+<div class="menu_item"><a href="events">Me connecter !</a></div>
+<div class="menu_item"><a href="register">M'inscrire</a></div>
+<div class="menu_item"><a href="Docs/PourquoiM'Inscrire">Pourquoi M'inscrire ?</a></div>
+
+<div class="menu_title">Visiteurs</div>
+<div class="menu_item"><a href="search">Annuaire de l'X</a></div>
+<div class="menu_item"><a href="http://www.polytechnique.net/">Associations X</a></div>
+<div class="menu_item"><a href="http://www.manageurs.com/">Recrutement</a></div>
+
+<div class="menu_title">Informations</div>
+<div class="menu_item"><a href="Docs/APropos">A propos du site</a></div>
+<div class="menu_item"><a href="Docs/NousContacter">Nous contacter</a></div>
+<div class="menu_item"><a href="Docs/FAQ">FAQ</a></div>
+
+{/only_public}
+
+{if $smarty.session.auth == AUTH_MDP}
+<div class="menu_item"><a href="exit">Déconnexion</a></div>
+{elseif $smarty.cookies.ORGaccess}
+<div class="menu_item"><a href="exit/forget">Déconnexion totale</a></div>
+{/if}
+
+<div class="menu_title">Personnaliser</div>
+<div class="menu_item"><a href="emails">Mes emails</a></div>
+<div class="menu_item"><a href="profile/edit">Mon profil</a></div>
+<div class="menu_item"><a href="carnet/contacts">Mes contacts</a></div>
+<div class="menu_item"><a href="carnet">Mon carnet</a></div>
+<div class="menu_item"><a href="password">Mon mot de passe</a></div>
+<div class="menu_item"><a href="prefs">Mes préférences</a></div>
+
+<div class="menu_title">Services</div>
+<div class="menu_item"><a href="emails/send">Envoyer un mail</a></div>
+<div class="menu_item"><a href="banana/">Forums & PA</a></div>
+<div class="menu_item"><a href="lists">Listes de diffusion</a></div>
+<div class="menu_item"><a href="payment">Télépaiements</a></div>
+<div class="menu_item"><a href="emails/broken">Patte cassée</a></div>
+
+<div class="menu_title">Communauté X</div>
+<div class="menu_item"><a href="search">Annuaire</a></div>
+{if $globals->geoloc->use_map()}
+<div class="menu_item"><a href="geoloc">Planisphère</a></div>
+{/if}
+<div class="menu_item"><a href="trombi">Trombi promo</a></div>
+<div class="menu_item"><a href="referent/search">Conseil Pro.</a></div>
+<div class="menu_item"><a href="http://www.polytechnique.net/plan">Groupes X</a></div>
+
+<div class="menu_title">Informations</div>
+<div class="menu_item"><a href="nl">Lettres mensuelles</a></div>
+<div class="menu_item"><a href="Docs/">Documentations</a></div>
+<div class="menu_item"><a href="Docs/NousContacter">Nous contacter</a></div>
+<div class="menu_item"><a href="Docs/Emploi">Carrières</a></div>
+
+{perms level=admin}
+
+<div class="menu_title">***</div>
+<div class="menu_item"><a href="marketing">Marketing</a></div>
+<div class="menu_item"><a href="admin/">Administration</a></div>
+<div class="menu_item"><a href="purge_cache">Clear cache</a></div>
+<div class="menu_item"><a href="http://trackers.polytechnique.org">Trackers</a></div>
+<div class="menu_item"><a href="http://support.polytechnique.org">Support</a></div>
+
+<table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
+  <tr><th>Valid</th></tr>
+  <tr class="impair">
+    <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
+  </tr>
+</table>
+{/perms}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
index 9259aa6..a627ca3 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
           {include file="skin/common.content.tpl"}
index 77f2cce..146d2d1 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index 5ced943..ebeedc2 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index 9462c89..0a32a1e 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index 542c78e..1f116be 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index baa059d..09a4d51 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index e5d2035..52db681 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index 9c21194..bb3296c 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index b868583..593d7f8 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <a href="{$mi.url}">{$mi.text}</a>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td>
           <div id="content">
-            {include file="skin/common.content.tpl"}
+          {include file="skin/common.content.tpl"}
           </div>
         </td>
       </tr>
index 0cf3af2..3c4f27b 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index 9da1271..2c3bd19 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>
index f8aa0cf..f207a88 100644 (file)
       </tr>
       <tr>
         <td id="body-menu">
-          {foreach key=menu_title item=menu_list from=$menu}
-          {if $menu_title}
-          <div class="menu_title">{$menu_title}</div>
-          {/if}
-          {foreach item=mi from=$menu_list}
-          <div class='menu_item'><a href="{$mi.url}">{$mi.text}</a></div>
-          {/foreach}
-          {/foreach}
-          {perms level=admin}
-          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-            <tr><th>Valid</th></tr>
-            <tr class="impair">
-              <td><a href="admin/valider.php">{insert name="mkStats"}</a></td>
-            </tr>
-          </table>
-          {/perms}
+        {include file=skin/common.menu.tpl}
         </td>
         <td id="content">
-          {include file="skin/common.content.tpl"}
+        {include file="skin/common.content.tpl"}
         </td>
       </tr>
       <tr>