Fix: meilleur visualisation des types de catgorie
This commit is contained in:
parent
bc0b10f5a8
commit
a1c9025602
@ -726,7 +726,7 @@ class Categorie
|
||||
{
|
||||
if ($url == '')
|
||||
{
|
||||
$w[] = "<a href='".DOL_URL_ROOT."/categories/viewcat.php?id=".$cat->id."'>".$cat->label."</a>";
|
||||
$w[] = "<a href='".DOL_URL_ROOT."/categories/viewcat.php?id=".$cat->id."&type=".$cat->type."'>".$cat->label."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
\brief Page accueil espace categories
|
||||
*/
|
||||
|
||||
require "./pre.inc.php";
|
||||
require("./pre.inc.php");
|
||||
|
||||
$type=$_GET['type'];
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 "<tr><td>".$langs->trans ("NoProd")."</td></tr>";
|
||||
print "<tr><td>".$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -257,7 +262,7 @@ if($c->type == 1)
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr><td>".$langs->trans ("NoProd")."</td></tr>";
|
||||
print "<tr><td>".$langs->trans ("ThisCategoryHasNoSupplier")."</td></tr>";
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -274,7 +279,7 @@ if($c->type == 2)
|
||||
{
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print "<tr class='liste_titre'><td>".$langs->trans("Commercial")."</td></tr>\n";
|
||||
print "<tr class='liste_titre'><td>".$langs->trans("Customers")."</td></tr>\n";
|
||||
|
||||
if (sizeof ($socs) > 0)
|
||||
{
|
||||
@ -294,7 +299,7 @@ if($c->type == 2)
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr><td>".$langs->trans ("NoProd")."</td></tr>";
|
||||
print "<tr><td>".$langs->trans("ThisCategoryHasNoCustomer")."</td></tr>";
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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.
|
||||
@ -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
|
||||
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.
|
||||
Loading…
Reference in New Issue
Block a user