From dc1df590ab94189aea86d69a5320ddde9a971061 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Mar 2010 19:57:16 +0000 Subject: [PATCH] Works on canvas capability --- htdocs/product/canvas/default/product.default.class.php | 3 ++- htdocs/product/canvas/service/product.service.class.php | 2 +- htdocs/product/liste.php | 9 ++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/product/canvas/default/product.default.class.php b/htdocs/product/canvas/default/product.default.class.php index 273ab1d8955..8b78b94326e 100644 --- a/htdocs/product/canvas/default/product.default.class.php +++ b/htdocs/product/canvas/default/product.default.class.php @@ -50,7 +50,7 @@ class ProductDefault extends Product $this->next_prev_filter = "canvas='default'"; } - function GetListeTitre() + function getTitle() { return 'Produits'; } @@ -125,6 +125,7 @@ class ProductDefault extends Product $datas["label"] = $obj->label; $datas["barcode"] = $obj->barcode; $datas["statut"] = $obj->statut; + $datas["datem"] = dol_print_date($this->db->jdate($obj->datem),'day'); array_push($this->list_datas,$datas); diff --git a/htdocs/product/canvas/service/product.service.class.php b/htdocs/product/canvas/service/product.service.class.php index 5dd22ed5a57..5df6861f0a0 100644 --- a/htdocs/product/canvas/service/product.service.class.php +++ b/htdocs/product/canvas/service/product.service.class.php @@ -50,7 +50,7 @@ class ProductService extends Product $this->next_prev_filter = "canvas='service'"; } - function GetListeTitre() + function getTitle() { return 'Services'; } diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index cf9bb5b68e8..70024fef82b 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -230,6 +230,7 @@ if ($resql) $picto='title.png'; if (empty($conf->browser->firefox)) $picto='title.gif'; $smarty->assign('title_picto', img_picto('',$picto)); + $smarty->assign('title_text', $object->getTitle()); // Check if a custom template is present if (file_exists(DOL_DOCUMENT_ROOT . '/theme/'.$conf->theme.'/templates/product/'.$_GET["canvas"].'/liste.tpl')) @@ -249,8 +250,14 @@ if ($resql) $smarty->template_dir = DOL_DOCUMENT_ROOT . '/core/templates/'; $template = 'error.tpl'; } + + // Enable caching + $smarty->caching = true; - $smarty->display($template); + $smarty->display($template, $_GET["canvas"]); + + // Suppression de la version compilee + $smarty->clear_compiled_tpl($template); } else {