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'";
|
$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);
|
||||||
|
|
||||||
|
|||||||
@ -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';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user