big moves around menu + skins
authorx2000habouzit <x2000habouzit>
Mon, 22 Nov 2004 10:42:51 +0000 (10:42 +0000)
committerx2000habouzit <x2000habouzit>
Mon, 22 Nov 2004 10:42:51 +0000 (10:42 +0000)
19 files changed:
configs/menu.conf.php [deleted file]
htdocs/skins.php
include/xorg.common.inc.php
include/xorg.globals.inc.php.in
include/xorg.page.inc.php
include/xorg/menu.inc.php [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
templates/skins.tpl

diff --git a/configs/menu.conf.php b/configs/menu.conf.php
deleted file mode 100644 (file)
index f22a055..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-if(logged()) {
-    $menu = Array(
-        0 => Array( 'Page d\'accueil' => 'login.php' ),
-        'Personnaliser' => Array(
-            'Mes emails' => 'emails.php' ,
-            'Mon profil' => 'profil.php' ,
-            'Mes contacts' => 'carnet/mescontacts.php' ,
-            'Mon carnet' => 'carnet/' ,
-            'Mon mot de passe' => 'motdepassemd5.php' ,
-            'Mes préférences' => 'preferences.php' 
-        ),
-        'Services' => Array (
-            'Envoyer un mail' => 'sendmail.php' ,
-            'Forums & PA' => 'banana/' ,
-            'Listes de diffusion' => 'listes/' ,
-            'Micropaiements' => 'paiement/' ,
-            'Patte cassée' => 'pattecassee.php' ,
-        ),
-        'Communauté X' => Array (
-            'Annuaire' => 'search.php',
-            'Trombi promo' => 'trombipromo.php',
-            'Conseil Professionnel' => 'referent.php',
-            'Groupes X' => 'http://www.polytechnique.net/plan.php',
-            'Sites Polytechniciens' => 'http://www.polytechnique.net/'
-        ),
-        'Informations' => Array (
-            'Lettres mensuelles' => 'newsletter/',
-            'Documentations' => 'docs/',
-            'Nous contacter ' => 'docs/contacts.php',
-            'Emploi' => 'http://www.manageurs.com/'
-        )
-    );
-
-    if(identified()) {
-        $menu[0] = array_merge( Array('Déconnexion' => 'deconnexion.php'),  $menu[0] );
-    }
-
-    if(has_perms()) {
-        $menu['***'] = Array (
-            'Marketing' => 'marketing/',
-            'Administration' => 'admin/',
-            'Clear cache' => 'clear_all_cache.php'
-        );
-    }
-} else {
-    $menu = Array(
-        'Polytechniciens' => Array(
-            'Me connecter !' => 'login.php',
-            'M\'inscrire' => 'inscription/',
-            'Pourquoi m\'inscrire ?' => 'docs/services.php'
-        ),
-        'Visiteurs' => Array(
-            'Annuaire de l\'X' => 'search.php',
-            'Associations X' => 'http://www.polytechnique.net/',
-            'Recrutement' => 'http://www.manageurs.com/'
-        ),
-        'Informations' => Array(
-            'A propos du site' => 'docs/apropos.php',
-            'Nous contacter ' => 'docs/contacts.php',
-            'FAQ' => 'docs/faq.php'
-        )
-    );
-}
-$this->assign_by_ref('menu', $menu);
-?>
index 39fca0f..3a3d7e6 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: skins.php,v 1.8 2004-11-06 13:53:51 x2000habouzit Exp $
+        $Id: skins.php,v 1.9 2004-11-22 10:42:51 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
 new_skinned_page('skins.tpl', AUTH_COOKIE);
 
-if (isset($_REQUEST['submit']))  {  // formulaire soumis, traitons les données envoyées
+if (isset($_REQUEST['newskin']))  {  // formulaire soumis, traitons les données envoyées
     $globals->db->query("UPDATE auth_user_quick
                 SET skin={$_REQUEST['newskin']}
                 WHERE user_id={$_SESSION['uid']}");
@@ -37,7 +37,6 @@ $sql = "SELECT s.*,auteur,count(*) AS nb
          WHERE skin_tpl != '' AND ext != ''
       GROUP BY id ORDER BY s.date DESC";
 $page->mysql_assign($sql, 'skins');
-$page->assign('stochaskin',SKIN_STOCHASKIN_ID);
 
 $page->run();
 ?>
index ce43be2..08e409e 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-    $Id: xorg.common.inc.php,v 1.10 2004-11-22 07:48:49 x2000habouzit Exp $
+    $Id: xorg.common.inc.php,v 1.11 2004-11-22 10:42:52 x2000habouzit Exp $
  ***************************************************************************/
 
 // {{{ defines
@@ -42,9 +42,12 @@ define('NO_SKIN', 1);
 // {{{ import class definitions
 
 require_once("xorg.globals.inc.php");
+require_once("xorg/menu.inc.php");
+require_once("xorg/session.inc.php");
 
 $globals = new XorgGlobals;
 require("xorg.config.inc.php");
+$globals->menu = new XOrgMenu();
 
 // }}}
 // {{{ start session + database connection
@@ -59,5 +62,47 @@ if ($globals->debug) {
 
 //}}}
 
+$globals->menu->addPrivateEntry(XOM_NO,       10, 'Page d\'accueil',       'login.php');
+
+$globals->menu->addPrivateEntry(XOM_CUSTOM,   00, 'Mes emails',            'emails.php');
+$globals->menu->addPrivateEntry(XOM_CUSTOM,   10, 'Mon profil',            'profil.php');
+$globals->menu->addPrivateEntry(XOM_CUSTOM,   20, 'Mes contacts',          'profil.php');
+$globals->menu->addPrivateEntry(XOM_CUSTOM,   30, 'Mon carnet',            'carnet/');
+$globals->menu->addPrivateEntry(XOM_CUSTOM,   40, 'Mon mot de passe',      'motdepassemd5.php');
+$globals->menu->addPrivateEntry(XOM_CUSTOM,   50, 'Mes préférences',       'preferences.php');
+
+$globals->menu->addPrivateEntry(XOM_SERVICES, 00, 'Envoyer un mail',       'sendmail.php');
+$globals->menu->addPrivateEntry(XOM_SERVICES, 10, 'Forums & PA',           'banana/');
+$globals->menu->addPrivateEntry(XOM_SERVICES, 20, 'Listes de diffusion',   'listes/');
+$globals->menu->addPrivateEntry(XOM_SERVICES, 30, 'Envoyer un mail',       'sendmail.php');
+$globals->menu->addPrivateEntry(XOM_SERVICES, 40, 'Patte cassée',          'pattecassee.php');
+       
+$globals->menu->addPrivateEntry(XOM_GROUPS,   00, 'Annuaire',              'search.php');
+$globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Trombi promo',          'trombipromo.php');
+$globals->menu->addPrivateEntry(XOM_GROUPS,   20, 'Conseil Professionnel', 'referent.php');
+$globals->menu->addPrivateEntry(XOM_GROUPS,   30, 'Groupes X',             'http://www.polytechnique.net/plan.php');
+$globals->menu->addPrivateEntry(XOM_GROUPS,   40, 'Sites Polytechniciens', 'http://www.polytechnique.net/');
+
+$globals->menu->addPrivateEntry(XOM_INFOS,    00, 'Lettres mensuelles',    'newsletter/');
+$globals->menu->addPrivateEntry(XOM_INFOS,    10, 'Documentations',        'docs/');
+$globals->menu->addPrivateEntry(XOM_INFOS,    20, 'Nous contacter',        'docs/contacts.php');
+$globals->menu->addPrivateEntry(XOM_INFOS,    30, 'Emploi',                'http://www.manageurs.com/');
+
+$globals->menu->addPrivateEntry(XOM_ADMIN,    00, 'Marketing',           'marketing/');
+$globals->menu->addPrivateEntry(XOM_ADMIN,    10, 'Administration',      'admin/');
+$globals->menu->addPrivateEntry(XOM_ADMIN,    20, 'Clear cache',         'clear_all_cache.php');
+
+$globals->menu->addPublicEntry(XOM_US,    00, 'Me connecter !',         'login.php');
+$globals->menu->addPublicEntry(XOM_US,    10, 'M\'inscrire',            'inscription/');
+$globals->menu->addPublicEntry(XOM_US,    20, 'Pourquoi m\'inscrire ?', 'docs/services.php');
+
+$globals->menu->addPublicEntry(XOM_EXT,   00, 'Annuaire de l\'X',       'search.php');
+$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.php');
+$globals->menu->addPublicEntry(XOM_INFOS, 10, 'Nous contacter',         'docs/contacts.php');
+$globals->menu->addPublicEntry(XOM_INFOS, 20, 'FAQ',                    'docs/faq.php');
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
 ?>
index 7aaa9b9..d8d9560 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-    $Id: xorg.globals.inc.php.in,v 1.2 2004-11-21 23:35:32 x2000habouzit Exp $
+    $Id: xorg.globals.inc.php.in,v 1.3 2004-11-22 10:42:52 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("diogenes.core.globals.inc.php");
 require_once("diogenes.database.inc.php");
-require_once("xorg/session.inc.php");
 
 // {{{ class XorgGlobals
 
@@ -31,6 +30,7 @@ class XorgGlobals extends DiogenesCoreGlobals
 {
     var $page    = 'XorgPage';
     var $session = 'XorgSession';
+    var $menu;
 
     /** The x.org version */
     var $version = "@VERSION@";
index a2fb1a9..76bb1b7 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-    $Id: xorg.page.inc.php,v 1.51 2004-11-21 23:35:32 x2000habouzit Exp $
+    $Id: xorg.page.inc.php,v 1.52 2004-11-22 10:42:52 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("diogenes.core.page.inc.php");
@@ -31,7 +31,7 @@ require_once("diogenes.core.page.inc.php");
  * @category XOrgCore
  * @package  XOrgCore
  * @author   Jeremy Lainé <jeremy.laine@polytechnique.org>
- * @version  $Id: xorg.page.inc.php,v 1.51 2004-11-21 23:35:32 x2000habouzit Exp $
+ * @version  $Id: xorg.page.inc.php,v 1.52 2004-11-22 10:42:52 x2000habouzit Exp $
  * @access   public
  * @see      DiogenesCorePage
  */
@@ -128,6 +128,7 @@ class XorgPage extends DiogenesCorePage
             if (isset($_SESSION['suid'])) {
                 $this->caching=false;
             }
+            $this->assign_by_ref('menu', $globals->menu->menu());
             $id = $this->make_id($append_to_id);
             if ($globals->debug) {
                 $this->assign('db_trace', $globals->db->trace_format($this, 'database-debug.tpl'));
diff --git a/include/xorg/menu.inc.php b/include/xorg/menu.inc.php
new file mode 100644 (file)
index 0000000..4f8087f
--- /dev/null
@@ -0,0 +1,118 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2004 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                *
+ ***************************************************************************
+    $Id: menu.inc.php,v 1.1 2004-11-22 10:42:52 x2000habouzit Exp $
+ ***************************************************************************/
+
+// {{{ 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>
+ * @version  $Id: menu.inc.php,v 1.1 2004-11-22 10:42:52 x2000habouzit Exp $
+ * @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 = logged() ? $this->_int : $this->_ext;
+        if (identified()) {
+            $res[XOM_NO][] = Array(0, 'text' => 'Déconnexion', 'url' => 'deconnexion.php');
+        }
+        if (!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 ec66397..13a2578 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: default.tpl,v 1.19 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: default.tpl,v 1.20 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 37920a1..da4b681 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: espace.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: espace.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index b058212..3394f5c 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: humlinux.tpl,v 1.5 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: humlinux.tpl,v 1.6 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
+          {include_php file=menu.conf.php}
           {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>
index 473c8b6..fe7475b 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: linux.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: linux.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 7e66e6e..baa367a 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: liteskin.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: liteskin.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 4236054..a97af16 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: nbviolet.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: nbviolet.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 8658745..469172f 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: newxorg.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: newxorg.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index d136161..547d856 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: oldtimes.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: oldtimes.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 7599c2f..e600c69 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: openweb.tpl,v 1.3 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: openweb.tpl,v 1.4 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <a href="{$menu_url|url}">{$menu_item}</a>
+          {foreach item=mi from=$menu_list}
+          <a href="{$mi.url|url}">{$mi.text}</a>
           {/foreach}
           {/foreach}
           {perms level=admin}
index c8bd814..6203694 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: sharky.tpl,v 1.9 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: sharky.tpl,v 1.10 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 367cc02..26a0116 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: spectral.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: spectral.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 2b6f57d..539f333 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: trapped.tpl,v 1.4 2004-11-17 22:16:31 x2000habouzit Exp $
+        $Id: trapped.tpl,v 1.5 2004-11-22 10:42:53 x2000habouzit Exp $
  ***************************************************************************}
 
 <?xml version="1.0" encoding="iso-8859-1"?>
       </tr>
       <tr>
         <td id="body-menu">
-          {include_php file=menu.conf.php}
           {foreach key=menu_title item=menu_list from=$menu}
           {if $menu_title}
           <div class="menu_title">{$menu_title}</div>
           {/if}
-          {foreach key=menu_item item=menu_url from=$menu_list}
-          <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
+          {foreach item=mi from=$menu_list}
+          <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
           {/foreach}
           {/foreach}
           {perms level=admin}
index 3c27b76..315bad9 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: skins.tpl,v 1.9 2004-10-24 14:41:11 x2000habouzit Exp $
+        $Id: skins.tpl,v 1.10 2004-11-22 10:42:52 x2000habouzit Exp $
  ***************************************************************************}
 
 
@@ -42,17 +42,12 @@ Pour toute information compl
 </p>
 
 <form action="{$smarty.server.REQUEST_URI}" method="post">
-  <div class="center">
-    <input type="submit" value="Enregistrer" name="submit" />
-    <br />
-    <br />
-  </div>
   <table id="skin" cellpadding="0" cellspacing="0" summary="Choix de skins">
 {dynamic}
 {foreach item=skin from=$skins}    
     <tr>
       <td class="skigauche">
-        <input type="radio" name="newskin" value="{$skin.id}" {if $smarty.session.skin_id eq $skin.id}checked="checked"{/if} />
+        <input type="radio" name="newskin" value="{$skin.id}" {if $smarty.session.skin_id eq $skin.id}checked="checked"{/if} onclick="this.form.submit();" />
       </td>
       <td class="skimilieu">
         <strong>{$skin.name}</strong>
@@ -70,11 +65,6 @@ Pour toute information compl
 {/foreach}
 {/dynamic}
   </table>
-  <div class="center">
-    <br />
-    <input type="submit" value="Enregistrer" name="submit" />
-  </div>
-
 </form>
 
 {* vim:set et sw=2 sts=2 sws=2: *}