// Move all helper override templates for controllers to subfolders
This commit is contained in:
1 parent
8973cf08d0
commit
597e921d96
82 files changed
+11
-13
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -472,11 +472,6 @@ class AdminControllerCore extends Controller
|
|||||||
return $this->{'ajaxProcess'.Tools::toCamelCase($action)}();
|
return $this->{'ajaxProcess'.Tools::toCamelCase($action)}();
|
||||||
else if (method_exists($this, 'ajaxProcess'))
|
else if (method_exists($this, 'ajaxProcess'))
|
||||||
return $this->ajaxProcess();
|
return $this->ajaxProcess();
|
||||||
|
|
||||||
/*if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action)))
|
|
||||||
$this->{'displayAjax'.$action}();
|
|
||||||
else
|
|
||||||
$this->displayAjax(); */
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,15 +79,18 @@ class HelperCore
|
|||||||
*/
|
*/
|
||||||
public function createTemplate($tpl_name)
|
public function createTemplate($tpl_name)
|
||||||
{
|
{
|
||||||
if ($this->context->controller instanceof ModuleAdminController)
|
if ($this->override_folder)
|
||||||
{
|
{
|
||||||
if ($this->override_folder && file_exists($this->context->controller->getTemplatePath().$this->override_folder.$tpl_name))
|
if ($this->context->controller instanceof ModuleAdminController)
|
||||||
return $this->context->smarty->createTemplate($this->context->controller->getTemplatePath().$this->override_folder.$tpl_name);
|
$override_tpl_path = $this->context->controller->getTemplatePath().$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->override_folder && file_exists($this->context->smarty->getTemplateDir(0).'controllers/'.$this->override_folder.$tpl_name))
|
|
||||||
return $this->context->smarty->createTemplate('controllers/'.$this->override_folder.$tpl_name);
|
|
||||||
|
|
||||||
return $this->context->smarty->createTemplate($this->base_folder.$tpl_name);
|
if (isset($override_tpl_path) && file_exists($override_tpl_path))
|
||||||
|
return $this->context->smarty->createTemplate($override_tpl_path);
|
||||||
|
else
|
||||||
|
return $this->context->smarty->createTemplate($this->base_folder.$tpl_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -323,7 +326,7 @@ class HelperCore
|
|||||||
foreach (Db::getInstance()->executeS($sql) as $row)
|
foreach (Db::getInstance()->executeS($sql) as $row)
|
||||||
$assos[$row['id_'.$type]] = $row['id_'.$type];
|
$assos[$row['id_'.$type]] = $row['id_'.$type];
|
||||||
}
|
}
|
||||||
$tpl = $this->createTemplate('helper/assoshop.tpl');
|
$tpl = $this->createTemplate('helpers/assoshop.tpl');
|
||||||
$tpl->assign(array(
|
$tpl->assign(array(
|
||||||
'input' => array(
|
'input' => array(
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
@@ -369,7 +372,7 @@ class HelperCore
|
|||||||
'token' => $this->token
|
'token' => $this->token
|
||||||
);
|
);
|
||||||
|
|
||||||
$tpl = $this->createTemplate('helper/required_fields.tpl');
|
$tpl = $this->createTemplate('helpers/required_fields.tpl');
|
||||||
$tpl->assign($this->tpl_vars);
|
$tpl->assign($this->tpl_vars);
|
||||||
|
|
||||||
return $tpl->fetch();
|
return $tpl->fetch();
|
||||||
|
|||||||
Reference in new issue
Block a user