[*] MO : BlockCMS module 1.5 compliant + translations

This commit is contained in:
Francois Gaillard
2012-02-15 13:50:25 +00:00
parent de7ab865aa
commit 5436e2e610
9 changed files with 1344 additions and 861 deletions
+9
View File
@@ -43,6 +43,11 @@ class HelperCore
public $context;
public $toolbar_fix = false;
/**
* @var Module
*/
public $module;
/** @var string Helper tpl folder */
public $base_folder;
@@ -83,9 +88,13 @@ class HelperCore
{
if ($this->context->controller instanceof ModuleAdminController)
$override_tpl_path = $this->context->controller->getTemplatePath().$this->override_folder.$this->base_folder.$tpl_name;
else if ($this->module)
$override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->override_folder.$this->base_folder.$tpl_name;
else
$override_tpl_path = $this->context->smarty->getTemplateDir(0).'controllers/'.$this->override_folder.$this->base_folder.$tpl_name;
}
else if ($this->module)
$override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->base_folder.$tpl_name;
if (isset($override_tpl_path) && file_exists($override_tpl_path))
return $this->context->smarty->createTemplate($override_tpl_path, $this->context->smarty);