From 8384897dceb353a3209bf0e4d5bf8af8f4b9405e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Sun, 16 Nov 2008 06:13:48 +0000 Subject: [PATCH] Look: A lot of enhancements in Dolibarr skins --- .../menus/barre_top/eldy_frontoffice.php | 2 +- htdocs/includes/menus/barre_top/empty.php | 21 +- htdocs/includes/menus/barre_top/rodolphe.php | 358 ++++++++++-------- htdocs/theme/auguria/auguria.css.php | 38 +- htdocs/theme/bluelagoon/bluelagoon.css | 9 - htdocs/theme/eldy/eldy.css.php | 44 ++- htdocs/theme/freelug/freelug.css.php | 25 +- htdocs/theme/rodolphe/rodolphe.css | 11 - htdocs/theme/yellow/yellow.css.php | 33 +- 9 files changed, 290 insertions(+), 251 deletions(-) diff --git a/htdocs/includes/menus/barre_top/eldy_frontoffice.php b/htdocs/includes/menus/barre_top/eldy_frontoffice.php index 0fd70c15859..eb28268b5de 100644 --- a/htdocs/includes/menus/barre_top/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_frontoffice.php @@ -18,7 +18,7 @@ */ /** - \file htdocs/includes/menus/barre_top/eldy_backoffice.php + \file htdocs/includes/menus/barre_top/eldy_frontoffice.php \brief Gestionnaire nomme eldy du menu du haut \version $Id$ diff --git a/htdocs/includes/menus/barre_top/empty.php b/htdocs/includes/menus/barre_top/empty.php index 6763be7a6f1..d690eff1f09 100644 --- a/htdocs/includes/menus/barre_top/empty.php +++ b/htdocs/includes/menus/barre_top/empty.php @@ -29,6 +29,8 @@ class MenuTop { var $require_left=array("empty"); // If this top menu handler must be used with a particular left menu handler + var $hideifnotallowed=false; // Put 0 for back office menu, 1 for front office menu + var $atarget=""; // To store arget to use in menu links @@ -68,12 +70,14 @@ class MenuTop { // Code to show personalized menus require_once(DOL_DOCUMENT_ROOT."/core/menubase.class.php"); - $menuArbo = new Menubase($this->db,'eldy','top'); - $tabMenu = $menuArbo->menuTopCharger(2,$_SESSION['mainmenu'],''); - for($i=0;$i<count($tabMenu);$i++) + $menuArbo = new Menubase($this->db,'empty','top'); + $tabMenu = $menuArbo->menuTopCharger(2,$_SESSION['mainmenu'],'empty'); + + for($i=0; $i<count($tabMenu); $i++) { if ($tabMenu[$i]['enabled'] == true) { + $idsel=(empty($tabMenu[$i]['mainmenu'])?'id="none" ':'id="'.$tabMenu[$i]['mainmenu'].'" '); if ($tabMenu[$i]['right'] == true) { $url=DOL_URL_ROOT.$tabMenu[$i]['url']; @@ -81,14 +85,15 @@ class MenuTop { else $url.='&'; $url.='mainmenu='.$tabMenu[$i]['mainmenu'].'&leftmenu='; $url.="&idmenu=".$tabMenu[$i]['rowid']; - // Define idsel - if (! empty($_GET["idmenu"]) && $tabMenu[$i]['rowid'] == $_GET["idmenu"]) $idsel='id="sel" '; - else $idsel=''; - print '<td class="tmenu"><a class="tmenu" '.$idsel.'href="'.$url.'"'.($this->atarget?" target=$this->atarget":"").'>'.$tabMenu[$i]['titre'].'</a></td>'; + if (! empty($_SESSION['idmenu']) && $tabMenu[$i]['rowid'] == $_SESSION['idmenu']) $class='class="tmenusel"'; + else $class='class="tmenu"'; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.$url.'"'.($this->atarget?" target=$this->atarget":"").'>'; + print $tabMenu[$i]['titre']; + print '</a></td>'; } else { - print '<td class="tmenu"><font class="tmenudisabled">'.$tabMenu[$i]['titre'].'</font></td>'; + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$tabMenu[$i]['titre'].'</a></td>'; } } } diff --git a/htdocs/includes/menus/barre_top/rodolphe.php b/htdocs/includes/menus/barre_top/rodolphe.php index 7ecaadac020..d2a17004462 100644 --- a/htdocs/includes/menus/barre_top/rodolphe.php +++ b/htdocs/includes/menus/barre_top/rodolphe.php @@ -1,6 +1,6 @@ <?php -/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> +/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2007 Regis Houssin <regis@dolibarr.fr> * * 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 @@ -18,26 +18,28 @@ */ /** - \file htdocs/includes/menus/barre_top/rodolphe.php - \brief Gestionnaire menu haut Rodolphe - \version $Id$ - + \file htdocs/includes/menus/barre_top/rodolphe.php + \brief Gestionnaire nomme eldy du menu du haut + \version $Id$ + \remarks La construction d'un gestionnaire pour le menu du haut est simple: - \remarks Toutes les entrees de menu e faire apparaitre dans la barre du haut - \remarks Toutes les entetes de menu a faire apparaitre dans la barre du haut + \remarks Toutes les entrees de menu a faire apparaitre dans la barre du haut \remarks doivent etre affichees par <a class="tmenu" href="...?mainmenu=...">...</a> + \remarks ou si menu selectionne <a class="tmenusel" href="...?mainmenu=...">...</a> */ /** - \class MenuTop - \brief Classe permettant la gestion par defaut du menu du haut -*/ - + * \class MenuTop + * \brief Classe permettant la gestion du menu du haut Rodolphe + */ class MenuTop { - var $require_left=array(); // Si doit etre en phase avec un gestionnaire de menu gauche particulier - var $atarget=""; // Valeur du target a utiliser dans les liens + var $require_left=array(); // Si doit etre en phase avec un gestionnaire de menu gauche particulier + var $hideifnotallowed=false; // Put 0 for back office menu, 1 for front office menu + + var $atarget=""; // Valeur du target a utiliser dans les liens + /** * \brief Constructeur @@ -45,7 +47,11 @@ class MenuTop { */ function MenuTop($db) { + global $langs; $this->db=$db; + + $langs->setTransFromTab("Company",$langs->trans("ThirdParty")); + $langs->setTransFromTab("NewCompany",$langs->trans("NewThirdParty")); } @@ -54,8 +60,8 @@ class MenuTop { */ function showmenu() { - global $user,$conf,$langs,$dolibarr_main_db_name; - + global $user,$conf,$langs,$dolibarr_main_db_name;; + // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; @@ -65,43 +71,76 @@ class MenuTop { print '<table class="tmenu"><tr class="tmenu">'; // Home - $id=""; - - if ($_GET["mainmenu"] == "home" || ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "home")) + $class=""; + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "home") { - $id="sel"; $_SESSION['idmenu']=''; - } - - if (! ereg("^".DOL_URL_ROOT."\/(adherents|comm|commande|compta|contrat|product|fichinter|fourn|telephonie|energie|boutique|oscommerce_ws|projet)\/",$_SERVER["PHP_SELF"]) - && (! $_SESSION['idmenu'] && ! $_GET["idmenu"])) - { - $id="sel"; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } - else { - $id=""; + else + { + $class = 'class="tmenu"'; } - print '<td class="tmenu"><a class="tmenu" '.($id?'id="'.$id.'" ':'').'href="'.DOL_URL_ROOT.'/index.php?mainmenu=home&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Home").'</a></td>'; + $idsel='id="home" '; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/index.php?mainmenu=home&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Home").'</a></td>'; - // Adherent - if ($conf->adherent->enabled && $user->rights->adherent->lire) - { - $langs->load("members"); + // Third parties + if ($conf->societe->enabled || $conf->fournisseur->enabled) + { + $langs->load("companies"); + $langs->load("suppliers"); + $class=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members") + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies") { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } - elseif (ereg("^".DOL_URL_ROOT."\/adherents\/",$_SERVER["PHP_SELF"])) + else { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class = 'class="tmenu"'; + } + + $idsel='id="companies" '; + if (($conf->societe->enabled && $user->rights->societe->lire) + || ($conf->fournisseur->enabled && $user->rights->fournisseur->lire)) + { + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/index.php?mainmenu=companies&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("ThirdParties").'</a></td>'; + } + else + { + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$langs->trans("ThirdParties").'</a></td>'; + } + } + + + // Products-Services + if ($conf->produit->enabled || $conf->service->enabled) + { + $langs->load("products"); + + $class=""; + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "products") + { + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } else { $class = 'class="tmenu"'; } - - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/adherents/index.php?mainmenu=members"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Members").'</a></td>'; + $chaine=""; + if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); } + if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; } + if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); } + + $idsel='id="products" '; + if ($user->rights->produit->lire) + { + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/product/index.php?mainmenu=products&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$chaine.'</a></td>'; + } + else + { + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$chaine.'</a></td>'; + } } // Commercial @@ -114,138 +153,125 @@ class MenuTop { if ($showcommercial)*/ if ($conf->commercial->enabled) { - $langs->load("commercial"); - + $langs->load("commercial"); + + $class=""; + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "commercial") + { + $class='class="tmenusel"'; $_SESSION['idmenu']=''; + } + else + { + $class = 'class="tmenu"'; + } + + $idsel='id="commercial" '; + if($user->rights->societe->lire) + { + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/comm/index.php?mainmenu=commercial&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Commercial").'</a></td>'; + } + else + { + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$langs->trans("Commercial").'</a></td>'; + } + } + + // Financial + if ($conf->compta->enabled || $conf->comptaexpert->enabled || $conf->banque->enabled + || $conf->facture->enabled) + { + $langs->load("compta"); + $class=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "commercial") + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "accountancy") + { + $class='class="tmenusel"'; $_SESSION['idmenu']=''; + } + else { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class = 'class="tmenu"'; } - elseif (ereg("^".DOL_URL_ROOT."\/(comm|commande|contrat)\/",$_SERVER["PHP_SELF"]) - && (! $_SESSION['idmenu'] && ! $_GET["idmenu"])) + + $idsel='id="accountancy" '; + if ($user->rights->compta->resultat->lire || $user->rights->comptaexpert->plancompte->lire + || $user->rights->facture->lire || $user->rights->banque->lire) { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("MenuFinancial").'</a></td>'; } else { - $class = 'class="tmenu"'; + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$langs->trans("MenuFinancial").'</a></td>'; } - - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/comm/index.php?mainmenu=commercial"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Commercial").'</a></td>'; - } - - // Compta/treso (sert pour banque, tva, entites a facturer...) - if ($conf->compta->enabled || $conf->comptaexpert->enabled || $conf->banque->enabled - || $conf->commande->enabled || $conf->facture->enabled) - { -// if ($user->rights->compta->general->lire || $user->rights->comptaexpert->general->lire) -// { - $langs->load("compta"); - - $class=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "compta") - { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; - } - elseif (ereg("^".DOL_URL_ROOT."\/compta\/",$_SERVER["PHP_SELF"])) - { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; - } - else - { - $class = 'class="tmenu"'; - } - - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("MenuFinancial").'</a></td>'; -// } } // Projects - if ($conf->projet->enabled && $user->rights->projet->lire) + if ($conf->projet->enabled) { $langs->load("projects"); - + $class=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "product") + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "project") { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; - } - if (ereg("^".DOL_URL_ROOT."\/projet\/[^w]",$_SERVER["PHP_SELF"])) - { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } else { $class = 'class="tmenu"'; } - - $chaine.=$langs->trans("Projects"); - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/projet/index.php?mainmenu=project">'.$chaine.'</a></td>'; - } - - // Produit/service - if (($conf->produit->enabled || $conf->service->enabled) && $user->rights->produit->lire) - { - $langs->load("products"); - - $class=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "product") - { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; - } - elseif (ereg("^".DOL_URL_ROOT."\/product\/",$_SERVER["PHP_SELF"])) + + $idsel='id="project" '; + if ($user->rights->projet->lire) { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/projet/index.php?mainmenu=project&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Projects").'</a></td>'; } else { - $class = 'class="tmenu"'; - } - $chaine=""; - if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); } - if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; } - if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); } - - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/product/index.php?mainmenu=products"'.($this->atarget?" target=$this->atarget":"").'>'.$chaine.'</a></td>'; - + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$langs->trans("Projects").'</a></td>'; + } } - // Supplier - if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) + // Tools + if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled + || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN) { - $langs->load("suppliers"); - + $langs->load("other"); + $class=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "suppliers") + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "tools") { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; - } - elseif (ereg("^".DOL_URL_ROOT."\/fourn\/",$_SERVER["PHP_SELF"])) - { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } else { $class = 'class="tmenu"'; } - - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/fourn/index.php?mainmenu=suppliers"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Suppliers").'</a></td>'; + + $idsel='id="tools" '; + if ($user->rights->mailing->lire || $user->rights->bookmark->lire || $user->rights->export->lire) + { + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/index.php?mainmenu=tools&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Tools").'</a></td>'; + } + else + { + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$langs->trans("Tools").'</a></td>'; + } } - + // Telephonie if ($conf->telephonie->enabled && $user->rights->telephonie->lire) { $class=""; if (ereg("^".DOL_URL_ROOT."\/telephonie\/",$_SERVER["PHP_SELF"])) { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } else { $class = 'class="tmenu"'; } - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/telephonie/index.php?mainmenu=telephonie"'.($this->atarget?" target=$this->atarget":"").'>Telephonie</a></td>'; + $idsel='id="telephonie" '; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/telephonie/index.php?mainmenu=telephonie"'.($this->atarget?" target=$this->atarget":"").'>Telephonie</a></td>'; } // Energie @@ -255,77 +281,109 @@ class MenuTop { $class=""; if (ereg("^".DOL_URL_ROOT."\/energie\/",$_SERVER["PHP_SELF"])) { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } else { $class = 'class="tmenu"'; } - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/energie/index.php?mainmenu=energie"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Energy").'</a></td>'; + $idsel='id="energie" '; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/energie/index.php?mainmenu=energie"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Energy").'</a></td>'; } - - // OSCommerce 1 + + // OSCommerce 1 if ($conf->boutique->enabled) { $langs->load("shop"); + $class=""; - if (ereg("^".DOL_URL_ROOT."\/boutique\/",$_SERVER["PHP_SELF"])) + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "shop") { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } else { $class = 'class="tmenu"'; } - - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/boutique/index.php?mainmenu=boutique"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("OSCommerce").'</a></td>'; + + $idsel='id="shop" '; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/boutique/index.php?mainmenu=shop&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("OSCommerce").'</a></td>'; } - + // OSCommerce 2 if ($conf->oscommerce2->enabled) { $langs->load("shop"); + $class=""; - if (ereg("^".DOL_URL_ROOT."\/oscommerce_ws\/",$_SERVER["PHP_SELF"])) + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "shop") { - $class='class="tmenu" id="sel"'; $_SESSION['idmenu']=''; + $class='class="tmenusel"'; $_SESSION['idmenu']=''; } else { $class = 'class="tmenu"'; } - - print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/oscommerce_ws/index.php?mainmenu=oscommerce2"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("OSCommerce").'</a></td>'; + + $idsel='id="shop" '; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/oscommerce_ws/index.php?mainmenu=shop&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("OSCommerce").'</a></td>'; } - + // Members + if ($conf->adherent->enabled) + { + // $langs->load("members"); Added in main file + + $class=""; + if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members") + { + $class='class="tmenusel"'; $_SESSION['idmenu']=''; + } + else + { + $class = 'class="tmenu"'; + } + + $idsel='id="members" '; + if ($user->rights->adherent->lire) + { + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/adherents/index.php?mainmenu=members&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("MenuMembers").'</a></td>'; + } + else + { + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$langs->trans("MenuMembers").'</a></td>'; + } + } + + // Affichage des menus personnalises require_once(DOL_DOCUMENT_ROOT."/core/menubase.class.php"); - $menuArbo = new Menubase($this->db,'rodolphe','top'); - $tabMenu = $menuArbo->menuTopCharger(2,$_SESSION['mainmenu'],'rodolphe'); + $menuArbo = new Menubase($this->db,'eldy','top'); + $tabMenu = $menuArbo->menuTopCharger(0,$_SESSION['mainmenu'],'eldy'); - for($i=0;$i<count($tabMenu);$i++) + for($i=0; $i<count($tabMenu); $i++) { if ($tabMenu[$i]['enabled'] == true) { - if ($tabMenu[$i]['right'] == true) + $idsel=(empty($tabMenu[$i]['mainmenu'])?'id="none" ':'id="'.$tabMenu[$i]['mainmenu'].'" '); + if ($tabMenu[$i]['right'] == true) { $url=DOL_URL_ROOT.$tabMenu[$i]['url']; if (! eregi('\?',DOL_URL_ROOT.$tabMenu[$i]['url'])) $url.='?'; else $url.='&'; $url.='mainmenu='.$tabMenu[$i]['mainmenu'].'&leftmenu='; $url.="&idmenu=".$tabMenu[$i]['rowid']; - // Define idsel - if (! empty($_GET["idmenu"]) && $tabMenu[$i]['rowid'] == $_GET["idmenu"]) $idsel='id="sel" '; - elseif (! empty($_GET["mainmenu"]) && $_GET["mainmenu"] == $tabMenu[$i]['mainmenu']) $idsel='id="sel" '; - else $idsel=''; - print '<td class="tmenu"><a class="tmenu" '.$idsel.'href="'.$url.'"'.($this->atarget?" target=$this->atarget":"").'>'.$tabMenu[$i]['titre'].'</a></td>'; + if (! empty($_SESSION['idmenu']) && $tabMenu[$i]['rowid'] == $_SESSION['idmenu']) $class='class="tmenusel"'; + else $class='class="tmenu"'; + print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.$url.'"'.($this->atarget?" target=$this->atarget":"").'>'; + print $tabMenu[$i]['titre']; + print '</a></td>'; } else { - print '<td class="tmenu"><font class="tmenudisabled">'.$tabMenu[$i]['titre'].'</font></td>'; + if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$tabMenu[$i]['titre'].'</a></td>'; } } } @@ -333,7 +391,7 @@ class MenuTop { print '</tr></table>'; } - + } -?> \ No newline at end of file +?> diff --git a/htdocs/theme/auguria/auguria.css.php b/htdocs/theme/auguria/auguria.css.php index 5903255cf67..236bdf7660e 100644 --- a/htdocs/theme/auguria/auguria.css.php +++ b/htdocs/theme/auguria/auguria.css.php @@ -160,6 +160,7 @@ div.tmenu .tmenudisabled padding-right: 6px; padding-top: 3px; cursor: not-allowed; + font-weight: normal; } table.tmenu @@ -178,7 +179,6 @@ a.tmenu:link height: 21px; font-weight: normal; } - a.tmenu:visited { color:#FFFFFF; @@ -189,8 +189,7 @@ a.tmenu:visited height: 21px; font-weight: normal; } - -a.tmenusel +a.tmenu:hover { color:#234046; text-decoration:none; @@ -201,36 +200,43 @@ a.tmenusel font-weight: normal; background: #FFFFFF; } -a.tmenu:hover +a.tmenu:active { color:#234046; + background:#4F9EC9; text-decoration:none; padding-left:5px; padding-right:5px; padding-top: 2px; height: 21px; - font-weight: normal; - background: #FFFFFF; + font-weight: normal; } - -a.tmenu:active +a.tmenusel { color:#234046; - background:#4F9EC9; text-decoration:none; padding-left:5px; padding-right:5px; padding-top: 2px; height: 21px; - font-weight: normal; + font-weight: normal; + background: #FFFFFF; } - -font.tmenudisabled +a.tmenusel:link { - color: #9FCED9; - font-weight: normal; - font-size: 12px; - cursor: not-allowed; + font-weight: normal; +} +a.tmenusel:visited +{ + font-weight: normal; +} +a.tmenusel:hover +{ + font-weight: normal; +} +a.tmenusel:active +{ + font-weight: normal; } diff --git a/htdocs/theme/bluelagoon/bluelagoon.css b/htdocs/theme/bluelagoon/bluelagoon.css index 4aec4b65d94..6896bbb3773 100644 --- a/htdocs/theme/bluelagoon/bluelagoon.css +++ b/htdocs/theme/bluelagoon/bluelagoon.css @@ -141,15 +141,6 @@ a.tmenu:hover font-size:12px; } -font.tmenudisabled -{ - color: #93a5aa; - padding: 0em 1em; - margin: 0em 0em 1em 0em; - font-size:12px; -} - - /* Pour menu TOP auguria uniquement */ * html div.tmenu li a diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php index ebbd68e7cb9..fe584ea7dcd 100644 --- a/htdocs/theme/eldy/eldy.css.php +++ b/htdocs/theme/eldy/eldy.css.php @@ -140,8 +140,6 @@ form /* Styles de positionnement des zones */ /* ============================================================================== */ -/* Removed div.vmenuplusfiche, replaced div.vmenu by td.vmenu, removed div.fiche */ - td.vmenu { margin-right: 2px; @@ -187,6 +185,7 @@ div.tmenu .tmenudisabled padding-right: 6px; padding-top: 3px; cursor: not-allowed; + font-weight: normal; } table.tmenu @@ -214,59 +213,64 @@ a.tmenu:visited font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; } -a.tmenusel +a.tmenu:hover { color: #234046; padding: 0px 5px 0px 5px; margin: 0px 0px 0px 0px; + text-decoration: none; font-size: 12px; font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; - background: #F4F4F4; + background: #dee7ec; border-right: 1px solid #555555; border-top: 1px solid #D8D8D8; border-left: 1px solid #D8D8D8; - border-bottom: 2px solid #F4F4F4; + border-bottom: 2px solid #dee7ec; } -a.tmenu:hover +a.tmenu:active { - color: #234046; padding: 0px 5px 0px 5px; margin: 0px 0px 0px 0px; text-decoration: none; font-size: 12px; font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; - background: #dee7ec; + background:#F4F4F4; border-right: 1px solid #555555; border-top: 1px solid #D8D8D8; border-left: 1px solid #D8D8D8; border-bottom: 2px solid #dee7ec; } - -a.tmenu:active +a.tmenusel { + color: #234046; padding: 0px 5px 0px 5px; margin: 0px 0px 0px 0px; - text-decoration: none; font-size: 12px; font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; - background:#F4F4F4; + background: #F4F4F4; border-right: 1px solid #555555; border-top: 1px solid #D8D8D8; border-left: 1px solid #D8D8D8; - border-bottom: 2px solid #dee7ec; + border-bottom: 2px solid #F4F4F4; } - -font.tmenudisabled +a.tmenusel:link +{ + font-weight: normal; +} +a.tmenusel:visited +{ + font-weight: normal; +} +a.tmenusel:hover +{ + font-weight: normal; +} +a.tmenusel:active { - color: #93a5aa; - padding: 0px 5px 0px 5px; - margin: 0px 0px 2px 0px; font-weight: normal; - font-size: 12px; - cursor: not-allowed; } diff --git a/htdocs/theme/freelug/freelug.css.php b/htdocs/theme/freelug/freelug.css.php index 7f4d9226189..8152ba84e1d 100644 --- a/htdocs/theme/freelug/freelug.css.php +++ b/htdocs/theme/freelug/freelug.css.php @@ -177,9 +177,8 @@ div.tmenu .tmenudisabled { color: #757575; font-size: 12px; - padding-left:10px; - padding-right:10px; - padding-top:3px; + padding: 0px 8px; + margin: 0px 0px 6px 0px; cursor: not-allowed; } @@ -216,14 +215,6 @@ a.tmenu:visited font-weight: bold; font-size:12px; } -a.tmenusel -{ - color: #202020; - background: #bbbbcc; - padding: 0px 8px; - margin: 0px 0px 6px 0px; - border: 1px solid #eeeeff; -} a.tmenu:hover { color: #202020; @@ -234,15 +225,13 @@ a.tmenu:hover text-decoration: none; } -font.tmenudisabled -{ - color: #93a5aa; +a.tmenusel +{ + color: #202020; + background: #bbbbcc; padding: 0px 8px; margin: 0px 0px 6px 0px; - border: 0px; - font-weight:bold; - font-size:12px; - cursor: not-allowed; + border: 1px solid #eeeeff; } diff --git a/htdocs/theme/rodolphe/rodolphe.css b/htdocs/theme/rodolphe/rodolphe.css index dbf18de5482..2acc8013f43 100644 --- a/htdocs/theme/rodolphe/rodolphe.css +++ b/htdocs/theme/rodolphe/rodolphe.css @@ -169,17 +169,6 @@ a.tmenu:hover text-decoration: none; } -font.tmenudisabled -{ - color: #93a5aa; - padding: 0em 1em; - margin: 0em 0em 1.5em 0em; - border: 1px solid #b3c5cc; - font-weight:bold; - font-size:12px; -} - - /* Pour menu TOP auguria uniquement */ div.tmenu ul { diff --git a/htdocs/theme/yellow/yellow.css.php b/htdocs/theme/yellow/yellow.css.php index 0a16a6c7ff3..79e7e1169d4 100644 --- a/htdocs/theme/yellow/yellow.css.php +++ b/htdocs/theme/yellow/yellow.css.php @@ -123,8 +123,6 @@ form /* Styles de positionnement des zones */ /* ============================================================================== */ -/* Removed div.vmenuplusfiche, replaced div.vmenu by td.vmenu, removed div.fiche */ - td.vmenu { margin-right: 2px; @@ -155,13 +153,20 @@ div.tmenu border-bottom: 1px solid #555555; padding: 0px 0px 0px 0px; margin: 0px 0px 2px 0px; - font-weight:bold; - font-size:12px; + font-weight: bold; + font-size: 12px; height: 20px; background: #dcdcb3; color: #000000; text-decoration: none; } +div.tmenu .tmenudisabled +{ + color: #757575; + font-size: 12px; + padding: 0px 5px; + cursor: not-allowed; +} table.tmenu { @@ -186,13 +191,6 @@ a.tmenu:visited font-weight:bold; font-size:12px; } -a.tmenusel -{ - color: #234046; - background: #eeeecc; - padding: 0px 5px; - border: 1px solid #eeeecc; -} a.tmenu:hover { color: #234046; @@ -202,17 +200,16 @@ a.tmenu:hover text-decoration: none; } -font.tmenudisabled -{ - color: #93a5aa; +a.tmenusel +{ + color: #234046; + background: #eeeecc; padding: 0px 5px; - border: 0px; - font-weight:bold; - font-size:12px; - cursor: not-allowed; + border: 1px solid #eeeecc; } + /* Pour menu TOP auguria uniquement */ * html div.tmenu li a { -- GitLab