Works on canvas capability
This commit is contained in:
parent
9023ec01ff
commit
dc1df590ab
@ -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);
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ class ProductService extends Product
|
||||
$this->next_prev_filter = "canvas='service'";
|
||||
}
|
||||
|
||||
function GetListeTitre()
|
||||
function getTitle()
|
||||
{
|
||||
return 'Services';
|
||||
}
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user