From 1a47e38b117120063079147f142b3bec40dbd614 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Nov 2009 19:13:37 +0000 Subject: [PATCH] Fix: Bad link to category Missing picto for categories --- htdocs/categories/categorie.class.php | 3 +- htdocs/categories/index.php | 6 ++-- htdocs/categories/photos.php | 2 +- htdocs/categories/viewcat.php | 29 ++++++++++-------- htdocs/fourn/index.php | 21 +++++++------ .../auguria/img/object_category-expanded.png | Bin 0 -> 295 bytes htdocs/theme/auguria/img/object_category.png | Bin 0 -> 281 bytes .../img/object_category-expanded.png | Bin 0 -> 295 bytes .../theme/bluelagoon/img/object_category.png | Bin 0 -> 281 bytes .../eldy/img/object_category-expanded.png | Bin 0 -> 295 bytes htdocs/theme/eldy/img/object_category.png | Bin 0 -> 281 bytes .../freelug/img/object_category-expanded.png | Bin 0 -> 295 bytes htdocs/theme/freelug/img/object_category.png | Bin 0 -> 281 bytes .../rodolphe/img/object_category-expanded.png | Bin 0 -> 295 bytes htdocs/theme/rodolphe/img/object_category.png | Bin 0 -> 281 bytes .../yellow/img/object_category-expanded.png | Bin 0 -> 295 bytes htdocs/theme/yellow/img/object_category.png | Bin 0 -> 281 bytes 17 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 htdocs/theme/auguria/img/object_category-expanded.png create mode 100644 htdocs/theme/auguria/img/object_category.png create mode 100644 htdocs/theme/bluelagoon/img/object_category-expanded.png create mode 100644 htdocs/theme/bluelagoon/img/object_category.png create mode 100644 htdocs/theme/eldy/img/object_category-expanded.png create mode 100644 htdocs/theme/eldy/img/object_category.png create mode 100644 htdocs/theme/freelug/img/object_category-expanded.png create mode 100644 htdocs/theme/freelug/img/object_category.png create mode 100644 htdocs/theme/rodolphe/img/object_category-expanded.png create mode 100644 htdocs/theme/rodolphe/img/object_category.png create mode 100644 htdocs/theme/yellow/img/object_category-expanded.png create mode 100644 htdocs/theme/yellow/img/object_category.png 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 0000000000000000000000000000000000000000..8168f76fa26b3e8f5002b4e21966d23e5f026cdc GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEPzNs+rZGkpdseIDo`VPiKnkC`%P{ZVGhOxFQ07# z3UL;AL>4nJa0`Jj5jgR3=A9lx&I`x0{IdFJ|V9E|NoCj%6swp-I+@_ zfN1}*vp|_|-+#oeG_wG*7)yfuf*Bm1-ADs+d^}woLn>~?_Bsk3P~cz|?)dWGUXROa z8~1csXBGy(4G)t~md(;WZsinQ>G~^l-sxAFNA#jjO3Yc_T3v8=nrF}A%~>pk;n$Cg d|FEdrGlPvW{na)08JYD@<);T3K0RVHlW8we+ literal 0 HcmV?d00001 diff --git a/htdocs/theme/auguria/img/object_category.png b/htdocs/theme/auguria/img/object_category.png new file mode 100644 index 0000000000000000000000000000000000000000..aaea38dbef2c74ef5ec519976be9b70ecf4e94d2 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEUb)76|@Zu4Gh$uY)=AeWH0gbb!ETF%_7Xf?DxEV z7Ep+@z$3Dlfq`2Hgc&d0t@{HMWJ!1Qb!1@J*w6hZkrl|72=EDU{r~@eL{i?1*YD0; zx&cJZ RW(G8g!PC{xWt~$(699-`U&a6c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8168f76fa26b3e8f5002b4e21966d23e5f026cdc GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEPzNs+rZGkpdseIDo`VPiKnkC`%P{ZVGhOxFQ07# z3UL;AL>4nJa0`Jj5jgR3=A9lx&I`x0{IdFJ|V9E|NoCj%6swp-I+@_ zfN1}*vp|_|-+#oeG_wG*7)yfuf*Bm1-ADs+d^}woLn>~?_Bsk3P~cz|?)dWGUXROa z8~1csXBGy(4G)t~md(;WZsinQ>G~^l-sxAFNA#jjO3Yc_T3v8=nrF}A%~>pk;n$Cg d|FEdrGlPvW{na)08JYD@<);T3K0RVHlW8we+ literal 0 HcmV?d00001 diff --git a/htdocs/theme/bluelagoon/img/object_category.png b/htdocs/theme/bluelagoon/img/object_category.png new file mode 100644 index 0000000000000000000000000000000000000000..aaea38dbef2c74ef5ec519976be9b70ecf4e94d2 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEUb)76|@Zu4Gh$uY)=AeWH0gbb!ETF%_7Xf?DxEV z7Ep+@z$3Dlfq`2Hgc&d0t@{HMWJ!1Qb!1@J*w6hZkrl|72=EDU{r~@eL{i?1*YD0; zx&cJZ RW(G8g!PC{xWt~$(699-`U&a6c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8168f76fa26b3e8f5002b4e21966d23e5f026cdc GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEPzNs+rZGkpdseIDo`VPiKnkC`%P{ZVGhOxFQ07# z3UL;AL>4nJa0`Jj5jgR3=A9lx&I`x0{IdFJ|V9E|NoCj%6swp-I+@_ zfN1}*vp|_|-+#oeG_wG*7)yfuf*Bm1-ADs+d^}woLn>~?_Bsk3P~cz|?)dWGUXROa z8~1csXBGy(4G)t~md(;WZsinQ>G~^l-sxAFNA#jjO3Yc_T3v8=nrF}A%~>pk;n$Cg d|FEdrGlPvW{na)08JYD@<);T3K0RVHlW8we+ literal 0 HcmV?d00001 diff --git a/htdocs/theme/eldy/img/object_category.png b/htdocs/theme/eldy/img/object_category.png new file mode 100644 index 0000000000000000000000000000000000000000..aaea38dbef2c74ef5ec519976be9b70ecf4e94d2 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEUb)76|@Zu4Gh$uY)=AeWH0gbb!ETF%_7Xf?DxEV z7Ep+@z$3Dlfq`2Hgc&d0t@{HMWJ!1Qb!1@J*w6hZkrl|72=EDU{r~@eL{i?1*YD0; zx&cJZ RW(G8g!PC{xWt~$(699-`U&a6c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8168f76fa26b3e8f5002b4e21966d23e5f026cdc GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEPzNs+rZGkpdseIDo`VPiKnkC`%P{ZVGhOxFQ07# z3UL;AL>4nJa0`Jj5jgR3=A9lx&I`x0{IdFJ|V9E|NoCj%6swp-I+@_ zfN1}*vp|_|-+#oeG_wG*7)yfuf*Bm1-ADs+d^}woLn>~?_Bsk3P~cz|?)dWGUXROa z8~1csXBGy(4G)t~md(;WZsinQ>G~^l-sxAFNA#jjO3Yc_T3v8=nrF}A%~>pk;n$Cg d|FEdrGlPvW{na)08JYD@<);T3K0RVHlW8we+ literal 0 HcmV?d00001 diff --git a/htdocs/theme/freelug/img/object_category.png b/htdocs/theme/freelug/img/object_category.png new file mode 100644 index 0000000000000000000000000000000000000000..aaea38dbef2c74ef5ec519976be9b70ecf4e94d2 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEUb)76|@Zu4Gh$uY)=AeWH0gbb!ETF%_7Xf?DxEV z7Ep+@z$3Dlfq`2Hgc&d0t@{HMWJ!1Qb!1@J*w6hZkrl|72=EDU{r~@eL{i?1*YD0; zx&cJZ RW(G8g!PC{xWt~$(699-`U&a6c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8168f76fa26b3e8f5002b4e21966d23e5f026cdc GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEPzNs+rZGkpdseIDo`VPiKnkC`%P{ZVGhOxFQ07# z3UL;AL>4nJa0`Jj5jgR3=A9lx&I`x0{IdFJ|V9E|NoCj%6swp-I+@_ zfN1}*vp|_|-+#oeG_wG*7)yfuf*Bm1-ADs+d^}woLn>~?_Bsk3P~cz|?)dWGUXROa z8~1csXBGy(4G)t~md(;WZsinQ>G~^l-sxAFNA#jjO3Yc_T3v8=nrF}A%~>pk;n$Cg d|FEdrGlPvW{na)08JYD@<);T3K0RVHlW8we+ literal 0 HcmV?d00001 diff --git a/htdocs/theme/rodolphe/img/object_category.png b/htdocs/theme/rodolphe/img/object_category.png new file mode 100644 index 0000000000000000000000000000000000000000..aaea38dbef2c74ef5ec519976be9b70ecf4e94d2 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEUb)76|@Zu4Gh$uY)=AeWH0gbb!ETF%_7Xf?DxEV z7Ep+@z$3Dlfq`2Hgc&d0t@{HMWJ!1Qb!1@J*w6hZkrl|72=EDU{r~@eL{i?1*YD0; zx&cJZ RW(G8g!PC{xWt~$(699-`U&a6c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8168f76fa26b3e8f5002b4e21966d23e5f026cdc GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEPzNs+rZGkpdseIDo`VPiKnkC`%P{ZVGhOxFQ07# z3UL;AL>4nJa0`Jj5jgR3=A9lx&I`x0{IdFJ|V9E|NoCj%6swp-I+@_ zfN1}*vp|_|-+#oeG_wG*7)yfuf*Bm1-ADs+d^}woLn>~?_Bsk3P~cz|?)dWGUXROa z8~1csXBGy(4G)t~md(;WZsinQ>G~^l-sxAFNA#jjO3Yc_T3v8=nrF}A%~>pk;n$Cg d|FEdrGlPvW{na)08JYD@<);T3K0RVHlW8we+ literal 0 HcmV?d00001 diff --git a/htdocs/theme/yellow/img/object_category.png b/htdocs/theme/yellow/img/object_category.png new file mode 100644 index 0000000000000000000000000000000000000000..aaea38dbef2c74ef5ec519976be9b70ecf4e94d2 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh3?wzC-F*zCbW2<#N}P*Q6H7Al^Atidb5j{| zQ;YNzOce6+%k&hC3=Aw43@xopEUb)76|@Zu4Gh$uY)=AeWH0gbb!ETF%_7Xf?DxEV z7Ep+@z$3Dlfq`2Hgc&d0t@{HMWJ!1Qb!1@J*w6hZkrl|72=EDU{r~@eL{i?1*YD0; zx&cJZ RW(G8g!PC{xWt~$(699-`U&a6c literal 0 HcmV?d00001