Utilisation des variables (qui sont personnalisables) plutot que constantes
This commit is contained in:
parent
719a76f7bd
commit
ad0ebfd1b3
@ -324,27 +324,27 @@ function left_menu($menu_array, $help_url='', $form_search='')
|
||||
|
||||
// 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;
|
||||
if (($conf->produit->enabled || $conf->service->enabled) && defined("MAIN_SEARCHFORM_PRODUITSERVICE") && MAIN_SEARCHFORM_PRODUITSERVICE > 0) $addzonerecherche=1;
|
||||
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_SOCIETE) $addzonerecherche=1;
|
||||
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_CONTACT) $addzonerecherche=1;
|
||||
if (($conf->produit->enabled || $conf->service->enabled) && $conf->global->MAIN_SEARCHFORM_PRODUITSERVICE) $addzonerecherche=1;
|
||||
|
||||
if ($addzonerecherche && ($user->rights->societe->lire || $user->rights->produit->lire))
|
||||
{
|
||||
print '<div class="blockvmenupair">';
|
||||
|
||||
if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_SOCIETE") && MAIN_SEARCHFORM_SOCIETE > 0 && $user->rights->societe->lire)
|
||||
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_SOCIETE && $user->rights->societe->lire)
|
||||
{
|
||||
$langs->load("companies");
|
||||
printSearchForm(DOL_URL_ROOT.'/societe.php',DOL_URL_ROOT.'/societe.php',$langs->trans("Companies"),'soc','socname');
|
||||
}
|
||||
|
||||
if ($conf->societe->enabled && defined("MAIN_SEARCHFORM_CONTACT") && MAIN_SEARCHFORM_CONTACT > 0 && $user->rights->societe->lire)
|
||||
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_CONTACT && $user->rights->societe->lire)
|
||||
{
|
||||
$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 && $user->rights->produit->lire)
|
||||
if (($conf->produit->enabled || $conf->service->enabled) && $conf->global->MAIN_SEARCHFORM_PRODUITSERVICE && $user->rights->produit->lire)
|
||||
{
|
||||
$langs->load("products");
|
||||
printSearchForm(DOL_URL_ROOT.'/product/liste.php',DOL_URL_ROOT.'/product/index.php',$langs->trans("Products")."/".$langs->trans("Services"),'products','sall');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user