Skip to content
Snippets Groups Projects
Commit 0886047c authored by Rodolphe Quiedeville's avatar Rodolphe Quiedeville
Browse files

Ajout Menu documents

parent 444840c8
No related branches found
No related tags found
No related merge requests found
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 ric Seigne <erics@rycks.com>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
......@@ -24,9 +24,9 @@
*/
/**
\file htdocs/pre.inc.php
\brief Fichier gestionnaire du menu de gauche de l'accueil
\version $Revision$
\file htdocs/pre.inc.php
\brief Fichier gestionnaire du menu de gauche de l'accueil
\version $Revision$
*/
require ("./main.inc.php");
......@@ -34,70 +34,70 @@ $user->getrights();
function llxHeader($head = "")
{
global $user, $conf, $langs;
global $user, $conf, $langs;
top_menu($head);
$menu = new Menu();
if ($conf->societe->enabled && $user->rights->societe->lire)
top_menu($head);
$menu = new Menu();
if ($conf->societe->enabled && $user->rights->societe->lire)
{
$langs->load("companies");
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"));
if ($user->rights->societe->creer)
$langs->load("companies");
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"));
if ($user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewCompany"));
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewCompany"));
}
if(is_dir("societe/groupe"))
if(is_dir("societe/groupe"))
{
$menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
$menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
}
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts"));
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts"));
}
if ($conf->commercial->enabled && $user->rights->commercial->lire)
{
$langs->load("commercial");
$menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial"));
$menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers"));
$menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects"));
if ($user->rights->propale->lire)
if ($conf->commercial->enabled && $user->rights->commercial->lire)
{
$langs->load("commercial");
$menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial"));
$menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers"));
$menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects"));
if ($user->rights->propale->lire)
{
$langs->load("propal");
$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
$langs->load("propal");
$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
}
}
if ($conf->compta->enabled || $conf->comptaexpert->enabled)
if ($conf->compta->enabled || $conf->comptaexpert->enabled)
{
$langs->load("compta");
$menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("MenuFinancial"));
if ($user->rights->facture->lire) {
$langs->load("bills");
$menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills"));
}
$langs->load("compta");
$menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("MenuFinancial"));
if ($user->rights->facture->lire) {
$langs->load("bills");
$menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills"));
}
}
if ($conf->fichinter->enabled && $user->rights->ficheinter->lire)
if ($conf->fichinter->enabled && $user->rights->ficheinter->lire)
{
$langs->trans("interventions");
$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
$langs->trans("interventions");
$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
}
if (($conf->produit->enabled || $conf->service->enabled) && $user->rights->produit->lire)
{
$langs->load("products");
$chaine="";
if ($conf->produit->enabled) { $chaine.= $langs->trans("Products"); }
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->service->enabled) { $chaine.= $langs->trans("Services"); }
$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
if (($conf->produit->enabled || $conf->service->enabled) && $user->rights->produit->lire)
{
$langs->load("products");
$chaine="";
if ($conf->produit->enabled) { $chaine.= $langs->trans("Products"); }
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->service->enabled) { $chaine.= $langs->trans("Services"); }
$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
/*
if ($conf->boutique->enabled)
{
......@@ -115,80 +115,84 @@ function llxHeader($head = "")
}
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"));
$langs->load("orders");
$menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders"));
}
if ($conf->expedition->enabled && $user->rights->expedition->lire)
if ($conf->document->enabled)
{
$langs->load("sendings");
$menu->add(DOL_URL_ROOT."/expedition/index.php", $langs->trans("Sendings"));
$menu->add(DOL_URL_ROOT."/docs/index.php", $langs->trans("Documents"));
}
if ($conf->mailing->enabled && $user->rights->mailing->lire)
if ($conf->expedition->enabled && $user->rights->expedition->lire)
{
$langs->load("mails");
$menu->add(DOL_URL_ROOT."/comm/mailing/index.php",$langs->trans("EMailings"));
$langs->load("sendings");
$menu->add(DOL_URL_ROOT."/expedition/index.php", $langs->trans("Sendings"));
}
if ($conf->telephonie->enabled)
if ($conf->mailing->enabled && $user->rights->mailing->lire)
{
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Tlphonie");
$langs->load("mails");
$menu->add(DOL_URL_ROOT."/comm/mailing/index.php",$langs->trans("EMailings"));
}
if ($conf->don->enabled)
if ($conf->telephonie->enabled)
{
$menu->add(DOL_URL_ROOT."/compta/dons/index.php", $langs->trans("Donations"));
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Tlphonie");
}
if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire)
if ($conf->don->enabled)
{
$langs->load("suppliers");
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
$menu->add(DOL_URL_ROOT."/compta/dons/index.php", $langs->trans("Donations"));
}
if ($conf->voyage->enabled && $user->societe_id == 0)
if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire)
{
$menu->add(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/reduc.php","Reduc");
$langs->load("suppliers");
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
if ($conf->domaine->enabled)
if ($conf->voyage->enabled && $user->societe_id == 0)
{
$menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines");
$menu->add(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/reduc.php","Reduc");
}
if ($conf->postnuke->enabled)
if ($conf->domaine->enabled)
{
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
$menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines");
}
if ($conf->bookmark->enabled && $user->rights->bookmark->lire)
if ($conf->postnuke->enabled)
{
$menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks"));
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
}
if ($conf->export->enabled)
if ($conf->bookmark->enabled && $user->rights->bookmark->lire)
{
$langs->load("exports");
$menu->add(DOL_URL_ROOT."/exports/index.php", $langs->trans("Exports"));
$menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks"));
}
if ($user->rights->user->user->lire || $user->admin)
if ($conf->export->enabled)
{
$langs->load("users");
$menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("MenuUsersAndGroups"));
$langs->load("exports");
$menu->add(DOL_URL_ROOT."/exports/index.php", $langs->trans("Exports"));
}
if ($user->admin)
if ($user->rights->user->user->lire || $user->admin)
{
$menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("Setup"));
$langs->load("users");
$menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("MenuUsersAndGroups"));
}
left_menu($menu->liste);
if ($user->admin)
{
$menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("Setup"));
}
left_menu($menu->liste);
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment