diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index a825096ebe6..d53b806c521 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -20,7 +20,7 @@ * $Source$ */ -/*! +/** \file htdocs/admin/ihm.php \brief Page de configuration du de l'interface homme machine \version $Revision$ @@ -46,10 +46,12 @@ $searchformtitle=array($langs->trans("Companies"),$langs->trans("Contacts"),$lan if ($_POST["action"] == 'update') { - dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"]); - dolibarr_set_const($db, "SIZE_LISTE_LIMIT", $_POST["size_liste_limit"]); - dolibarr_set_const($db, "MAIN_MENU_BARRETOP", $_POST["main_menu_barretop"]); dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"]); + dolibarr_set_const($db, "MAIN_MENU_BARRETOP", $_POST["main_menu_barretop"]); + dolibarr_set_const($db, "MAIN_MENU_BARRELEFT", $_POST["main_menu_barreleft"]); + dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"]); + + dolibarr_set_const($db, "SIZE_LISTE_LIMIT", $_POST["size_liste_limit"]); dolibarr_set_const($db, "MAIN_MOTD", trim($_POST["main_motd"])); dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT",$_POST["main_searchform_contact"]); @@ -77,35 +79,18 @@ if ($_GET["action"] == 'edit') { print '
'; + clearstatcache(); + print ''; print ''; - print ''; - print ''; - print ''; - + // Menu top print ''; print ''; - print ''; + print ''; + + // Theme + print ''; + print ''; + + // Taille max des listes + print ''; + + // Message of the day print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Skin").''; - print ''; + // Langue par defaut + print '
'.$langs->trans("DefaultLanguage").''; + $html=new Form($db); + $html->select_lang(MAIN_LANG_DEFAULT,'main_lang_default'); print '
'.$langs->trans("MaxSizeList").'
'.$langs->trans("MenuTopManager").''; print '
'.$langs->trans("DefaultLanguage").''; - $html=new Form($db); - $html->select_lang(MAIN_LANG_DEFAULT,'main_lang_default'); + // Menu left + print '
'.$langs->trans("MenuLeftManager").''; print '
'.$langs->trans("Skin").''; + print ''; + print '
'.$langs->trans("MaxSizeList").'
'.$langs->trans("MessageOfDay").'

'; @@ -160,13 +192,18 @@ else print ''; print ''; - print ''; - print ''; + + print ''; print ''; - print ''; + print ''; + print ''; + print ''; print ''; diff --git a/htdocs/includes/menus/barre_left/default.php b/htdocs/includes/menus/barre_left/default.php new file mode 100644 index 00000000000..4631ed553a9 --- /dev/null +++ b/htdocs/includes/menus/barre_left/default.php @@ -0,0 +1,34 @@ + + * + * 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$ + * $Source$ + * + */ + +/** + \file htdocs/includes/menus/barre_left/default.php + \brief Gestionnaire du menu de gauche + \version $Revision$ +*/ + + +// Le gestionnaire par defaut ne fait rien: C'est donc le menu défini dans les +// fichiers pre.inc.php du répertoire de la page qui sont utilisés. + + +?> diff --git a/htdocs/includes/menus/barre_left/eldy.php b/htdocs/includes/menus/barre_left/eldy.php new file mode 100644 index 00000000000..640af363e9a --- /dev/null +++ b/htdocs/includes/menus/barre_left/eldy.php @@ -0,0 +1,56 @@ + + * + * 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$ + * $Source$ + * + */ + +/** + \file htdocs/includes/menus/barre_left/eldy.php + \brief Gestionnaire du menu de gauche + \version $Revision$ +*/ + +// Ce gestionnaire de menu écrase le tableau $menu pour le définir selon +// ces propres règles prioritairement aux définitions des fichiers pre.inc.php + +$newmenu = new Menu(); + +$newmenu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers")); + +/* +$class=""; +if ($_SESSION["topmenu"] && $_SESSION["topmenu"] == "commercial") + { + $class='class="tmenu" id="sel"'; + } +elseif (ereg("^".DOL_URL_ROOT."\/fourn\/",$_SERVER["PHP_SELF"])) + { + $class='class="tmenu" id="sel"'; + } +else + { + $class = 'class="tmenu"'; + } + +print ''.$langs->trans("Fournisseur").''; +*/ + +//$menu=$newmenu->liste; + +?> diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 117693fd0aa..63f414678b7 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -71,6 +71,7 @@ PermanentLeftSearchForm=Permanent search form on left menu Skin=Skin theme MaxSizeList=Max length for list MenuTopManager=Top menu manager +MenuLeftManager=Left menu manager MessageOfDay=Message of day DefaultLanguage=Default language to use (language code) SystemSuccessfulyUpdated=Your sustem has been updated successfully diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index febae08a98f..a872abd25c1 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -71,6 +71,7 @@ PermanentLeftSearchForm=Zone de recherche permanente du menu de gauche Skin=Thème visuel MaxSizeList=Longueur maximale des listes MenuTopManager=Gestionnaire du menu du haut +MenuLeftManager=Gestionnaire du menu de gauche MessageOfDay=Message du jour DefaultLanguage=Langue par défaut à utiliser (code langue) SystemSuccessfulyUpdated=Votre système a été mis à jour avec succès diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index db96c2a197d..34ab6501915 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -24,7 +24,7 @@ * */ -/*! +/** \file htdocs/master.inc.php \brief Fichier de formatage générique des ecrans Dolibarr \version $Revision$ @@ -107,7 +107,7 @@ if (defined("MAIN_NOT_INSTALLED")) } -/*! +/** * \brief Affiche en-tête html + la barre de menu supérieure * \param head lignes d'en-tete head * \param title titre page web @@ -213,24 +213,32 @@ function top_menu($head, $title="", $target="") } -/*! +/** * \brief Affiche barre de menu gauche * \param menu Objet du menu gauche * \param help_url Url pour le lien aide ('' par defaut) - * \param form_search Formulaire de recherche permanant - * \param author Auteur de la page pour ajout en en-tete html + * \param form_search Formulaire de recherche permanant supplémentaire */ -function left_menu($menu, $help_url='', $form_search='', $author='') +function left_menu($menu, $help_url='', $form_search='') { global $user, $conf, $langs; + + if (! defined(MAIN_MENU_BARRELEFT)) + { + define("MAIN_MENU_BARRELEFT","default.php"); + } + + // Si un gestionnaire de menu gauche est actif, on l'utilise: + // Ce gestionnnaire est libre d'écrasé ou non l'objet $menu qui détermine le menu à afficher. + require(DOL_DOCUMENT_ROOT ."/includes/menus/barre_left/".MAIN_MENU_BARRELEFT); + + + print '
'."\n"; - /* - * Colonne de gauche - * - */ + // Colonne de gauche print "\n\n"; print '
'."\n"; @@ -253,9 +261,7 @@ function left_menu($menu, $help_url='', $form_search='', $author='') print '
'; } - /* - * Affichage des zones de recherche permanantes - */ + // Affichage des zones de recherche permanantes $addzonerecherche=0; if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_SOCIETE") && MAIN_SEARCHFORM_SOCIETE > 0) $addzonerecherche=1; if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_CONTACT") && MAIN_SEARCHFORM_CONTACT > 0) $addzonerecherche=1; @@ -286,19 +292,13 @@ function left_menu($menu, $help_url='', $form_search='', $author='') print '
'; } - /* - * Zone de recherche supplémentaire - */ - + // Zone de recherche supplémentaire if (strlen($form_search) > 0) { print $form_search; } - /* - * Lien vers l'aide en ligne - */ - + // Lien vers l'aide en ligne if (strlen($help_url) > 0) { @@ -319,7 +319,7 @@ function left_menu($menu, $help_url='', $form_search='', $author='') -/*! +/** * \brief Affiche une zone de recherche * \param urlaction url du post * \param urlobject url du lien sur titre de la zone de recherche @@ -340,7 +340,7 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$ } -/*! +/** * \brief Impression du pied de page * \param foot Non utilisé */
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Skin").'' . MAIN_THEME . '
'.$langs->trans("MaxSizeList").'' . SIZE_LISTE_LIMIT . '
'.$langs->trans("DefaultLanguage").'' . MAIN_LANG_DEFAULT . '
'.$langs->trans("MenuTopManager").''; $filelib=eregi_replace('\.php$','',MAIN_MENU_BARRETOP); print $filelib; print '
'.$langs->trans("DefaultLanguage").'' . MAIN_LANG_DEFAULT . '
'.$langs->trans("MenuLeftManager").''; + $filelib=eregi_replace('\.php$','',MAIN_MENU_BARRELEFT); + print $filelib; + print '
'.$langs->trans("Skin").'' . MAIN_THEME . '
'.$langs->trans("MaxSizeList").'' . SIZE_LISTE_LIMIT . '
'.$langs->trans("MessageOfDay").'' . stripslashes(nl2br(MAIN_MOTD)) . '