diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 7972a9924d3..53db9ef1732 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,4 +1,4 @@ -#Wed Feb 11 17:58:49 CET 2009 +#Mon Mar 09 12:23:31 CET 2009 eclipse.preferences.version=1 encoding//dev/initdemo/initdemo.sql=UTF-8 encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1 @@ -7,7 +7,7 @@ encoding//htdocs/adherents/adherent.class.php=ISO-8859-1 encoding//htdocs/admin/adherent.php=ISO-8859-1 encoding//htdocs/admin/company.php=ISO-8859-1 encoding//htdocs/admin/fckeditor.php=ISO-8859-1 -encoding//htdocs/admin/index.php=ISO-8859-1 +encoding//htdocs/admin/index.php=UTF-8 encoding//htdocs/admin/menus/index.php=ISO-8859-1 encoding//htdocs/admin/security.php=ISO-8859-1 encoding//htdocs/admin/system/database-tables-contraintes.php=ISO-8859-1 diff --git a/ChangeLog b/ChangeLog index 98f9dc3614a..e11b825c683 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,6 +39,7 @@ For users: - New: Upload of joined files need create/modify permissions to work. - New: For admin users, show the SQL request in export build. - New: Can modify proposal date if status is draft. +- New: The help link on some pages now links directly to the wiki web page. - Fix: Partial payment on social contributions not shown on main page. - Fix: Handle correctly the comment in status changing of supplier orders. - Fix: Author, title and topic are correctly encoded in PDF. diff --git a/dev/skeletons/pre.inc.php b/dev/skeletons/pre.inc.php index d63f301dba2..270224df05b 100644 --- a/dev/skeletons/pre.inc.php +++ b/dev/skeletons/pre.inc.php @@ -17,28 +17,33 @@ */ /** - \file htdocs/dev/skeletons/pre.inc.php - \brief File to manage left menu by default - \version $Id$ -*/ + * \file htdocs/dev/skeletons/pre.inc.php + * \brief File to manage left menu by default + * \version $Id$ + */ // Include environment and check authentification require ("../../main.inc.php"); // This include must use a relative link to the main.inc.php file /** - \brief Function called by page to show menus (top and left) -*/ -function llxHeader($head = "") + * \brief Function called by page to show menus (top and left) + * \param head Text to show as head line + * \param title Not used + * \param helppagename Name of a help page ('' by default). + * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage + * For other external page: http://server/url + */ +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; top_menu($head); $menu = new Menu(); - + // Create default menu. - + // No code here is required if you already added menu entries in // the module descriptor (recommanded). // If not you must manually add menu entries here (not recommanded). @@ -47,7 +52,7 @@ function llxHeader($head = "") $menu->add(DOL_URL_ROOT."/mylink.php", $langs->trans("MyMenuLabel")); } */ - - left_menu($menu->liste); + + left_menu($menu->liste, $help_url); } ?> diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index d67031d0175..7e2317627eb 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -75,7 +75,7 @@ if ($_REQUEST["action"] == 'add') * Put here all code to build page ****************************************************/ -llxHeader('MyPageName'); +llxHeader('MyPageName','',''); $form=new Form($db); diff --git a/htdocs/adherents/cartes/pre.inc.php b/htdocs/adherents/cartes/pre.inc.php index fea196f68e0..5de4f22fb06 100644 --- a/htdocs/adherents/cartes/pre.inc.php +++ b/htdocs/adherents/cartes/pre.inc.php @@ -26,7 +26,8 @@ require("../../main.inc.php"); -function llxHeader($head = "") { +function llxHeader($head = '', $title='', $help_url='') +{ global $user, $conf, $langs; top_menu($head); diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index f73bde73207..310cd194eb5 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -33,7 +33,11 @@ $langs->load("companies"); $langs->load("members"); -llxHeader(); +/* + * View + */ + +llxHeader($langs->trans("Members"),'','EN:Fundations|FR:Adherents|ES:Miembros'); $staticmember=new Adherent($db); $statictype=new AdherentType($db); diff --git a/htdocs/adherents/pre.inc.php b/htdocs/adherents/pre.inc.php index 6af4d2fb9f8..546426211d2 100644 --- a/htdocs/adherents/pre.inc.php +++ b/htdocs/adherents/pre.inc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -25,7 +25,7 @@ require("../main.inc.php"); -function llxHeader($head = "") +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; @@ -63,7 +63,7 @@ function llxHeader($head = "") $menu->add_submenu(DOL_URL_ROOT."/adherents/type.php",$langs->trans("MembersTypes")); $menu->add_submenu(DOL_URL_ROOT."/adherents/options.php",$langs->trans("MembersAttributes")); - left_menu($menu->liste); + left_menu($menu->liste, $help_url); } diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index a7b7b1512ea..5b18393830d 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -18,10 +18,10 @@ */ /** - \file htdocs/admin/index.php - \brief Page d'accueil de l'espace administration/configuration - \version $Id$ -*/ + * \file htdocs/admin/index.php + * \brief Page d'accueil de l'espace administration/configuration + * \version $Id$ + */ require("./pre.inc.php"); @@ -38,7 +38,7 @@ $mesg=''; * View */ -llxHeader(); +llxHeader($langs->trans("Setup"),'','EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'); $form = new Form($db); diff --git a/htdocs/bookmarks/pre.inc.php b/htdocs/bookmarks/pre.inc.php index b56f8cecf76..86664abbae1 100644 --- a/htdocs/bookmarks/pre.inc.php +++ b/htdocs/bookmarks/pre.inc.php @@ -20,7 +20,7 @@ * */ -/** +/** \file htdocs/bookmarks/pre.inc.php \ingroup bookmark \brief Fichier de gestion du menu gauche des bookmarks @@ -30,23 +30,23 @@ require("../main.inc.php"); -function llxHeader($head = "", $title = "") +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; - $langs->load("other"); - + $langs->load("other"); + top_menu($head, $title); - + $menu = new Menu(); - + // Bookmarks - if ($conf->bookmark->enabled) + if ($conf->bookmark->enabled) { if ($user->rights->bookmark->lire) $menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks")); if ($user->rights->bookmark->creer) $menu->add_submenu(DOL_URL_ROOT."/bookmarks/fiche.php?action=create", $langs->trans("NewBookmark")); if ($user->rights->bookmark->lire) $menu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("List")); } - + left_menu($menu->liste); } ?> diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 1ac766e2f87..37826a2fb1d 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -104,12 +104,12 @@ if ($action=='delete_action') * View */ -llxHeader(); +llxHeader('','','EN:AgendaEn|FR:Agenda|ES:AgendaES'); $form=new Form($db); //print $langs->trans("FeatureNotYetAvailable"); -$now=mktime(0,0,0); +$now=gmmktime(0,0,0); $prev = dol_get_prev_month($month, $year); $prev_year = $prev['year']; diff --git a/htdocs/comm/action/pre.inc.php b/htdocs/comm/action/pre.inc.php index f1b8e4c1de6..09866fc282d 100644 --- a/htdocs/comm/action/pre.inc.php +++ b/htdocs/comm/action/pre.inc.php @@ -27,19 +27,19 @@ require("../../main.inc.php"); -function llxHeader($head = "", $urlp = "") +function llxHeader($head = '', $title='', $help_url='') { global $conf,$user,$langs; - + top_menu($head); - + $menu = new Menu(); - + // Actions if ($conf->agenda->enabled) { $langs->load("agenda"); - + // Actions $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); @@ -64,8 +64,8 @@ function llxHeader($head = "", $urlp = "") // Reports $menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); } - - left_menu($menu->liste); + + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/comm/pre.inc.php b/htdocs/comm/pre.inc.php index 64cd41b9ca4..0d72f3232dd 100644 --- a/htdocs/comm/pre.inc.php +++ b/htdocs/comm/pre.inc.php @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/** +/** \file htdocs/comm/pre.inc.php \ingroup commercial \brief Fichier de gestion du menu gauche de l'espace commercial @@ -26,7 +26,7 @@ require("../main.inc.php"); -function llxHeader($head = "", $title = "") +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; @@ -43,22 +43,22 @@ function llxHeader($head = "", $title = "") { $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=c", $langs->trans("MenuNewCustomer")); } - + $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts")); - - + + // Prospects $menu->add(DOL_URL_ROOT."/comm/prospect/index.php", $langs->trans("Prospects")); if ($user->rights->societe->creer) { $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=p", $langs->trans("MenuNewProspect")); } - + $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts")); - - + + $menu->add(DOL_URL_ROOT."/comm/action/index.php", $langs->trans("Actions")); - + // Propal if ($conf->propal->enabled && $user->rights->propale->lire) { @@ -76,7 +76,7 @@ function llxHeader($head = "", $title = "") $menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts")); } - if ($conf->commande->enabled && $user->rights->commande->lire) + if ($conf->commande->enabled && $user->rights->commande->lire) { $langs->load("orders"); $menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders")); @@ -88,7 +88,7 @@ function llxHeader($head = "", $title = "") $menu->add(DOL_URL_ROOT."/comm/mailing/", $langs->trans("EMailings")); } - if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) + if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) { $langs->load("interventions"); $menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions")); @@ -103,13 +103,13 @@ function llxHeader($head = "", $title = "") if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); } $menu->add(DOL_URL_ROOT."/product/index.php", "$chaine"); } - - if ($conf->projet->enabled && $user->rights->projet->lire) + + if ($conf->projet->enabled && $user->rights->projet->lire) { $langs->load("projects"); $menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects")); } - - left_menu($menu->liste); + + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php index 7928e1c5147..e662accb9d3 100644 --- a/htdocs/commande/pre.inc.php +++ b/htdocs/commande/pre.inc.php @@ -34,23 +34,23 @@ require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); $langs->load("orders"); -function llxHeader($head = "", $title="", $help_url='') +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; - + top_menu($head, $title); - + $menu = new Menu(); - + $menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders")); $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List")); $menu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics")); - + if ($conf->expedition->enabled && $user->rights->expedition->lire) { $menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings")); } - + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/compta/pre.inc.php b/htdocs/compta/pre.inc.php index 34199b06f73..6b16014625c 100644 --- a/htdocs/compta/pre.inc.php +++ b/htdocs/compta/pre.inc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/** +/** \file htdocs/compta/pre.inc.php \ingroup compta \brief Fichier gestionnaire du menu compta @@ -27,7 +27,7 @@ require("../main.inc.php"); -function llxHeader($head = "", $title="", $help_url='') +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; @@ -126,7 +126,7 @@ function llxHeader($head = "", $title="", $help_url='') { $menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation")); } - + if ($user->rights->compta->ventilation->parametrer) { $menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param")); diff --git a/htdocs/contact/pre.inc.php b/htdocs/contact/pre.inc.php index 55b44ab9253..6fa8618baaf 100644 --- a/htdocs/contact/pre.inc.php +++ b/htdocs/contact/pre.inc.php @@ -26,7 +26,7 @@ require("../main.inc.php"); -function llxHeader($head = "", $urlp = "") +function llxHeader($head = '', $title='', $help_url='') { global $langs, $user, $conf; @@ -58,8 +58,8 @@ function llxHeader($head = "", $urlp = "") $menu->add(DOL_URL_ROOT."/contact/index.php?userid=$user->id", $langs->trans("MyContacts")); } - - left_menu($menu->liste); + + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/contrat/pre.inc.php b/htdocs/contrat/pre.inc.php index 5c734776404..b2a2db59a79 100644 --- a/htdocs/contrat/pre.inc.php +++ b/htdocs/contrat/pre.inc.php @@ -20,7 +20,7 @@ * $Source$ */ -/** +/** \file htdocs/contrat/pre.inc.php \ingroup contrat \brief Fichier de gestion du menu gauche de l'espace contrat @@ -29,15 +29,15 @@ require("../main.inc.php"); -function llxHeader($head = "", $urlp = "") +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; $langs->load("contracts"); - + top_menu($head); - + $menu = new Menu(); - + $menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts")); $menu->add_submenu(DOL_URL_ROOT."/societe.php", $langs->trans("NewContract")); $menu->add_submenu(DOL_URL_ROOT."/contrat/liste.php", $langs->trans("List")); @@ -46,7 +46,7 @@ function llxHeader($head = "", $urlp = "") $menu->add_submenu(DOL_URL_ROOT."/contrat/services.php?mode=4", $langs->trans("MenuRunningServices"), 2 , true); $menu->add_submenu(DOL_URL_ROOT."/contrat/services.php?mode=4&filter=expired", $langs->trans("MenuExpiredServices"), 2 , true); $menu->add_submenu(DOL_URL_ROOT."/contrat/services.php?mode=5", $langs->trans("MenuClosedServices"), 2 , true); - - left_menu($menu->liste); + + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/ecm/pre.inc.php b/htdocs/ecm/pre.inc.php index a12f899bca3..5cc7eb759b9 100644 --- a/htdocs/ecm/pre.inc.php +++ b/htdocs/ecm/pre.inc.php @@ -27,15 +27,15 @@ require ("../main.inc.php"); $user->getrights('ecm'); -function llxHeader($head = "", $title="", $help_url='', $morehtml='') +function llxHeader($head = '', $title='', $help_url='', $morehtml='') { global $conf,$langs,$user; $langs->load("ecm"); $langs->load("bills"); $langs->load("propal"); - + top_menu($head, $title); - + $menu = new Menu(); $menu->add(DOL_URL_ROOT."/ecm/index.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("MenuECM"),0,$user->rights->ecm->download); @@ -49,7 +49,7 @@ function llxHeader($head = "", $title="", $help_url='', $morehtml='') if ($conf->propal->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsProposals"),2); if ($conf->commande->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsOrders"),2); if ($conf->facture->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsInvoices"),2); -*/ +*/ left_menu($menu->liste, $help_url, $morehtml); } ?> diff --git a/htdocs/exports/pre.inc.php b/htdocs/exports/pre.inc.php index 2b77874836e..f63eaa541b6 100644 --- a/htdocs/exports/pre.inc.php +++ b/htdocs/exports/pre.inc.php @@ -29,18 +29,18 @@ require("../main.inc.php"); -function llxHeader($head = "", $title = "") +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; - + top_menu($head, $title); - + $menu = new Menu(); - + $menu->add(DOL_URL_ROOT."/exports/index.php", $langs->trans("Exports")); $menu->add_submenu(DOL_URL_ROOT."/exports/export.php", $langs->trans("NewExport")); - - left_menu($menu->liste); + + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/fourn/pre.inc.php b/htdocs/fourn/pre.inc.php index 504266c0fb0..0bf349d652e 100644 --- a/htdocs/fourn/pre.inc.php +++ b/htdocs/fourn/pre.inc.php @@ -20,10 +20,10 @@ */ /** - \file htdocs/fourn/pre.inc.php - \ingroup fournisseur,facture - \brief Fichier gestionnaire du menu fournisseurs -*/ + \file htdocs/fourn/pre.inc.php + \ingroup fournisseur,facture + \brief Fichier gestionnaire du menu fournisseurs + */ require("../main.inc.php"); require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php"; @@ -31,76 +31,70 @@ require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"; -function llxHeader($head = "", $title="", $addons='') { - global $user, $conf, $langs; +function llxHeader($head = '', $title='', $help_url='') +{ + global $user, $conf, $langs; - $langs->load("suppliers"); - $langs->load("propal"); + $langs->load("suppliers"); + $langs->load("propal"); - top_menu($head, $title); + top_menu($head, $title); - $menu = new Menu(); + $menu = new Menu(); - - if (is_array($addons)) - { - //$menu->add($url, $libelle); - $menu->add($addons[0][0], $addons[0][1]); - } - - if ($conf->fournisseur->enabled && $user->rights->societe->lire) - { - $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers")); - - // Sécurité accés client - if ($user->societe_id == 0 && $user->rights->societe->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier")); - } - - $menu->add_submenu(DOL_URL_ROOT."/fourn/liste.php",$langs->trans("List")); - - if ($conf->societe->enabled ) + if ($conf->fournisseur->enabled && $user->rights->societe->lire) { - $menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts")); - } - - $menu->add_submenu(DOL_URL_ROOT."/fourn/stats.php",$langs->trans("Statistics")); - } + $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers")); - $langs->load("bills"); - if ($user->societe_id == 0 && $user->rights->fournisseur->facture->lire) - { - $menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills")); - } - if ($user->societe_id == 0 && $user->rights->fournisseur->facture->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill")); - } - if ($user->rights->fournisseur->facture->lire) - { - $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments")); - } - $langs->load("orders"); - if ($user->rights->fournisseur->commande->lire) - { - $menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders")); - } - if ($conf->produit->enabled || $conf->service->enabled) - { - if ($user->rights->produit->lire) - { - $menu->add(DOL_URL_ROOT."/product/", $langs->trans("Products")); - } - } - - if ($conf->categorie->enabled) + // Sécurité accés client + if ($user->societe_id == 0 && $user->rights->societe->creer) + { + $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier")); + } + + $menu->add_submenu(DOL_URL_ROOT."/fourn/liste.php",$langs->trans("List")); + + if ($conf->societe->enabled ) + { + $menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts")); + } + + $menu->add_submenu(DOL_URL_ROOT."/fourn/stats.php",$langs->trans("Statistics")); + } + + $langs->load("bills"); + if ($user->societe_id == 0 && $user->rights->fournisseur->facture->lire) + { + $menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills")); + } + if ($user->societe_id == 0 && $user->rights->fournisseur->facture->creer) + { + $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill")); + } + if ($user->rights->fournisseur->facture->lire) + { + $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments")); + } + $langs->load("orders"); + if ($user->rights->fournisseur->commande->lire) + { + $menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders")); + } + if ($conf->produit->enabled || $conf->service->enabled) + { + if ($user->rights->produit->lire) + { + $menu->add(DOL_URL_ROOT."/product/", $langs->trans("Products")); + } + } + + if ($conf->categorie->enabled) { $langs->load("categories"); // Catégories fournisseurs $menu->add(DOL_URL_ROOT."/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0); } - - left_menu($menu->liste); + + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/livraison/pre.inc.php b/htdocs/livraison/pre.inc.php index ff4c0ab9179..6750f5e21a8 100644 --- a/htdocs/livraison/pre.inc.php +++ b/htdocs/livraison/pre.inc.php @@ -36,7 +36,7 @@ $langs->load("orders"); $langs->load("sendings"); -function llxHeader($head = "", $title="", $help_url='') +function llxHeader($head = '', $title='', $help_url='') { global $langs; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1964f638794..e41bd9c7e51 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -834,8 +834,8 @@ function top_menu($head, $title='', $target='') * \brief Affiche barre de menu gauche * \param menu_array Tableau des entrees de menu * \param helppagename Name of wiki page for help ('' by default). - * Syntax is: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage - * or http://server/url + * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage + * For other external page: http://server/url * \param moresearchform Formulaire de recherche permanant supplementaire */ function left_menu($menu_array, $helppagename='', $moresearchform='') @@ -932,7 +932,7 @@ function left_menu($menu_array, $helppagename='', $moresearchform='') } // Link to Dolibarr wiki pages - if ($helppagename) + if ($helppagename && empty($conf->global->MAIN_DISABLE_HELP_LINKS)) { $langs->load("help"); @@ -946,31 +946,32 @@ function left_menu($menu_array, $helppagename='', $moresearchform='') else { // If relative URL - $helppage=$langs->trans($helppagename); // By default - + $helppage=''; if (eregi('^es',$langs->defaultlang)) { $helpbaseurl='http://wiki.dolibarr.org/index.php/%s'; - if (eregi('ES:([^|]+)',$helppage,$reg)) $helppage=$reg[1]; + if (eregi('ES:([^|]+)',$helppagename,$reg)) $helppage=$reg[1]; } - elseif (eregi('^fr',$langs->defaultlang)) + if (eregi('^fr',$langs->defaultlang)) { $helpbaseurl='http://wiki.dolibarr.org/index.php/%s'; - if (eregi('FR:([^|]+)',$helppage,$reg)) $helppage=$reg[1]; + if (eregi('FR:([^|]+)',$helppagename,$reg)) $helppage=$reg[1]; } - else + if (empty($helppage)) // If help page not already found { $helpbaseurl='http://wiki.dolibarr.org/index.php/%s'; - if (eregi('EN:([^|]+)',$helppage,$reg)) $helppage=$reg[1]; + if (eregi('EN:([^|]+)',$helppagename,$reg)) $helppage=$reg[1]; } } if ($helpbaseurl && $helppage) { print '
'; - print ''.$langs->trans("Help").''; + print '">'; + print img_help(0,'').' '; + print $langs->trans("Help").''; print '
'; } } diff --git a/htdocs/mantis/pre.inc.php b/htdocs/mantis/pre.inc.php index 0327077cec0..a611a002954 100644 --- a/htdocs/mantis/pre.inc.php +++ b/htdocs/mantis/pre.inc.php @@ -24,14 +24,14 @@ */ require ("../main.inc.php"); -function llxHeader($head = "", $title="", $help_url='') +function llxHeader($head = '', $title='', $help_url='') { global $langs; - + top_menu($head, $title); - + $menu = new Menu(); - + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/oscommerce_ws/pre.inc.php b/htdocs/oscommerce_ws/pre.inc.php index 7c1a82c16bc..7c3f0635396 100644 --- a/htdocs/oscommerce_ws/pre.inc.php +++ b/htdocs/oscommerce_ws/pre.inc.php @@ -19,7 +19,7 @@ * * $Id$ */ - + /** \file htdocs/oscommerce_ws/pre.inc.php \brief Fichier gestionnaire du menu de gauche @@ -28,22 +28,22 @@ require("../main.inc.php"); -function llxHeader($head = "", $urlp = "") +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; $langs->load("shop"); - + top_menu($head); - + $menu = new Menu(); - + $menu->add(DOL_URL_ROOT."/oscommerce_ws/index.php", $langs->trans("OSCommerceShop")); $menu->add_submenu(DOL_URL_ROOT."/oscommerce_ws/produits/index.php", $langs->trans("Products")); $menu->add_submenu(DOL_URL_ROOT."/oscommerce_ws/produits/OSCvente.php", $langs->trans("AddProd")); $menu->add_submenu(DOL_URL_ROOT."/oscommerce_ws/produits/categories.php", $langs->trans("Categories")); $menu->add_submenu(DOL_URL_ROOT."/oscommerce_ws/clients/index.php", $langs->trans("Clients")); $menu->add_submenu(DOL_URL_ROOT."/oscommerce_ws/commandes/index.php", $langs->trans("Commandes")); - + left_menu($menu->liste); } diff --git a/htdocs/phenix/pre.inc.php b/htdocs/phenix/pre.inc.php index f1120fd5801..68c2b70847e 100644 --- a/htdocs/phenix/pre.inc.php +++ b/htdocs/phenix/pre.inc.php @@ -26,16 +26,16 @@ require ("../main.inc.php"); -function llxHeader($head = "", $title="", $help_url='') +function llxHeader($head = '', $title='', $help_url='') { global $langs; - + top_menu($head, $title); - + $menu = new Menu(); - - - + + + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php index 045846d0308..ba5ced1fc25 100644 --- a/htdocs/pre.inc.php +++ b/htdocs/pre.inc.php @@ -28,7 +28,7 @@ require ("./main.inc.php"); -function llxHeader($head = "") +function llxHeader($head = '', $title='', $help_url='') { global $user, $conf, $langs; @@ -175,6 +175,6 @@ function llxHeader($head = "") $menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("Setup")); } - left_menu($menu->liste); + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index bbec383fa33..e77478376ea 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -41,7 +41,7 @@ if ($user->societe_id > 0) * View */ -llxHeader("",$langs->trans("Projects"),"Projet"); +llxHeader("",$langs->trans("Projects"),"EN:Projects|FR:Projet|ES:Proyectos"); $text=$langs->trans("Projects"); if ($_REQUEST["mode"]=='mine') $text=$langs->trans("MyProjects"); diff --git a/htdocs/projet/pre.inc.php b/htdocs/projet/pre.inc.php index 76021b88454..eb17cc3af82 100644 --- a/htdocs/projet/pre.inc.php +++ b/htdocs/projet/pre.inc.php @@ -40,7 +40,7 @@ $langs->load("commercial"); * @param unknown_type $title * @param unknown_type $help_url */ -function llxHeader($head = "", $title="", $help_url='') +function llxHeader($head = '', $title='', $help_url='') { global $langs, $user; diff --git a/htdocs/rapport/pre.inc.php b/htdocs/rapport/pre.inc.php index 62e2befc009..80b700f8898 100644 --- a/htdocs/rapport/pre.inc.php +++ b/htdocs/rapport/pre.inc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003 Rodolphe Quiedeville * * 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 @@ -22,25 +22,26 @@ require ("../main.inc.php"); -function llxHeader($head = "") { - global $user, $conf; +function llxHeader($head = '', $title='', $help_url='') +{ + global $user, $conf; - /* - * - * - */ - top_menu($head); + /* + * + * + */ + top_menu($head); - $menu = new Menu(); + $menu = new Menu(); - $menu->add(DOL_URL_ROOT."/rapport/presentation", "Presentation"); + $menu->add(DOL_URL_ROOT."/rapport/presentation", "Presentation"); - /* - * - */ + /* + * + */ - left_menu($menu->liste); + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/societe.php b/htdocs/societe.php index 0966a91074d..0ba7d82250f 100644 --- a/htdocs/societe.php +++ b/htdocs/societe.php @@ -111,7 +111,7 @@ if ($mode == 'search') * View */ -llxHeader(); +llxHeader($langs->trans("ThirdParty"),'','EN:Third_Parties|FR:Tiers|ES:Empresas'); $form=new Form($db); $companystatic=new Societe($db); diff --git a/htdocs/societe/pre.inc.php b/htdocs/societe/pre.inc.php index 6b21cb877c8..b1f6ef71fb7 100644 --- a/htdocs/societe/pre.inc.php +++ b/htdocs/societe/pre.inc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -30,7 +30,7 @@ require ("../main.inc.php"); -function llxHeader($head = "") +function llxHeader($head = '', $title='', $help_url='') { global $langs, $user, $conf; @@ -52,7 +52,7 @@ function llxHeader($head = "") $menu->add_submenu("notify/index.php", $langs->trans("Notifications")); } - left_menu($menu->liste); + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/user/pre.inc.php b/htdocs/user/pre.inc.php index 1cf4fb183a1..0f7c519cee8 100644 --- a/htdocs/user/pre.inc.php +++ b/htdocs/user/pre.inc.php @@ -24,7 +24,7 @@ */ require("../main.inc.php"); -function llxHeader($head = "", $title = "") +function llxHeader($head = '', $title='', $help_url='') { global $user,$langs; @@ -55,7 +55,7 @@ function llxHeader($head = "", $title = "") } - left_menu($menu->liste); + left_menu($menu->liste, $help_url); } ?>