Fix: search forms not shown
This commit is contained in:
parent
0cf484630e
commit
2444f40202
@ -1022,46 +1022,45 @@ function left_menu($menu_array, $helppagename='', $form_search='')
|
|||||||
$menuleft->showmenu();
|
$menuleft->showmenu();
|
||||||
|
|
||||||
// Affichage des zones de recherche permanantes
|
// Affichage des zones de recherche permanantes
|
||||||
$addzonerecherche=0;
|
$ret='';
|
||||||
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_SOCIETE) $addzonerecherche=1;
|
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_SOCIETE && $user->rights->societe->lire)
|
||||||
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">';
|
$langs->load("companies");
|
||||||
|
$ret.=printSearchForm(DOL_URL_ROOT.'/societe.php', DOL_URL_ROOT.'/societe.php',
|
||||||
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_SOCIETE && $user->rights->societe->lire)
|
img_object($langs->trans("List"),'company').' '.$langs->trans("Companies"), 'soc', 'socname');
|
||||||
{
|
|
||||||
$langs->load("companies");
|
|
||||||
printSearchForm(DOL_URL_ROOT.'/societe.php', DOL_URL_ROOT.'/societe.php',
|
|
||||||
img_object($langs->trans("List"),'company').' '.$langs->trans("Companies"), 'soc', 'socname');
|
|
||||||
}
|
|
||||||
|
|
||||||
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',
|
|
||||||
img_object($langs->trans("List"),'contact').' '.$langs->trans("Contacts"), 'contact', 'contactname');
|
|
||||||
}
|
|
||||||
|
|
||||||
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',
|
|
||||||
img_object($langs->trans("List"),'product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($conf->adherent->enabled && $conf->global->MAIN_SEARCHFORM_ADHERENT && $user->rights->adherent->lire)
|
|
||||||
{
|
|
||||||
$langs->load("members");
|
|
||||||
printSearchForm(DOL_URL_ROOT.'/adherents/liste.php', DOL_URL_ROOT.'/adherents/liste.php',
|
|
||||||
img_object($langs->trans("List"),'user').' '.$langs->trans("Members"), 'member', 'sall');
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($conf->societe->enabled && $conf->global->MAIN_SEARCHFORM_CONTACT && $user->rights->societe->lire)
|
||||||
|
{
|
||||||
|
$langs->load("companies");
|
||||||
|
$ret.=printSearchForm(DOL_URL_ROOT.'/contact/index.php', DOL_URL_ROOT.'/contact/index.php',
|
||||||
|
img_object($langs->trans("List"),'contact').' '.$langs->trans("Contacts"), 'contact', 'contactname');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($conf->produit->enabled || $conf->service->enabled) && $conf->global->MAIN_SEARCHFORM_PRODUITSERVICE && $user->rights->produit->lire)
|
||||||
|
{
|
||||||
|
$langs->load("products");
|
||||||
|
$ret.=printSearchForm(DOL_URL_ROOT.'/product/liste.php', DOL_URL_ROOT.'/product/index.php',
|
||||||
|
img_object($langs->trans("List"),'product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($conf->adherent->enabled && $conf->global->MAIN_SEARCHFORM_ADHERENT && $user->rights->adherent->lire)
|
||||||
|
{
|
||||||
|
$langs->load("members");
|
||||||
|
$ret.=printSearchForm(DOL_URL_ROOT.'/adherents/liste.php', DOL_URL_ROOT.'/adherents/liste.php',
|
||||||
|
img_object($langs->trans("List"),'user').' '.$langs->trans("Members"), 'member', 'sall');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ret)
|
||||||
|
{
|
||||||
|
print "\n";
|
||||||
|
print "<!-- Begin SearchForm -->\n";
|
||||||
|
print '<div class="blockvmenupair">'."\n";
|
||||||
|
print $ret;
|
||||||
|
print '</div>'."\n";
|
||||||
|
print "<!-- End SearchForm -->\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Zone de recherche supplementaire
|
// Zone de recherche supplementaire
|
||||||
if ($form_search)
|
if ($form_search)
|
||||||
{
|
{
|
||||||
@ -1131,18 +1130,17 @@ function left_menu($menu_array, $helppagename='', $form_search='')
|
|||||||
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$htmlinputname)
|
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$htmlinputname)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
print "\n<!-- Begin SearchForm ".$htmlinputname." -->\n";
|
$ret ='<form action="'.$urlaction.'" method="post">';
|
||||||
print '<form action="'.$urlaction.'" method="post">';
|
$ret.='<div class="menu_titre">';
|
||||||
print '<div class="menu_titre">';
|
$ret.='<a class="vsmenu" href="'.$urlobject.'">';
|
||||||
print '<a class="vsmenu" href="'.$urlobject.'">';
|
$ret.=$title.'</a><br>';
|
||||||
print $title.'</a><br>';
|
$ret.='</div>';
|
||||||
print '</div>';
|
$ret.='<input type="hidden" name="mode" value="search">';
|
||||||
print '<input type="hidden" name="mode" value="search">';
|
$ret.='<input type="hidden" name="mode-search" value="'.$htmlmodesearch.'">';
|
||||||
print '<input type="hidden" name="mode-search" value="'.$htmlmodesearch.'">';
|
$ret.='<input type="text" class="flat" name="'.$htmlinputname.'" size="10"> ';
|
||||||
print '<input type="text" class="flat" name="'.$htmlinputname.'" size="10"> ';
|
$ret.='<input type="submit" class="button" value="'.$langs->trans("Go").'">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Go").'">';
|
$ret.="</form>\n";
|
||||||
print "</form>";
|
return $ret;
|
||||||
print "\n<!-- End SearchForm -->\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user