From cf0982b6d2098748c7111de33f95b76d9303aa99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Aug 2004 22:18:13 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Si=20toutes=20les=20zones=20de=20recherc?= =?UTF-8?q?he=20permanantes=20du=20menu=20gauche=20sont=20d=E9sactiv=E9es,?= =?UTF-8?q?=20il=20ne=20faut=20pas=20de=20s=E9parateur=20sur=20le=20menu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/main.inc.php | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bec2f032bd4..e915a8a75d1 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -575,12 +575,19 @@ function left_menu($menu, $help_url='', $form_search='', $author='') /* * Affichage des zones de recherche permanantes */ - print '
'."\n"; + $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; + if (($conf->produit->enabled || $conf->service->enabled) && defined("MAIN_SEARCHFORM_PRODUITSERVICE") && MAIN_SEARCHFORM_PRODUITSERVICE > 0) $addzonerecherche=1; + + if ($addzonerecherche) { + + print '
'."\n"; - if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_SOCIETE") && MAIN_SEARCHFORM_SOCIETE > 0) + if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_SOCIETE") && MAIN_SEARCHFORM_SOCIETE > 0) { $langs->load("companies"); - + if (strstr($_SERVER["SCRIPT_URL"], "/comm/prospect/")) { $url=DOL_URL_ROOT.'/comm/prospect/prospects.php'; @@ -589,24 +596,25 @@ function left_menu($menu, $help_url='', $form_search='', $author='') { $url=DOL_URL_ROOT.'/societe.php'; } - + printSearchForm($url,DOL_URL_ROOT.'/comm/clients.php',$langs->trans("Companies"),'soc','socname'); } - - if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_CONTACT") && MAIN_SEARCHFORM_CONTACT > 0) - { + + if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_CONTACT") && MAIN_SEARCHFORM_CONTACT > 0) + { $langs->load("companies"); printSearchForm(DOL_URL_ROOT.'/contact/index.php',DOL_URL_ROOT.'/contact/index.php',$langs->trans("Contacts"),'contact','contactname'); - } - - if (($conf->produit->enabled || $conf->service->enabled) && defined("MAIN_SEARCHFORM_PRODUITSERVICE") && MAIN_SEARCHFORM_PRODUITSERVICE > 0) - { + } + + if (($conf->produit->enabled || $conf->service->enabled) && defined("MAIN_SEARCHFORM_PRODUITSERVICE") && MAIN_SEARCHFORM_PRODUITSERVICE > 0) + { $langs->load("products"); printSearchForm(DOL_URL_ROOT.'/product/liste.php',DOL_URL_ROOT.'/product/',$langs->trans("Products")."/".$langs->trans("Services"),'products','sall'); } - print "
"; + print "
"; + } /* * Zone de recherche supplémentaire