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'";
}
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);

View File

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

View File

@ -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
{