diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 1bcbec9723d6b5d6985e3a18b34c78a7e4a14dac..4b03cb48429afc33fc56440ae416cc16346981b5 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -66,11 +66,9 @@ $var=false; print '<form method="post" action="'.DOL_URL_ROOT.'/comm/propal/list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="noborder nohover" width="100%">'; -print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchPropal").'</td></tr>'; +print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[$var].'><td>'; -print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; -print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; -print '</tr>'; +print $langs->trans("Proposal").':</td><td><input type="text" class="flat" name="sall" size=18></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</table></form><br>\n"; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index f9fe17ac1c27718a67ce0338084542f740919f00..8aa5ce64655fe059e5916bd3086b87ff2f4d0437 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -67,11 +67,9 @@ $var=false; print '<form method="post" action="'.DOL_URL_ROOT.'/commande/list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="noborder nohover" width="100%">'; -print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchOrder").'</td></tr>'; +print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[$var].'><td>'; -print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; -print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; -print '</tr>'; +print $langs->trans("CustomerOrder").':</td><td><input type="text" class="flat" name="sall" size=18></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</table></form><br>\n"; diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 3a7b5667db5b80e54d855a0ec8b131d59e952310..c3972bab2f77a77110eaa1061e9f494e535112ca 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -79,12 +79,10 @@ if (! empty($conf->contrat->enabled)) print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="noborder nohover" width="100%">'; - print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAContract").'</td></tr>'; + print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[$var].'>'; - print '<td class="nowrap">'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_contract" size="18"></td>'; - print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; - print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; - print '</tr>'; + print '<td class="nowrap">'.$langs->trans("Contract").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; + print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</table></form>\n"; print "<br>"; } diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 1cafd091521edf23d02ae80983f4928de535e398..9623958188dc56b342b11dcd9242edf640098d7a 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -205,14 +205,15 @@ function print_end_menu_array_auguria() * @param DoliDB $db Database handler * @param array $menu_array_before Table of menu entries to show before entries of menu handler * @param array $menu_array_after Table of menu entries to show after entries of menu handler - * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) + * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) * @param Menu $menu Object Menu to return back list of menu entries * @param int $noout Disable output (Initialise &$menu only). * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all) + * @param array $moredata An array with more data to output * @return int Nb of entries */ -function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='') +function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='',$moredata=null) { global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; @@ -245,6 +246,16 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM print '</div>'."\n"; } + if (is_array($moredata) && ! empty($moredata['searchform'])) + { + print "\n"; + print "<!-- Begin SearchForm -->\n"; + print '<div id="blockvmenusearch" class="blockvmenusearch">'."\n"; + print $moredata['searchform']; + print '</div>'."\n"; + print "<!-- End SearchForm -->\n"; + } + // We update newmenu with entries found into database $menuArbo = new Menubase($db,'auguria'); $newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'auguria',$tabMenu); @@ -348,7 +359,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM // Show menu if (empty($noout)) { - $alt=0; $blockvmenuopened=false; + $alt=0; $altok=0; $blockvmenuopened=false; $num=count($menu_array); for ($i = 0; $i < $num; $i++) { @@ -358,14 +369,15 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $alt++; if (empty($menu_array[$i]['level']) && $showmenu) { + $altok++; $blockvmenuopened=true; - if (($alt%2==0)) + if ($altok % 2 == 0) { - print '<div class="blockvmenuimpair">'."\n"; + print '<div class="blockvmenuimpair'.($altok == 1 ? ' blockvmenufirst':'').'">'."\n"; } else { - print '<div class="blockvmenupair">'."\n"; + print '<div class="blockvmenupair'.($altok == 1 ? ' blockvmenufirst':'').'">'."\n"; } } @@ -437,8 +449,20 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM if ($blockvmenuopened) { print "</div>\n"; $blockvmenuopened=false; } } } + + if ($altok) print '<div class="blockvmenuend"></div>'; } + if (is_array($moredata) && ! empty($moredata['bookmarks'])) + { + print "\n"; + print "<!-- Begin Bookmarks -->\n"; + print '<div id="blockvmenubookmarks" class="blockvmenubookmarks">'."\n"; + print $moredata['bookmarks']; + print '</div>'."\n"; + print "<!-- End Bookmarks -->\n"; + } + return count($menu_array); } diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index b54c746388e2ba1692d36e7e4a5eee9f0cba8dda..a7c701aaeff477fb3727963d32642e0f877cd18e 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -158,9 +158,10 @@ class MenuManager * Show menu * * @param string $mode 'top', 'left', 'jmobile' + * @param array $moredata An array with more data to output * @return string */ - function showmenu($mode) + function showmenu($mode, $moredata=null) { global $conf, $langs, $user; @@ -176,7 +177,7 @@ class MenuManager $this->menu=new Menu(); if ($mode == 'top') print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,0); - if ($mode == 'left') print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0); + if ($mode == 'left') print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0,'','',$moredata); if ($mode == 'jmobile') { print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 49c076de4c8b15c843037ec55247c63c9a2c6b7f..099d65f7f955ae3a444c94471667b16d48aaab44 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -409,14 +409,15 @@ function print_end_menu_array() * @param DoliDB $db Database handler * @param array $menu_array_before Table of menu entries to show before entries of menu handler (menu->liste filled with menu->add) * @param array $menu_array_after Table of menu entries to show after entries of menu handler (menu->liste filled with menu->add) - * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) + * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) * @param Menu $menu Object Menu to return back list of menu entries * @param int $noout Disable output (Initialise &$menu only). * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all) + * @param array $moredata An array with more data to output * @return int nb of menu entries */ -function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='') +function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='',$moredata=null) { global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; @@ -449,6 +450,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print '</div>'."\n"; } + if (is_array($moredata) && ! empty($moredata['searchform'])) + { + print "\n"; + print "<!-- Begin SearchForm -->\n"; + print '<div id="blockvmenusearch" class="blockvmenusearch">'."\n"; + print $moredata['searchform']; + print '</div>'."\n"; + print "<!-- End SearchForm -->\n"; + } + /** * We update newmenu with entries found into database * -------------------------------------------------- @@ -1407,11 +1418,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $blockvmenuopened=true; if ($altok % 2 == 0) { - print '<div class="blockvmenuimpair'.$invert.($alt == 1 ? ' blockvmenufirst':'').'">'."\n"; + print '<div class="blockvmenuimpair'.$invert.($altok == 1 ? ' blockvmenufirst':'').'">'."\n"; } else { - print '<div class="blockvmenupair'.$invert.($alt == 1 ? ' blockvmenufirst':'').'">'."\n"; + print '<div class="blockvmenupair'.$invert.($altok == 1 ? ' blockvmenufirst':'').'">'."\n"; } } @@ -1484,6 +1495,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if ($altok) print '<div class="blockvmenuend"></div>'; } + if (is_array($moredata) && ! empty($moredata['bookmarks'])) + { + print "\n"; + print "<!-- Begin Bookmarks -->\n"; + print '<div id="blockvmenubookmarks" class="blockvmenubookmarks">'."\n"; + print $moredata['bookmarks']; + print '</div>'."\n"; + print "<!-- End Bookmarks -->\n"; + } + return count($menu_array); } diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index fc66eef7fd623c3f9e128faf97de82ba58e289e4..4326de6d98f38e146cf241da4a5ee18d3339b523 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -112,9 +112,10 @@ class MenuManager * Show menu * * @param string $mode 'top', 'left', 'jmobile' + * @param array $moredata An array with more data to output * @return string */ - function showmenu($mode) + function showmenu($mode, $moredata=null) { global $conf, $langs, $user; @@ -132,7 +133,7 @@ class MenuManager if (empty($conf->global->MAIN_MENU_INVERT)) { if ($mode == 'top') print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,0); - if ($mode == 'left') print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0); + if ($mode == 'left') print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0,'','',$moredata); } else { diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 5c428ca9f136678a13b89128a12ff22bffe5dea7..e1b240a8e5e34e6eb0947c3eef7c534edbc85fb1 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -61,9 +61,10 @@ class MenuManager * Show menu * * @param string $mode 'top', 'left', 'jmobile' + * @param array $moredata An array with more data to output * @return string */ - function showmenu($mode) + function showmenu($mode, $moredata=null) { global $user,$conf,$langs,$dolibarr_main_db_name; @@ -133,20 +134,22 @@ class MenuManager if (empty($noout)) { - $alt=0; + $alt=0; $altok=0; $blockvmenuopened=false; $num=count($this->menu->liste); for ($i = 0; $i < $num; $i++) { $alt++; if (empty($this->menu->liste[$i]['level'])) { + $altok++; + $blockvmenuopened=true; if (($alt%2==0)) { - print '<div class="blockvmenuimpair">'."\n"; + print '<div class="blockvmenuimpair'.($alt == 1 ? ' blockvmenufirst':'').'">'."\n"; } else { - print '<div class="blockvmenupair">'."\n"; + print '<div class="blockvmenupair'.($alt == 1 ? ' blockvmenufirst':'').'">'."\n"; } } @@ -201,6 +204,8 @@ class MenuManager print "</div>\n"; } } + + if ($altok) print '<div class="blockvmenuend"></div>'; } if ($mode == 'jmobile') diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 81a2db9621c5a530d0daecb680e6deb423b09b80..03b217f9a9173d5180841832057a8b7ab6ccfe55 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com> @@ -67,11 +67,9 @@ $var=false; print '<table class="noborder nohover" width="100%">'; print '<form method="post" action="'.DOL_URL_ROOT.'/fichinter/list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; -print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAnIntervention").'</td></tr>'; +print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[$var].'><td>'; -print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; -print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; -print '</tr>'; +print $langs->trans("Intervention").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</form></table><br>\n"; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index cb91a65b341764e3e593498bff23eb9b076d6cc1..c9de3c6a340e4acb007e2161c433c755086f80e6 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -61,11 +61,9 @@ $var=false; print '<form method="post" action="list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="noborder nohover" width="100%">'; -print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchOrder").'</td></tr>'; +print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[$var].'><td>'; -print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_ref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; -print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="search_all" size="18"></td>'; -print '</tr>'; +print $langs->trans("SupplierOrder").':</td><td><input type="text" class="flat" name="search_all" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</table></form><br>\n"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index dd4cd684970c669a8c54b302e8051eb66b4e91b6..b15cc6af213175f00f6009b6d53d156267e5cb4d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1543,13 +1543,13 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a * @param string $helppagename Name of wiki page for help ('' by default). * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage * For other external page: http://server/url - * @param string $moresearchform Search Form Permanent Supplemental + * @param string $notused Deprecated. Used in past to add content into left menu. Hooks can be used now. * @param array $menu_array_after Table of menu entries to show after entries of menu handler * @param int $leftmenuwithoutmainarea Must be set to 1. 0 by default for backward compatibility with old modules. * @param string $title Title of web page * @return void */ -function left_menu($menu_array_before, $helppagename='', $moresearchform='', $menu_array_after='', $leftmenuwithoutmainarea=0, $title='') +function left_menu($menu_array_before, $helppagename='', $notused='', $menu_array_after='', $leftmenuwithoutmainarea=0, $title='') { global $user, $conf, $langs, $db, $form; global $hookmanager, $menumanager; @@ -1644,13 +1644,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me print '<div class="vmenu">'."\n\n"; - $menumanager->menu_array = $menu_array_before; - $menumanager->menu_array_after = $menu_array_after; - $menumanager->showmenu('left'); // output menu_array and menu found in database - - - // Show other forms - if ($searchform) + // Show other forms + /*if ($searchform) { print "\n"; print "<!-- Begin SearchForm -->\n"; @@ -1658,15 +1653,14 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me print $searchform; print '</div>'."\n"; print "<!-- End SearchForm -->\n"; - } + }*/ - // More search form - if ($moresearchform) - { - print $moresearchform; - } + $menumanager->menu_array = $menu_array_before; + $menumanager->menu_array_after = $menu_array_after; + $menumanager->showmenu('left', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // output menu_array and menu found in database // Bookmarks + /* if ($bookmarks) { print "\n"; @@ -1675,13 +1669,14 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me print $bookmarks; print '</div>'."\n"; print "<!-- End Bookmarks -->\n"; - } + }*/ - print "\n"; - print "<!-- Begin Help Block-->\n"; + // Dolibarr version + help + bug report link + print "\n"; + print "<!-- Begin Help Block-->\n"; print '<div id="blockvmenuhelp" class="blockvmenuhelp">'."\n"; - //Dolibarr version + // Version $doliurl='http://www.dolibarr.org'; //local communities if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';