From 172fcf6430294e9db6719dcceb05ae6a0e7fb69f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 30 Mar 2006 15:02:24 +0000 Subject: [PATCH] =?UTF-8?q?d=E9but=20ajout=20possibilit=E9=20de=20d=E9term?= =?UTF-8?q?iner=20si=20le=20contenu=20d'une=20cat=E9gorie=20sera=20visible?= =?UTF-8?q?=20ou=20=20non=20dans=20la=20liste=20des=20produits/services,?= =?UTF-8?q?=20ceci=20afin=20de=20pouvoir=20cacher=20les=20sous-produits=20?= =?UTF-8?q?=20par=20exemple.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/categories/viewcat.php | 30 ++++++++++++++++++++++++++++-- htdocs/langs/en_US/categories.lang | 4 +++- htdocs/langs/fr_FR/categories.lang | 2 ++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 2df8463b82a..69a0e262ee5 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -18,6 +18,13 @@ require "./pre.inc.php"; +$user->getrights('categorie'); + +if (! $user->rights->categorie->lire) +{ + accessforbidden(); +} + if ($_REQUEST['id'] == "") { dolibarr_print_error (); @@ -67,6 +74,16 @@ else print "\t\n"; print "\t\t".$cat->label."\n"; print "\t\t".$cat->description."\n"; + + if ($cat->visible == 1) + { + print "\t\t".$langs->trans("ContentsVisibleByAllShort")."\n"; + } + else + { + print "\t\t".$langs->trans("ContentsNoVisibleByAllShort")."\n"; + } + print "\t\n"; } } @@ -115,8 +132,17 @@ else * Boutons actions */ print "
\n"; -print "".$langs->trans("Edit").""; -print "".$langs->trans("Delete").""; + +if ($user->rights->categorie->creer) +{ + print "".$langs->trans("Edit").""; +} + +if ($user->rights->categorie->supprimer) +{ + print "".$langs->trans("Delete").""; +} + print "
"; diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 6559f4e6502..bc441be0d2b 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -35,4 +35,6 @@ WasAddedSuccessfully=was added successfully. ProductIsInCategories=Product/Service is in following categories ClassifyInCategory=Classify in category ReturnInProduct=Return in product/service card -ContentsVisibleByAll=The contents will be visible by all \ No newline at end of file +ContentsVisibleByAll=The contents will be visible by all +ContentsVisibleByAllShort=Contents visible by all +ContentsNoVisibleByAllShort=Contents no visible by all \ No newline at end of file diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index 012efb98a63..93c7113e92a 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -38,3 +38,5 @@ NoneCategory=Aucune CategoryExistsAtSameLevel=Cette catégorie existe déjà au même endroit ReturnInProduct=Retour sur la fiche produit/service ContentsVisibleByAll=Le contenu sera visible par tous +ContentsVisibleByAllShort=Contenu visible par tous +ContentsNoVisibleByAllShort=Contenu non visible par tous