diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 02e9339b867..49c915dd408 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -969,12 +969,11 @@ class Categorie $result=''; $lien = ''; - $label=$this->label; + $label=$langs->trans("ShowCategory").': '.$this->label; $lienfin=''; $picto='category'; - $label=$langs->trans("ShowCategory").': '.$this->ref; if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); if ($withpicto && $withpicto != 2) $result.=' '; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 28f3d72d6f6..a605a34615b 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -244,8 +244,8 @@ foreach($fulltree as $key => $val) $newref=str_replace('_',' ',$ref); $lienfin=''; print $lien.$newref.$lienfin; - if (! in_array($val['id'],$expandedsectionarray)) print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1); - else print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder-expanded.gif','',1); + if (! in_array($val['id'],$expandedsectionarray)) print img_picto('','object_category'); + else print img_picto('','object_category-expanded'); print ''; // Show link print ''; @@ -256,7 +256,7 @@ foreach($fulltree as $key => $val) $categstatic->type=$type; print $categstatic->getNomUrl(0,'',28); */ - print dol_trunc($val['label'],28); + print '  '.dol_trunc($val['label'],28); //if ($section == $val['id']) print ''; print ''; print ''; diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 73ee3ffba82..2f662796251 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -114,7 +114,7 @@ if ($_GET["id"] || $_GET["ref"]) if ($type == 1) $title=$langs->trans("SuppliersCategoryShort"); if ($type == 2) $title=$langs->trans("CustomersCategoryShort"); - dol_fiche_head($head, 'photos', $title); + dol_fiche_head($head, 'photos', $title, 0, 'category'); /* * Confirmation de la suppression de photo diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index f51637b0648..eb518a1ba3c 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -28,24 +28,29 @@ require("./pre.inc.php"); -if ($_REQUEST['id'] == "") -{ - dol_print_error('','Missing parameter id'); - exit(); -} - -$mesg = ''; -$type=$_REQUEST['type']; - // Security check if (! $user->rights->categorie->lire) { accessforbidden(); } -$c = new Categorie($db); -$c->fetch($_REQUEST['id']); +$mesg = ''; +if ($_REQUEST['id'] == "") +{ + dol_print_error('','Missing parameter id'); + exit(); +} + +$c = new Categorie($db); +$result=$c->fetch($_REQUEST['id']); +if ($result <= 0) +{ + dol_print_error($db,$c->error); + exit; +} + +$type=$c->type; /* @@ -96,7 +101,7 @@ if ($type == 0) $title=$langs->trans("ProductsCategoryShort"); if ($type == 1) $title=$langs->trans("SuppliersCategoryShort"); if ($type == 2) $title=$langs->trans("CustomersCategoryShort"); -dol_fiche_head($head, 'card', $title); +dol_fiche_head($head, 'card', $title, 0, 'category'); /* diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 8c83c52a4bb..db71ed8d330 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -28,6 +28,7 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.commande.class.php'); require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.facture.class.php'); +require_once(DOL_DOCUMENT_ROOT.'/categories/categorie.class.php'); $langs->load("suppliers"); $langs->load("orders"); @@ -96,9 +97,7 @@ else } -/* - * Commandes brouillons - */ +// Draft orders if ($conf->fournisseur->enabled) { $langs->load("orders"); @@ -153,9 +152,7 @@ if ($conf->fournisseur->enabled) } } -/** - * Factures brouillons - */ +// Draft invoices if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) { $sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.type,"; @@ -221,8 +218,7 @@ print "\n"; print ''; /* - * Liste des 10 derniers saisis - * + * List last modified supliers */ $max=10; $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.datec, s.datea, s.tms, st.libelle as stcomm, s.prefix_comm"; @@ -273,9 +269,10 @@ else /* - * List of categories + * List of suppliers categories */ $companystatic->LoadSupplierCateg(); +$categstatic=new Categorie($db); if (sizeof($companystatic->SupplierCategories)) { @@ -291,7 +288,11 @@ if (sizeof($companystatic->SupplierCategories)) { $var=!$var; print "\n"; - print ''.stripslashes($label).''; + print ''; + $categstatic->id=$rowid; + $categstatic->ref=$label; + $categstatic->label=$label; + print $categstatic->getNomUrl(1); print ''; print '('.$langs->trans("Stats").')'; print "\n"; diff --git a/htdocs/theme/auguria/img/object_category-expanded.png b/htdocs/theme/auguria/img/object_category-expanded.png new file mode 100644 index 00000000000..8168f76fa26 Binary files /dev/null and b/htdocs/theme/auguria/img/object_category-expanded.png differ diff --git a/htdocs/theme/auguria/img/object_category.png b/htdocs/theme/auguria/img/object_category.png new file mode 100644 index 00000000000..aaea38dbef2 Binary files /dev/null and b/htdocs/theme/auguria/img/object_category.png differ diff --git a/htdocs/theme/bluelagoon/img/object_category-expanded.png b/htdocs/theme/bluelagoon/img/object_category-expanded.png new file mode 100644 index 00000000000..8168f76fa26 Binary files /dev/null and b/htdocs/theme/bluelagoon/img/object_category-expanded.png differ diff --git a/htdocs/theme/bluelagoon/img/object_category.png b/htdocs/theme/bluelagoon/img/object_category.png new file mode 100644 index 00000000000..aaea38dbef2 Binary files /dev/null and b/htdocs/theme/bluelagoon/img/object_category.png differ diff --git a/htdocs/theme/eldy/img/object_category-expanded.png b/htdocs/theme/eldy/img/object_category-expanded.png new file mode 100644 index 00000000000..8168f76fa26 Binary files /dev/null and b/htdocs/theme/eldy/img/object_category-expanded.png differ diff --git a/htdocs/theme/eldy/img/object_category.png b/htdocs/theme/eldy/img/object_category.png new file mode 100644 index 00000000000..aaea38dbef2 Binary files /dev/null and b/htdocs/theme/eldy/img/object_category.png differ diff --git a/htdocs/theme/freelug/img/object_category-expanded.png b/htdocs/theme/freelug/img/object_category-expanded.png new file mode 100644 index 00000000000..8168f76fa26 Binary files /dev/null and b/htdocs/theme/freelug/img/object_category-expanded.png differ diff --git a/htdocs/theme/freelug/img/object_category.png b/htdocs/theme/freelug/img/object_category.png new file mode 100644 index 00000000000..aaea38dbef2 Binary files /dev/null and b/htdocs/theme/freelug/img/object_category.png differ diff --git a/htdocs/theme/rodolphe/img/object_category-expanded.png b/htdocs/theme/rodolphe/img/object_category-expanded.png new file mode 100644 index 00000000000..8168f76fa26 Binary files /dev/null and b/htdocs/theme/rodolphe/img/object_category-expanded.png differ diff --git a/htdocs/theme/rodolphe/img/object_category.png b/htdocs/theme/rodolphe/img/object_category.png new file mode 100644 index 00000000000..aaea38dbef2 Binary files /dev/null and b/htdocs/theme/rodolphe/img/object_category.png differ diff --git a/htdocs/theme/yellow/img/object_category-expanded.png b/htdocs/theme/yellow/img/object_category-expanded.png new file mode 100644 index 00000000000..8168f76fa26 Binary files /dev/null and b/htdocs/theme/yellow/img/object_category-expanded.png differ diff --git a/htdocs/theme/yellow/img/object_category.png b/htdocs/theme/yellow/img/object_category.png new file mode 100644 index 00000000000..aaea38dbef2 Binary files /dev/null and b/htdocs/theme/yellow/img/object_category.png differ