*
* 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
@@ -25,7 +26,7 @@
\version $Revision$
*/
-require "./pre.inc.php";
+require("./pre.inc.php");
if ($_REQUEST['id'] == "")
{
@@ -85,7 +86,11 @@ $head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h++;
-dolibarr_fiche_head($head, 'card', $langs->trans("Category"));
+if ($type == 0) $title=$langs->trans("ProductsCategoryShort");
+if ($type == 1) $title=$langs->trans("SuppliersCategoryShort");
+if ($type == 2) $title=$langs->trans("CustomersCategoryShort");
+
+dolibarr_fiche_head($head, 'card', $title);
/*
@@ -220,7 +225,7 @@ if($c->type == 0)
}
else
{
- print "| ".$langs->trans ("NoProd")." |
";
+ print "| ".$langs->trans("ThisCategoryHasNoProduct")." |
";
}
print "\n";
}
@@ -257,7 +262,7 @@ if($c->type == 1)
}
else
{
- print "| ".$langs->trans ("NoProd")." |
";
+ print "| ".$langs->trans ("ThisCategoryHasNoSupplier")." |
";
}
print "\n";
}
@@ -274,7 +279,7 @@ if($c->type == 2)
{
print "
";
print "\n";
- print "| ".$langs->trans("Commercial")." |
\n";
+ print "| ".$langs->trans("Customers")." |
\n";
if (sizeof ($socs) > 0)
{
@@ -294,7 +299,7 @@ if($c->type == 2)
}
else
{
- print "| ".$langs->trans ("NoProd")." |
";
+ print "| ".$langs->trans("ThisCategoryHasNoCustomer")." |
";
}
print "
\n";
}
diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php
index f1e7b02b84e..4d36cb1bda9 100644
--- a/htdocs/includes/menus/barre_left/eldy_backoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php
@@ -232,10 +232,18 @@ class MenuLeft {
$newmenu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?leftmenu=contacts&action=create", $langs->trans("NewContact"), 1, $user->rights->societe->contact->creer);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
+ // Catégories
if ($conf->categorie->enabled)
{
$langs->load("categories");
- $newmenu->add(DOL_URL_ROOT."/categories/index.php?leftmenu=cat&type=2", $langs->trans("Categories"), 0, $user->rights->categorie->lire);
+ // Catégories fournisseurs
+ $newmenu->add(DOL_URL_ROOT."/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
+ if ($user->societe_id == 0)
+ {
+ $newmenu->add_submenu(DOL_URL_ROOT."/categories/fiche.php?action=create&type=1", $langs->trans("NewCat"), 1, $user->rights->categorie->creer);
+ }
+ // Catégories clients
+ $newmenu->add(DOL_URL_ROOT."/categories/index.php?leftmenu=cat&type=2", $langs->trans("CustomersCategoriesShort"), 0, $user->rights->categorie->lire);
if ($user->societe_id == 0)
{
$newmenu->add_submenu(DOL_URL_ROOT."/categories/fiche.php?action=create&type=2", $langs->trans("NewCat"), 1, $user->rights->categorie->creer);
diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang
index 27227106bf2..c9bc28bc8bf 100644
--- a/htdocs/langs/en_US/categories.lang
+++ b/htdocs/langs/en_US/categories.lang
@@ -27,7 +27,6 @@ CreateThisCat=Create this category
ValidateFields=Validate the fields
NoSubCat=No subcategory.
SubCatOf=Subcategory
-NoProd=This category does not contain any product.
FoundCats=Found categories
FoundCatsForName=Categories found for the name :
FoundSubCatsIn=Subcategories found in the category
@@ -59,3 +58,12 @@ CategoriesTree=Categories tree
DeleteCategory=Delete category
ConfirmDeleteCategory=Are you sure you want to delete this category ?
NoCategoriesDefined=No category defined
+SuppliersCategoryShort=Suppliers category
+CustomersCategoryShort=Customers category
+ProductsCategoryShort=Products category
+SuppliersCategoriesShort=Suppliers categories
+CustomersCategoriesShort=Customers categories
+ProductsCategoriesShort=Products categories
+ThisCategoryHasNoProduct=This category does not contain any product.
+ThisCategoryHasNoSupplier=This category does not contain any supplier.
+ThisCategoryHasNoCustomer=This category does not contain any customer.
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang
index 241742b34f9..600000a0811 100644
--- a/htdocs/langs/fr_FR/categories.lang
+++ b/htdocs/langs/fr_FR/categories.lang
@@ -27,7 +27,6 @@ CreateThisCat=Ajouter cette cat
ValidateFields=Valider les champs
NoSubCat=Cette catégorie ne contient aucune sous-catégorie.
SubCatOf=Sous-catégorie
-NoProd=Cette catégorie ne contient aucun produit.
FoundCats=Catégories trouvées
FoundCatsForName=Catégories trouvées pour le nom :
FoundSubCatsIn=Sous-catégories trouvées dans la catégorie
@@ -58,4 +57,13 @@ ContentsNotVisibleByAllShort=Contenu non visible par tous
CategoriesTree=Arbre des catégories
DeleteCategory=Supprimer categorie
ConfirmDeleteCategory=Etes vous sur de vouloir supprimer cette catégorie ?
-NoCategoriesDefined=Aucune catégorie définie
\ No newline at end of file
+NoCategoriesDefined=Aucune catégorie définie
+SuppliersCategoryShort=Catégorie fournisseurs
+CustomersCategoryShort=Catégorie clients
+ProductsCategoryShort=Catégorie produits
+SuppliersCategoriesShort=Catégories fournisseurs
+CustomersCategoriesShort=Catégories clients
+ProductsCategoriesShort=Catégories produits
+ThisCategoryHasNoProduct=Cette catégorie ne contient aucun produit.
+ThisCategoryHasNoSupplier=Cette catégorie ne contient aucun fournisseur.
+ThisCategoryHasNoCustomer=Cette catégorie ne contient aucun client.
\ No newline at end of file