Works on canvas capability

This commit is contained in:
Regis Houssin 2010-03-22 19:57:16 +00:00
parent 9023ec01ff
commit dc1df590ab
3 changed files with 11 additions and 3 deletions

View File

@ -50,7 +50,7 @@ class ProductDefault extends Product
$this->next_prev_filter = "canvas='default'"; $this->next_prev_filter = "canvas='default'";
} }
function GetListeTitre() function getTitle()
{ {
return 'Produits'; return 'Produits';
} }
@ -125,6 +125,7 @@ class ProductDefault extends Product
$datas["label"] = $obj->label; $datas["label"] = $obj->label;
$datas["barcode"] = $obj->barcode; $datas["barcode"] = $obj->barcode;
$datas["statut"] = $obj->statut; $datas["statut"] = $obj->statut;
$datas["datem"] = dol_print_date($this->db->jdate($obj->datem),'day');
array_push($this->list_datas,$datas); array_push($this->list_datas,$datas);

View File

@ -50,7 +50,7 @@ class ProductService extends Product
$this->next_prev_filter = "canvas='service'"; $this->next_prev_filter = "canvas='service'";
} }
function GetListeTitre() function getTitle()
{ {
return 'Services'; return 'Services';
} }

View File

@ -230,6 +230,7 @@ if ($resql)
$picto='title.png'; $picto='title.png';
if (empty($conf->browser->firefox)) $picto='title.gif'; if (empty($conf->browser->firefox)) $picto='title.gif';
$smarty->assign('title_picto', img_picto('',$picto)); $smarty->assign('title_picto', img_picto('',$picto));
$smarty->assign('title_text', $object->getTitle());
// Check if a custom template is present // Check if a custom template is present
if (file_exists(DOL_DOCUMENT_ROOT . '/theme/'.$conf->theme.'/templates/product/'.$_GET["canvas"].'/liste.tpl')) if (file_exists(DOL_DOCUMENT_ROOT . '/theme/'.$conf->theme.'/templates/product/'.$_GET["canvas"].'/liste.tpl'))
@ -250,7 +251,13 @@ if ($resql)
$template = 'error.tpl'; $template = 'error.tpl';
} }
$smarty->display($template); // Enable caching
$smarty->caching = true;
$smarty->display($template, $_GET["canvas"]);
// Suppression de la version compilee
$smarty->clear_compiled_tpl($template);
} }
else else
{ {