[*] MO : BlockCMS module 1.5 compliant + translations

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13347 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fGaillard
2012-02-15 13:50:25 +00:00
parent 890dcf85c0
commit f0e4ba651d
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);