diff --git a/admin-dev/themes/default/template/access/form.tpl b/admin-dev/themes/default/template/controllers/access/form.tpl similarity index 100% rename from admin-dev/themes/default/template/access/form.tpl rename to admin-dev/themes/default/template/controllers/access/form.tpl diff --git a/admin-dev/themes/default/template/accounting_export/common_form.tpl b/admin-dev/themes/default/template/controllers/accounting_export/common_form.tpl similarity index 100% rename from admin-dev/themes/default/template/accounting_export/common_form.tpl rename to admin-dev/themes/default/template/controllers/accounting_export/common_form.tpl diff --git a/admin-dev/themes/default/template/accounting_export/global_export.tpl b/admin-dev/themes/default/template/controllers/accounting_export/global_export.tpl similarity index 95% rename from admin-dev/themes/default/template/accounting_export/global_export.tpl rename to admin-dev/themes/default/template/controllers/accounting_export/global_export.tpl index afacb801d..49b7f09d2 100644 --- a/admin-dev/themes/default/template/accounting_export/global_export.tpl +++ b/admin-dev/themes/default/template/controllers/accounting_export/global_export.tpl @@ -28,7 +28,7 @@
{$title}
- {include file="$pathAccountExportTpl/common_form.tpl"} + {include file="controllers/accounting_export/common_form.tpl"}
diff --git a/admin-dev/themes/default/template/accounting_export/menu.tpl b/admin-dev/themes/default/template/controllers/accounting_export/menu.tpl similarity index 100% rename from admin-dev/themes/default/template/accounting_export/menu.tpl rename to admin-dev/themes/default/template/controllers/accounting_export/menu.tpl diff --git a/admin-dev/themes/default/template/accounting_export/reconciliation_export.tpl b/admin-dev/themes/default/template/controllers/accounting_export/reconciliation_export.tpl similarity index 95% rename from admin-dev/themes/default/template/accounting_export/reconciliation_export.tpl rename to admin-dev/themes/default/template/controllers/accounting_export/reconciliation_export.tpl index c2f415160..f9e6e33ec 100644 --- a/admin-dev/themes/default/template/accounting_export/reconciliation_export.tpl +++ b/admin-dev/themes/default/template/controllers/accounting_export/reconciliation_export.tpl @@ -28,7 +28,7 @@
{$title} - {include file="$pathAccountExportTpl/common_form.tpl"} + {include file="controllers/accounting_export/common_form.tpl"}
diff --git a/admin-dev/themes/default/template/accounting_management/content.tpl b/admin-dev/themes/default/template/controllers/accounting_management/content.tpl similarity index 100% rename from admin-dev/themes/default/template/accounting_management/content.tpl rename to admin-dev/themes/default/template/controllers/accounting_management/content.tpl diff --git a/admin-dev/themes/default/template/addons_catalog/content.tpl b/admin-dev/themes/default/template/controllers/addons_catalog/content.tpl similarity index 100% rename from admin-dev/themes/default/template/addons_catalog/content.tpl rename to admin-dev/themes/default/template/controllers/addons_catalog/content.tpl diff --git a/admin-dev/themes/default/template/addons_my_account/content.tpl b/admin-dev/themes/default/template/controllers/addons_my_account/content.tpl similarity index 100% rename from admin-dev/themes/default/template/addons_my_account/content.tpl rename to admin-dev/themes/default/template/controllers/addons_my_account/content.tpl diff --git a/admin-dev/themes/default/template/addresses/form.tpl b/admin-dev/themes/default/template/controllers/addresses/form.tpl similarity index 98% rename from admin-dev/themes/default/template/addresses/form.tpl rename to admin-dev/themes/default/template/controllers/addresses/form.tpl index 0e3ee4dd6..06bc66c11 100644 --- a/admin-dev/themes/default/template/addresses/form.tpl +++ b/admin-dev/themes/default/template/controllers/addresses/form.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="label"} {/block} diff --git a/admin-dev/themes/default/template/attachments/list_action_delete.tpl b/admin-dev/themes/default/template/controllers/attachments/list_action_delete.tpl similarity index 100% rename from admin-dev/themes/default/template/attachments/list_action_delete.tpl rename to admin-dev/themes/default/template/controllers/attachments/list_action_delete.tpl diff --git a/admin-dev/themes/default/template/attribute_generator/content.tpl b/admin-dev/themes/default/template/controllers/attribute_generator/content.tpl similarity index 100% rename from admin-dev/themes/default/template/attribute_generator/content.tpl rename to admin-dev/themes/default/template/controllers/attribute_generator/content.tpl diff --git a/admin-dev/themes/default/template/attributes/form.tpl b/admin-dev/themes/default/template/controllers/attributes/form.tpl similarity index 100% rename from admin-dev/themes/default/template/attributes/form.tpl rename to admin-dev/themes/default/template/controllers/attributes/form.tpl diff --git a/admin-dev/themes/default/template/attributes/list_content.tpl b/admin-dev/themes/default/template/controllers/attributes/list_content.tpl similarity index 100% rename from admin-dev/themes/default/template/attributes/list_content.tpl rename to admin-dev/themes/default/template/controllers/attributes/list_content.tpl diff --git a/admin-dev/themes/default/template/attributes_groups/list_content.tpl b/admin-dev/themes/default/template/controllers/attributes_groups/list_content.tpl similarity index 100% rename from admin-dev/themes/default/template/attributes_groups/list_content.tpl rename to admin-dev/themes/default/template/controllers/attributes_groups/list_content.tpl diff --git a/admin-dev/themes/default/template/backup/download/view.tpl b/admin-dev/themes/default/template/controllers/backup/download/view.tpl similarity index 100% rename from admin-dev/themes/default/template/backup/download/view.tpl rename to admin-dev/themes/default/template/controllers/backup/download/view.tpl diff --git a/admin-dev/themes/default/template/backup/list_header.tpl b/admin-dev/themes/default/template/controllers/backup/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/backup/list_header.tpl rename to admin-dev/themes/default/template/controllers/backup/list_header.tpl diff --git a/admin-dev/themes/default/template/backup/view.tpl b/admin-dev/themes/default/template/controllers/backup/view.tpl similarity index 100% rename from admin-dev/themes/default/template/backup/view.tpl rename to admin-dev/themes/default/template/controllers/backup/view.tpl diff --git a/admin-dev/themes/default/template/carriers/form.tpl b/admin-dev/themes/default/template/controllers/carriers/form.tpl similarity index 100% rename from admin-dev/themes/default/template/carriers/form.tpl rename to admin-dev/themes/default/template/controllers/carriers/form.tpl diff --git a/admin-dev/themes/default/template/cart_rules/actions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl similarity index 100% rename from admin-dev/themes/default/template/cart_rules/actions.tpl rename to admin-dev/themes/default/template/controllers/cart_rules/actions.tpl diff --git a/admin-dev/themes/default/template/cart_rules/conditions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl similarity index 100% rename from admin-dev/themes/default/template/cart_rules/conditions.tpl rename to admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl diff --git a/admin-dev/themes/default/template/cart_rules/form.tpl b/admin-dev/themes/default/template/controllers/cart_rules/form.tpl similarity index 95% rename from admin-dev/themes/default/template/cart_rules/form.tpl rename to admin-dev/themes/default/template/controllers/cart_rules/form.tpl index 7e51db899..a3c964092 100644 --- a/admin-dev/themes/default/template/cart_rules/form.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/form.tpl @@ -60,17 +60,17 @@

{l s='Cart rule informations'}

- {include file='cart_rules/informations.tpl'} + {include file='controllers/cart_rules/informations.tpl'}

{l s='Cart rule conditions'}

- {include file='cart_rules/conditions.tpl'} + {include file='controllers/cart_rules/conditions.tpl'}

{l s='Cart rule actions'}

- {include file='cart_rules/actions.tpl'} + {include file='controllers/cart_rules/actions.tpl'}
diff --git a/admin-dev/themes/default/template/cart_rules/informations.tpl b/admin-dev/themes/default/template/controllers/cart_rules/informations.tpl similarity index 100% rename from admin-dev/themes/default/template/cart_rules/informations.tpl rename to admin-dev/themes/default/template/controllers/cart_rules/informations.tpl diff --git a/admin-dev/themes/default/template/cart_rules/product_rule.tpl b/admin-dev/themes/default/template/controllers/cart_rules/product_rule.tpl similarity index 100% rename from admin-dev/themes/default/template/cart_rules/product_rule.tpl rename to admin-dev/themes/default/template/controllers/cart_rules/product_rule.tpl diff --git a/admin-dev/themes/default/template/cart_rules/product_rule_itemlist.tpl b/admin-dev/themes/default/template/controllers/cart_rules/product_rule_itemlist.tpl similarity index 100% rename from admin-dev/themes/default/template/cart_rules/product_rule_itemlist.tpl rename to admin-dev/themes/default/template/controllers/cart_rules/product_rule_itemlist.tpl diff --git a/admin-dev/themes/default/template/carts/view.tpl b/admin-dev/themes/default/template/controllers/carts/view.tpl similarity index 100% rename from admin-dev/themes/default/template/carts/view.tpl rename to admin-dev/themes/default/template/controllers/carts/view.tpl diff --git a/admin-dev/themes/default/template/accounting/content.tpl b/admin-dev/themes/default/template/controllers/categories/form.tpl similarity index 70% rename from admin-dev/themes/default/template/accounting/content.tpl rename to admin-dev/themes/default/template/controllers/categories/form.tpl index 1ce757188..7ddd02be3 100644 --- a/admin-dev/themes/default/template/accounting/content.tpl +++ b/admin-dev/themes/default/template/controllers/categories/form.tpl @@ -19,9 +19,19 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 9856 $ +* @version Release: $Revision: 8971 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} +{extends file="helper/form/form.tpl"} -{$content} \ No newline at end of file +{block name="end_field_block"} + {if ($input.name == 'groupBox')} +

+ {$input.info_introduction}
+ {$input.unidentified}
+ {$input.guest}
+ {$input.customer}
+





+ {/if}
+{/block} diff --git a/admin-dev/themes/default/template/controllers/categories/list_header.tpl b/admin-dev/themes/default/template/controllers/categories/list_header.tpl new file mode 100644 index 000000000..c37044f5a --- /dev/null +++ b/admin-dev/themes/default/template/controllers/categories/list_header.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helper/list/list_header.tpl"} + +{block name=leadin} +
+ {if count($categories_tree) == 0} + {if $category_root->id_category == 0} +   {$category_root->name} + {else} +   {$categories_name} + {/if} + {else} + {if $category_root->id_category == 0} +   {$category_root->name} >  + {else} +   {$category_root->name} >  + {/if} + + {foreach $categories_tree key=key item=category} + {if $key == 0} + {$category.name} + {else} + {$category.name} >  + {/if} + {/foreach} + {/if} +
+{/block} diff --git a/admin-dev/themes/default/template/cms/form.tpl b/admin-dev/themes/default/template/controllers/cms/form.tpl similarity index 98% rename from admin-dev/themes/default/template/cms/form.tpl rename to admin-dev/themes/default/template/controllers/cms/form.tpl index e2f0a5d60..09c4561f5 100644 --- a/admin-dev/themes/default/template/cms/form.tpl +++ b/admin-dev/themes/default/template/controllers/cms/form.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="script"} $(document).ready(function() { diff --git a/admin-dev/themes/default/template/cms_categories/form.tpl b/admin-dev/themes/default/template/controllers/cms_categories/form.tpl similarity index 96% rename from admin-dev/themes/default/template/cms_categories/form.tpl rename to admin-dev/themes/default/template/controllers/cms_categories/form.tpl index e162197cb..5989231e6 100644 --- a/admin-dev/themes/default/template/cms_categories/form.tpl +++ b/admin-dev/themes/default/template/controllers/cms_categories/form.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="start_field_block"}
diff --git a/admin-dev/themes/default/template/cms_content/content.tpl b/admin-dev/themes/default/template/controllers/cms_content/content.tpl similarity index 100% rename from admin-dev/themes/default/template/cms_content/content.tpl rename to admin-dev/themes/default/template/controllers/cms_content/content.tpl diff --git a/admin-dev/themes/default/template/countries/form.tpl b/admin-dev/themes/default/template/controllers/countries/form.tpl similarity index 100% rename from admin-dev/themes/default/template/countries/form.tpl rename to admin-dev/themes/default/template/controllers/countries/form.tpl diff --git a/admin-dev/themes/default/template/countries/list_footer.tpl b/admin-dev/themes/default/template/controllers/countries/list_footer.tpl similarity index 100% rename from admin-dev/themes/default/template/countries/list_footer.tpl rename to admin-dev/themes/default/template/controllers/countries/list_footer.tpl diff --git a/admin-dev/themes/default/template/customer_threads/list_header.tpl b/admin-dev/themes/default/template/controllers/customer_threads/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/customer_threads/list_header.tpl rename to admin-dev/themes/default/template/controllers/customer_threads/list_header.tpl diff --git a/admin-dev/themes/default/template/customer_threads/message.tpl b/admin-dev/themes/default/template/controllers/customer_threads/message.tpl similarity index 100% rename from admin-dev/themes/default/template/customer_threads/message.tpl rename to admin-dev/themes/default/template/controllers/customer_threads/message.tpl diff --git a/admin-dev/themes/default/template/customer_threads/options.tpl b/admin-dev/themes/default/template/controllers/customer_threads/options.tpl similarity index 100% rename from admin-dev/themes/default/template/customer_threads/options.tpl rename to admin-dev/themes/default/template/controllers/customer_threads/options.tpl diff --git a/admin-dev/themes/default/template/customer_threads/view.tpl b/admin-dev/themes/default/template/controllers/customer_threads/view.tpl similarity index 100% rename from admin-dev/themes/default/template/customer_threads/view.tpl rename to admin-dev/themes/default/template/controllers/customer_threads/view.tpl diff --git a/admin-dev/themes/default/template/customers/list_header.tpl b/admin-dev/themes/default/template/controllers/customers/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/customers/list_header.tpl rename to admin-dev/themes/default/template/controllers/customers/list_header.tpl diff --git a/admin-dev/themes/default/template/customers/view.tpl b/admin-dev/themes/default/template/controllers/customers/view.tpl similarity index 100% rename from admin-dev/themes/default/template/customers/view.tpl rename to admin-dev/themes/default/template/controllers/customers/view.tpl diff --git a/admin-dev/themes/default/template/db/form.tpl b/admin-dev/themes/default/template/controllers/db/form.tpl similarity index 100% rename from admin-dev/themes/default/template/db/form.tpl rename to admin-dev/themes/default/template/controllers/db/form.tpl diff --git a/admin-dev/themes/default/template/emails/content.tpl b/admin-dev/themes/default/template/controllers/emails/content.tpl similarity index 100% rename from admin-dev/themes/default/template/emails/content.tpl rename to admin-dev/themes/default/template/controllers/emails/content.tpl diff --git a/admin-dev/themes/default/template/employees/form.tpl b/admin-dev/themes/default/template/controllers/employees/form.tpl similarity index 100% rename from admin-dev/themes/default/template/employees/form.tpl rename to admin-dev/themes/default/template/controllers/employees/form.tpl diff --git a/admin-dev/themes/default/template/feature_value/form.tpl b/admin-dev/themes/default/template/controllers/feature_value/form.tpl similarity index 100% rename from admin-dev/themes/default/template/feature_value/form.tpl rename to admin-dev/themes/default/template/controllers/feature_value/form.tpl diff --git a/admin-dev/themes/default/template/generator/options.tpl b/admin-dev/themes/default/template/controllers/generator/options.tpl similarity index 100% rename from admin-dev/themes/default/template/generator/options.tpl rename to admin-dev/themes/default/template/controllers/generator/options.tpl diff --git a/admin-dev/themes/default/template/geolocation/options.tpl b/admin-dev/themes/default/template/controllers/geolocation/options.tpl similarity index 100% rename from admin-dev/themes/default/template/geolocation/options.tpl rename to admin-dev/themes/default/template/controllers/geolocation/options.tpl diff --git a/admin-dev/themes/default/template/group_shop/form.tpl b/admin-dev/themes/default/template/controllers/group_shop/form.tpl similarity index 100% rename from admin-dev/themes/default/template/group_shop/form.tpl rename to admin-dev/themes/default/template/controllers/group_shop/form.tpl diff --git a/admin-dev/themes/default/template/groups/form.tpl b/admin-dev/themes/default/template/controllers/groups/form.tpl similarity index 100% rename from admin-dev/themes/default/template/groups/form.tpl rename to admin-dev/themes/default/template/controllers/groups/form.tpl diff --git a/admin-dev/themes/default/template/groups/view.tpl b/admin-dev/themes/default/template/controllers/groups/view.tpl similarity index 100% rename from admin-dev/themes/default/template/groups/view.tpl rename to admin-dev/themes/default/template/controllers/groups/view.tpl diff --git a/admin-dev/themes/default/template/home/content.tpl b/admin-dev/themes/default/template/controllers/home/content.tpl similarity index 100% rename from admin-dev/themes/default/template/home/content.tpl rename to admin-dev/themes/default/template/controllers/home/content.tpl diff --git a/admin-dev/themes/default/template/home/optimizationTips.tpl b/admin-dev/themes/default/template/controllers/home/optimizationTips.tpl similarity index 100% rename from admin-dev/themes/default/template/home/optimizationTips.tpl rename to admin-dev/themes/default/template/controllers/home/optimizationTips.tpl diff --git a/admin-dev/themes/default/template/images/content.tpl b/admin-dev/themes/default/template/controllers/images/content.tpl similarity index 100% rename from admin-dev/themes/default/template/images/content.tpl rename to admin-dev/themes/default/template/controllers/images/content.tpl diff --git a/admin-dev/themes/default/template/import/form.tpl b/admin-dev/themes/default/template/controllers/import/form.tpl similarity index 100% rename from admin-dev/themes/default/template/import/form.tpl rename to admin-dev/themes/default/template/controllers/import/form.tpl diff --git a/admin-dev/themes/default/template/import/view.tpl b/admin-dev/themes/default/template/controllers/import/view.tpl similarity index 100% rename from admin-dev/themes/default/template/import/view.tpl rename to admin-dev/themes/default/template/controllers/import/view.tpl diff --git a/admin-dev/themes/default/template/information/view.tpl b/admin-dev/themes/default/template/controllers/information/view.tpl similarity index 100% rename from admin-dev/themes/default/template/information/view.tpl rename to admin-dev/themes/default/template/controllers/information/view.tpl diff --git a/admin-dev/themes/default/template/invoices/form.tpl b/admin-dev/themes/default/template/controllers/invoices/form.tpl similarity index 100% rename from admin-dev/themes/default/template/invoices/form.tpl rename to admin-dev/themes/default/template/controllers/invoices/form.tpl diff --git a/admin-dev/themes/default/template/languages/form.tpl b/admin-dev/themes/default/template/controllers/languages/form.tpl similarity index 100% rename from admin-dev/themes/default/template/languages/form.tpl rename to admin-dev/themes/default/template/controllers/languages/form.tpl diff --git a/admin-dev/themes/default/template/login/content.tpl b/admin-dev/themes/default/template/controllers/login/content.tpl similarity index 100% rename from admin-dev/themes/default/template/login/content.tpl rename to admin-dev/themes/default/template/controllers/login/content.tpl diff --git a/admin-dev/themes/default/template/logs/list_header.tpl b/admin-dev/themes/default/template/controllers/logs/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/logs/list_header.tpl rename to admin-dev/themes/default/template/controllers/logs/list_header.tpl diff --git a/admin-dev/themes/default/template/manufacturers/view.tpl b/admin-dev/themes/default/template/controllers/manufacturers/view.tpl similarity index 100% rename from admin-dev/themes/default/template/manufacturers/view.tpl rename to admin-dev/themes/default/template/controllers/manufacturers/view.tpl diff --git a/admin-dev/themes/default/template/modules/content.tpl b/admin-dev/themes/default/template/controllers/modules/content.tpl similarity index 92% rename from admin-dev/themes/default/template/modules/content.tpl rename to admin-dev/themes/default/template/controllers/modules/content.tpl index c5a12b551..0accbb124 100644 --- a/admin-dev/themes/default/template/modules/content.tpl +++ b/admin-dev/themes/default/template/controllers/modules/content.tpl @@ -28,6 +28,6 @@ {if isset($module_content)} {$module_content} {else} - {include file='modules/js.tpl'} - {include file='modules/page.tpl'} + {include file='controllers/modules/js.tpl'} + {include file='controllers/modules/page.tpl'} {/if} diff --git a/admin-dev/themes/default/template/modules/filters.tpl b/admin-dev/themes/default/template/controllers/modules/filters.tpl similarity index 100% rename from admin-dev/themes/default/template/modules/filters.tpl rename to admin-dev/themes/default/template/controllers/modules/filters.tpl diff --git a/admin-dev/themes/default/template/modules/header.tpl b/admin-dev/themes/default/template/controllers/modules/header.tpl similarity index 100% rename from admin-dev/themes/default/template/modules/header.tpl rename to admin-dev/themes/default/template/controllers/modules/header.tpl diff --git a/admin-dev/themes/default/template/modules/js.tpl b/admin-dev/themes/default/template/controllers/modules/js.tpl similarity index 100% rename from admin-dev/themes/default/template/modules/js.tpl rename to admin-dev/themes/default/template/controllers/modules/js.tpl diff --git a/admin-dev/themes/default/template/modules/list.tpl b/admin-dev/themes/default/template/controllers/modules/list.tpl similarity index 100% rename from admin-dev/themes/default/template/modules/list.tpl rename to admin-dev/themes/default/template/controllers/modules/list.tpl diff --git a/admin-dev/themes/default/template/modules/page.tpl b/admin-dev/themes/default/template/controllers/modules/page.tpl similarity index 92% rename from admin-dev/themes/default/template/modules/page.tpl rename to admin-dev/themes/default/template/controllers/modules/page.tpl index a772f7253..1e4a98124 100644 --- a/admin-dev/themes/default/template/modules/page.tpl +++ b/admin-dev/themes/default/template/controllers/modules/page.tpl @@ -26,8 +26,8 @@
- {include file='modules/header.tpl'} - {include file='modules/filters.tpl'} + {include file='controllers/modules/header.tpl'} + {include file='controllers/modules/filters.tpl'}
@@ -47,7 +47,7 @@
- {include file='modules/list.tpl'} + {include file='controllers/modules/list.tpl'}
diff --git a/admin-dev/themes/default/template/modules_positions/form.tpl b/admin-dev/themes/default/template/controllers/modules_positions/form.tpl similarity index 100% rename from admin-dev/themes/default/template/modules_positions/form.tpl rename to admin-dev/themes/default/template/controllers/modules_positions/form.tpl diff --git a/admin-dev/themes/default/template/modules_positions/list_modules.tpl b/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl similarity index 100% rename from admin-dev/themes/default/template/modules_positions/list_modules.tpl rename to admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl diff --git a/admin-dev/themes/default/template/not_found/content.tpl b/admin-dev/themes/default/template/controllers/not_found/content.tpl similarity index 100% rename from admin-dev/themes/default/template/not_found/content.tpl rename to admin-dev/themes/default/template/controllers/not_found/content.tpl diff --git a/admin-dev/themes/default/template/orders/_customized_data.tpl b/admin-dev/themes/default/template/controllers/orders/_customized_data.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/_customized_data.tpl rename to admin-dev/themes/default/template/controllers/orders/_customized_data.tpl diff --git a/admin-dev/themes/default/template/orders/_discount_form.tpl b/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/_discount_form.tpl rename to admin-dev/themes/default/template/controllers/orders/_discount_form.tpl diff --git a/admin-dev/themes/default/template/orders/_documents.tpl b/admin-dev/themes/default/template/controllers/orders/_documents.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/_documents.tpl rename to admin-dev/themes/default/template/controllers/orders/_documents.tpl diff --git a/admin-dev/themes/default/template/orders/_new_product.tpl b/admin-dev/themes/default/template/controllers/orders/_new_product.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/_new_product.tpl rename to admin-dev/themes/default/template/controllers/orders/_new_product.tpl diff --git a/admin-dev/themes/default/template/orders/_print_pdf_icon.tpl b/admin-dev/themes/default/template/controllers/orders/_print_pdf_icon.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/_print_pdf_icon.tpl rename to admin-dev/themes/default/template/controllers/orders/_print_pdf_icon.tpl diff --git a/admin-dev/themes/default/template/orders/_product_line.tpl b/admin-dev/themes/default/template/controllers/orders/_product_line.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/_product_line.tpl rename to admin-dev/themes/default/template/controllers/orders/_product_line.tpl diff --git a/admin-dev/themes/default/template/orders/_shipping.tpl b/admin-dev/themes/default/template/controllers/orders/_shipping.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/_shipping.tpl rename to admin-dev/themes/default/template/controllers/orders/_shipping.tpl diff --git a/admin-dev/themes/default/template/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl similarity index 100% rename from admin-dev/themes/default/template/orders/form.tpl rename to admin-dev/themes/default/template/controllers/orders/form.tpl diff --git a/admin-dev/themes/default/template/orders/view.tpl b/admin-dev/themes/default/template/controllers/orders/view.tpl similarity index 98% rename from admin-dev/themes/default/template/orders/view.tpl rename to admin-dev/themes/default/template/controllers/orders/view.tpl index 6b9012438..f9dde80a4 100755 --- a/admin-dev/themes/default/template/orders/view.tpl +++ b/admin-dev/themes/default/template/controllers/orders/view.tpl @@ -195,7 +195,7 @@ {l s='Documents'} {* Include document template *} - {include file='orders/_documents.tpl'} + {include file='controllers/orders/_documents.tpl'}

@@ -372,7 +372,7 @@
- {include file='orders/_shipping.tpl'} + {include file='controllers/orders/_shipping.tpl'} {if $carrierModuleCall} {$carrierModuleCall} @@ -544,13 +544,13 @@ {foreach from=$products item=product key=k} {* Include customized datas partial *} - {include file='orders/_customized_data.tpl'} + {include file='controllers/orders/_customized_data.tpl'} {* Include product line partial *} - {include file='orders/_product_line.tpl'} + {include file='controllers/orders/_product_line.tpl'} {/foreach} {if $can_edit} - {include file='orders/_new_product.tpl'} + {include file='controllers/orders/_new_product.tpl'} {/if} @@ -632,7 +632,7 @@ - {include file='orders/_discount_form.tpl'} + {include file='controllers/orders/_discount_form.tpl'} {/if} diff --git a/admin-dev/themes/default/template/outstanding/_print_pdf_icon.tpl b/admin-dev/themes/default/template/controllers/outstanding/_print_pdf_icon.tpl similarity index 100% rename from admin-dev/themes/default/template/outstanding/_print_pdf_icon.tpl rename to admin-dev/themes/default/template/controllers/outstanding/_print_pdf_icon.tpl diff --git a/admin-dev/themes/default/template/payment/restrictions.tpl b/admin-dev/themes/default/template/controllers/payment/restrictions.tpl similarity index 100% rename from admin-dev/themes/default/template/payment/restrictions.tpl rename to admin-dev/themes/default/template/controllers/payment/restrictions.tpl diff --git a/admin-dev/themes/default/template/payment/view.tpl b/admin-dev/themes/default/template/controllers/payment/view.tpl similarity index 96% rename from admin-dev/themes/default/template/payment/view.tpl rename to admin-dev/themes/default/template/controllers/payment/view.tpl index b2ee38ed0..50c531738 100644 --- a/admin-dev/themes/default/template/payment/view.tpl +++ b/admin-dev/themes/default/template/controllers/payment/view.tpl @@ -39,7 +39,7 @@ {if $display_restrictions}

{l s='Payment module restrictions'}

{foreach $lists as $list} - {include file='payment/restrictions.tpl'} + {include file='controllers/payment/restrictions.tpl'}
{/foreach} {else} diff --git a/admin-dev/themes/default/template/performance/form.tpl b/admin-dev/themes/default/template/controllers/performance/form.tpl similarity index 99% rename from admin-dev/themes/default/template/performance/form.tpl rename to admin-dev/themes/default/template/controllers/performance/form.tpl index 0505b4b27..bf2475e94 100644 --- a/admin-dev/themes/default/template/performance/form.tpl +++ b/admin-dev/themes/default/template/controllers/performance/form.tpl @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="label"} diff --git a/admin-dev/themes/default/template/preferences/options.tpl b/admin-dev/themes/default/template/controllers/preferences/options.tpl similarity index 100% rename from admin-dev/themes/default/template/preferences/options.tpl rename to admin-dev/themes/default/template/controllers/preferences/options.tpl diff --git a/admin-dev/themes/default/template/products/accounting.tpl b/admin-dev/themes/default/template/controllers/products/accounting.tpl similarity index 100% rename from admin-dev/themes/default/template/products/accounting.tpl rename to admin-dev/themes/default/template/controllers/products/accounting.tpl diff --git a/admin-dev/themes/default/template/products/associations.tpl b/admin-dev/themes/default/template/controllers/products/associations.tpl similarity index 100% rename from admin-dev/themes/default/template/products/associations.tpl rename to admin-dev/themes/default/template/controllers/products/associations.tpl diff --git a/admin-dev/themes/default/template/products/attachments.tpl b/admin-dev/themes/default/template/controllers/products/attachments.tpl similarity index 100% rename from admin-dev/themes/default/template/products/attachments.tpl rename to admin-dev/themes/default/template/controllers/products/attachments.tpl diff --git a/admin-dev/themes/default/template/products/combinaison/list_action_default.tpl b/admin-dev/themes/default/template/controllers/products/combinaison/list_action_default.tpl similarity index 100% rename from admin-dev/themes/default/template/products/combinaison/list_action_default.tpl rename to admin-dev/themes/default/template/controllers/products/combinaison/list_action_default.tpl diff --git a/admin-dev/themes/default/template/products/combinaison/list_action_delete.tpl b/admin-dev/themes/default/template/controllers/products/combinaison/list_action_delete.tpl similarity index 100% rename from admin-dev/themes/default/template/products/combinaison/list_action_delete.tpl rename to admin-dev/themes/default/template/controllers/products/combinaison/list_action_delete.tpl diff --git a/admin-dev/themes/default/template/products/combinaison/list_action_edit.tpl b/admin-dev/themes/default/template/controllers/products/combinaison/list_action_edit.tpl similarity index 100% rename from admin-dev/themes/default/template/products/combinaison/list_action_edit.tpl rename to admin-dev/themes/default/template/controllers/products/combinaison/list_action_edit.tpl diff --git a/admin-dev/themes/default/template/products/combinaison/list_footer.tpl b/admin-dev/themes/default/template/controllers/products/combinaison/list_footer.tpl similarity index 100% rename from admin-dev/themes/default/template/products/combinaison/list_footer.tpl rename to admin-dev/themes/default/template/controllers/products/combinaison/list_footer.tpl diff --git a/admin-dev/themes/default/template/products/combinations.tpl b/admin-dev/themes/default/template/controllers/products/combinations.tpl similarity index 100% rename from admin-dev/themes/default/template/products/combinations.tpl rename to admin-dev/themes/default/template/controllers/products/combinations.tpl diff --git a/admin-dev/themes/default/template/products/customization.tpl b/admin-dev/themes/default/template/controllers/products/customization.tpl similarity index 100% rename from admin-dev/themes/default/template/products/customization.tpl rename to admin-dev/themes/default/template/controllers/products/customization.tpl diff --git a/admin-dev/themes/default/template/products/features.tpl b/admin-dev/themes/default/template/controllers/products/features.tpl similarity index 100% rename from admin-dev/themes/default/template/products/features.tpl rename to admin-dev/themes/default/template/controllers/products/features.tpl diff --git a/admin-dev/themes/default/template/products/form.tpl b/admin-dev/themes/default/template/controllers/products/form.tpl similarity index 100% rename from admin-dev/themes/default/template/products/form.tpl rename to admin-dev/themes/default/template/controllers/products/form.tpl diff --git a/admin-dev/themes/default/template/products/images.tpl b/admin-dev/themes/default/template/controllers/products/images.tpl similarity index 100% rename from admin-dev/themes/default/template/products/images.tpl rename to admin-dev/themes/default/template/controllers/products/images.tpl diff --git a/admin-dev/themes/default/template/products/informations.tpl b/admin-dev/themes/default/template/controllers/products/informations.tpl similarity index 98% rename from admin-dev/themes/default/template/products/informations.tpl rename to admin-dev/themes/default/template/controllers/products/informations.tpl index bb2fe4475..f414f7432 100644 --- a/admin-dev/themes/default/template/products/informations.tpl +++ b/admin-dev/themes/default/template/controllers/products/informations.tpl @@ -193,7 +193,7 @@

({l s='appears in the product lists and on the top of the product page'})

- {include file="products/textarea_lang.tpl" + {include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description_short' input_value=$product->description_short @@ -205,7 +205,7 @@

({l s='appears in the body of the product page'})

- {include file="products/textarea_lang.tpl" languages=$languages + {include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description' input_value=$product->description } diff --git a/admin-dev/themes/default/template/products/input_text_lang.tpl b/admin-dev/themes/default/template/controllers/products/input_text_lang.tpl similarity index 100% rename from admin-dev/themes/default/template/products/input_text_lang.tpl rename to admin-dev/themes/default/template/controllers/products/input_text_lang.tpl diff --git a/admin-dev/themes/default/template/products/list_header.tpl b/admin-dev/themes/default/template/controllers/products/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/products/list_header.tpl rename to admin-dev/themes/default/template/controllers/products/list_header.tpl diff --git a/admin-dev/themes/default/template/products/pack.tpl b/admin-dev/themes/default/template/controllers/products/pack.tpl similarity index 100% rename from admin-dev/themes/default/template/products/pack.tpl rename to admin-dev/themes/default/template/controllers/products/pack.tpl diff --git a/admin-dev/themes/default/template/products/prices.tpl b/admin-dev/themes/default/template/controllers/products/prices.tpl similarity index 100% rename from admin-dev/themes/default/template/products/prices.tpl rename to admin-dev/themes/default/template/controllers/products/prices.tpl diff --git a/admin-dev/themes/default/template/products/quantities.tpl b/admin-dev/themes/default/template/controllers/products/quantities.tpl similarity index 99% rename from admin-dev/themes/default/template/products/quantities.tpl rename to admin-dev/themes/default/template/controllers/products/quantities.tpl index a6dc914d3..0ac552603 100644 --- a/admin-dev/themes/default/template/products/quantities.tpl +++ b/admin-dev/themes/default/template/controllers/products/quantities.tpl @@ -177,7 +177,7 @@ - {include file="products/input_text_lang.tpl" + {include file="controllers/products/input_text_lang.tpl" languages=$languages input_value=$product->available_now input_name='available_now'} @@ -187,7 +187,7 @@ - {include file="products/input_text_lang.tpl" + {include file="controllers/products/input_text_lang.tpl" languages=$languages input_value=$product->available_later input_name='available_later'} diff --git a/admin-dev/themes/default/template/products/seo.tpl b/admin-dev/themes/default/template/controllers/products/seo.tpl similarity index 92% rename from admin-dev/themes/default/template/products/seo.tpl rename to admin-dev/themes/default/template/controllers/products/seo.tpl index dfc49a245..cc379d877 100644 --- a/admin-dev/themes/default/template/products/seo.tpl +++ b/admin-dev/themes/default/template/controllers/products/seo.tpl @@ -48,7 +48,7 @@ - {include file="products/input_text_lang.tpl" + {include file="controllers/products/input_text_lang.tpl" languages=$languages input_name='meta_title' input_value=$product->meta_title} @@ -60,7 +60,7 @@ - {include file="products/input_text_lang.tpl" + {include file="controllers/products/input_text_lang.tpl" languages=$languages input_name='meta_description' input_value=$product->meta_description @@ -73,7 +73,7 @@ - {include file="products/input_text_lang.tpl" languages=$languages + {include file="controllers/products/input_text_lang.tpl" languages=$languages input_value=$product->meta_keywords input_name='meta_keywords'}

{l s='Keywords for HTML header, separated by a comma'}

@@ -84,7 +84,7 @@ - {include file="products/input_text_lang.tpl" + {include file="controllers/products/input_text_lang.tpl" languages=$languages input_value=$product->link_rewrite input_name='link_rewrite'} diff --git a/admin-dev/themes/default/template/products/shipping.tpl b/admin-dev/themes/default/template/controllers/products/shipping.tpl similarity index 100% rename from admin-dev/themes/default/template/products/shipping.tpl rename to admin-dev/themes/default/template/controllers/products/shipping.tpl diff --git a/admin-dev/themes/default/template/products/suppliers.tpl b/admin-dev/themes/default/template/controllers/products/suppliers.tpl similarity index 100% rename from admin-dev/themes/default/template/products/suppliers.tpl rename to admin-dev/themes/default/template/controllers/products/suppliers.tpl diff --git a/admin-dev/themes/default/template/products/textarea_lang.tpl b/admin-dev/themes/default/template/controllers/products/textarea_lang.tpl similarity index 100% rename from admin-dev/themes/default/template/products/textarea_lang.tpl rename to admin-dev/themes/default/template/controllers/products/textarea_lang.tpl diff --git a/admin-dev/themes/default/template/products/virtualproduct.tpl b/admin-dev/themes/default/template/controllers/products/virtualproduct.tpl similarity index 100% rename from admin-dev/themes/default/template/products/virtualproduct.tpl rename to admin-dev/themes/default/template/controllers/products/virtualproduct.tpl diff --git a/admin-dev/themes/default/template/products/warehouses.tpl b/admin-dev/themes/default/template/controllers/products/warehouses.tpl similarity index 100% rename from admin-dev/themes/default/template/products/warehouses.tpl rename to admin-dev/themes/default/template/controllers/products/warehouses.tpl diff --git a/admin-dev/themes/default/template/referrers/calendar.tpl b/admin-dev/themes/default/template/controllers/referrers/calendar.tpl similarity index 100% rename from admin-dev/themes/default/template/referrers/calendar.tpl rename to admin-dev/themes/default/template/controllers/referrers/calendar.tpl diff --git a/admin-dev/themes/default/template/referrers/form.tpl b/admin-dev/themes/default/template/controllers/referrers/form.tpl similarity index 99% rename from admin-dev/themes/default/template/referrers/form.tpl rename to admin-dev/themes/default/template/controllers/referrers/form.tpl index e90fef401..f90365bf1 100644 --- a/admin-dev/themes/default/template/referrers/form.tpl +++ b/admin-dev/themes/default/template/controllers/referrers/form.tpl @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="other_fieldsets"} {if $f == 1} diff --git a/admin-dev/themes/default/template/referrers/form_settings.tpl b/admin-dev/themes/default/template/controllers/referrers/form_settings.tpl similarity index 100% rename from admin-dev/themes/default/template/referrers/form_settings.tpl rename to admin-dev/themes/default/template/controllers/referrers/form_settings.tpl diff --git a/admin-dev/themes/default/template/referrers/list_header.tpl b/admin-dev/themes/default/template/controllers/referrers/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/referrers/list_header.tpl rename to admin-dev/themes/default/template/controllers/referrers/list_header.tpl diff --git a/admin-dev/themes/default/template/referrers/view.tpl b/admin-dev/themes/default/template/controllers/referrers/view.tpl similarity index 100% rename from admin-dev/themes/default/template/referrers/view.tpl rename to admin-dev/themes/default/template/controllers/referrers/view.tpl diff --git a/admin-dev/themes/default/template/request_sql/form.tpl b/admin-dev/themes/default/template/controllers/request_sql/form.tpl similarity index 98% rename from admin-dev/themes/default/template/request_sql/form.tpl rename to admin-dev/themes/default/template/controllers/request_sql/form.tpl index b0fde1e31..3ebd3a719 100644 --- a/admin-dev/themes/default/template/request_sql/form.tpl +++ b/admin-dev/themes/default/template/controllers/request_sql/form.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="after"}
diff --git a/admin-dev/themes/default/template/request_sql/list_action_export.tpl b/admin-dev/themes/default/template/controllers/request_sql/list_action_export.tpl similarity index 100% rename from admin-dev/themes/default/template/request_sql/list_action_export.tpl rename to admin-dev/themes/default/template/controllers/request_sql/list_action_export.tpl diff --git a/admin-dev/themes/default/template/request_sql/view.tpl b/admin-dev/themes/default/template/controllers/request_sql/view.tpl similarity index 100% rename from admin-dev/themes/default/template/request_sql/view.tpl rename to admin-dev/themes/default/template/controllers/request_sql/view.tpl diff --git a/admin-dev/themes/default/template/return/form.tpl b/admin-dev/themes/default/template/controllers/return/form.tpl similarity index 100% rename from admin-dev/themes/default/template/return/form.tpl rename to admin-dev/themes/default/template/controllers/return/form.tpl diff --git a/admin-dev/themes/default/template/scenes/form.tpl b/admin-dev/themes/default/template/controllers/scenes/form.tpl similarity index 100% rename from admin-dev/themes/default/template/scenes/form.tpl rename to admin-dev/themes/default/template/controllers/scenes/form.tpl diff --git a/admin-dev/themes/default/template/search/view.tpl b/admin-dev/themes/default/template/controllers/search/view.tpl similarity index 100% rename from admin-dev/themes/default/template/search/view.tpl rename to admin-dev/themes/default/template/controllers/search/view.tpl diff --git a/admin-dev/themes/default/template/shipping/content.tpl b/admin-dev/themes/default/template/controllers/shipping/content.tpl similarity index 100% rename from admin-dev/themes/default/template/shipping/content.tpl rename to admin-dev/themes/default/template/controllers/shipping/content.tpl diff --git a/admin-dev/themes/default/template/shop/form.tpl b/admin-dev/themes/default/template/controllers/shop/form.tpl similarity index 100% rename from admin-dev/themes/default/template/shop/form.tpl rename to admin-dev/themes/default/template/controllers/shop/form.tpl diff --git a/admin-dev/themes/default/template/shop_url/form.tpl b/admin-dev/themes/default/template/controllers/shop_url/form.tpl similarity index 100% rename from admin-dev/themes/default/template/shop_url/form.tpl rename to admin-dev/themes/default/template/controllers/shop_url/form.tpl diff --git a/admin-dev/themes/default/template/slip/form.tpl b/admin-dev/themes/default/template/controllers/slip/form.tpl similarity index 100% rename from admin-dev/themes/default/template/slip/form.tpl rename to admin-dev/themes/default/template/controllers/slip/form.tpl diff --git a/admin-dev/themes/default/template/specific_price_rule/form.tpl b/admin-dev/themes/default/template/controllers/specific_price_rule/form.tpl similarity index 100% rename from admin-dev/themes/default/template/specific_price_rule/form.tpl rename to admin-dev/themes/default/template/controllers/specific_price_rule/form.tpl diff --git a/admin-dev/themes/default/template/states/list_footer.tpl b/admin-dev/themes/default/template/controllers/states/list_footer.tpl similarity index 100% rename from admin-dev/themes/default/template/states/list_footer.tpl rename to admin-dev/themes/default/template/controllers/states/list_footer.tpl diff --git a/admin-dev/themes/default/template/stats/calendar.tpl b/admin-dev/themes/default/template/controllers/stats/calendar.tpl similarity index 100% rename from admin-dev/themes/default/template/stats/calendar.tpl rename to admin-dev/themes/default/template/controllers/stats/calendar.tpl diff --git a/admin-dev/themes/default/template/stats/engines.tpl b/admin-dev/themes/default/template/controllers/stats/engines.tpl similarity index 100% rename from admin-dev/themes/default/template/stats/engines.tpl rename to admin-dev/themes/default/template/controllers/stats/engines.tpl diff --git a/admin-dev/themes/default/template/stats/menu.tpl b/admin-dev/themes/default/template/controllers/stats/menu.tpl similarity index 100% rename from admin-dev/themes/default/template/stats/menu.tpl rename to admin-dev/themes/default/template/controllers/stats/menu.tpl diff --git a/admin-dev/themes/default/template/stats/stats.tpl b/admin-dev/themes/default/template/controllers/stats/stats.tpl similarity index 100% rename from admin-dev/themes/default/template/stats/stats.tpl rename to admin-dev/themes/default/template/controllers/stats/stats.tpl diff --git a/admin-dev/themes/default/template/stats/view.tpl b/admin-dev/themes/default/template/controllers/stats/view.tpl similarity index 100% rename from admin-dev/themes/default/template/stats/view.tpl rename to admin-dev/themes/default/template/controllers/stats/view.tpl diff --git a/admin-dev/themes/default/template/statuses/form.tpl b/admin-dev/themes/default/template/controllers/statuses/form.tpl similarity index 98% rename from admin-dev/themes/default/template/statuses/form.tpl rename to admin-dev/themes/default/template/controllers/statuses/form.tpl index 9deebb0b7..553f5334f 100644 --- a/admin-dev/themes/default/template/statuses/form.tpl +++ b/admin-dev/themes/default/template/controllers/statuses/form.tpl @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="label"} {if $input.type == "select_template"} diff --git a/admin-dev/themes/default/template/stock_cover/list_header.tpl b/admin-dev/themes/default/template/controllers/stock_cover/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/stock_cover/list_header.tpl rename to admin-dev/themes/default/template/controllers/stock_cover/list_header.tpl diff --git a/admin-dev/themes/default/template/stock_instant_state/list_header.tpl b/admin-dev/themes/default/template/controllers/stock_instant_state/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/stock_instant_state/list_header.tpl rename to admin-dev/themes/default/template/controllers/stock_instant_state/list_header.tpl diff --git a/admin-dev/themes/default/template/stock_mvt/list_header.tpl b/admin-dev/themes/default/template/controllers/stock_mvt/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/stock_mvt/list_header.tpl rename to admin-dev/themes/default/template/controllers/stock_mvt/list_header.tpl diff --git a/admin-dev/themes/default/template/stores/form.tpl b/admin-dev/themes/default/template/controllers/stores/form.tpl similarity index 100% rename from admin-dev/themes/default/template/stores/form.tpl rename to admin-dev/themes/default/template/controllers/stores/form.tpl diff --git a/admin-dev/themes/default/template/supplier_orders_receipt_history/list_action_details.tpl b/admin-dev/themes/default/template/controllers/supplier_orders_receipt_history/list_action_details.tpl similarity index 100% rename from admin-dev/themes/default/template/supplier_orders_receipt_history/list_action_details.tpl rename to admin-dev/themes/default/template/controllers/supplier_orders_receipt_history/list_action_details.tpl diff --git a/admin-dev/themes/default/template/suppliers/view.tpl b/admin-dev/themes/default/template/controllers/suppliers/view.tpl similarity index 100% rename from admin-dev/themes/default/template/suppliers/view.tpl rename to admin-dev/themes/default/template/controllers/suppliers/view.tpl diff --git a/admin-dev/themes/default/template/supply_orders/form.tpl b/admin-dev/themes/default/template/controllers/supply_orders/form.tpl similarity index 99% rename from admin-dev/themes/default/template/supply_orders/form.tpl rename to admin-dev/themes/default/template/controllers/supply_orders/form.tpl index 3fe0e5db2..b3bf12a59 100644 --- a/admin-dev/themes/default/template/supply_orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/supply_orders/form.tpl @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="other_fieldsets"} {if isset($show_product_management_form)} diff --git a/admin-dev/themes/default/template/supply_orders/list_header.tpl b/admin-dev/themes/default/template/controllers/supply_orders/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/supply_orders/list_header.tpl rename to admin-dev/themes/default/template/controllers/supply_orders/list_header.tpl diff --git a/admin-dev/themes/default/template/supply_orders/update_receipt.tpl b/admin-dev/themes/default/template/controllers/supply_orders/update_receipt.tpl similarity index 100% rename from admin-dev/themes/default/template/supply_orders/update_receipt.tpl rename to admin-dev/themes/default/template/controllers/supply_orders/update_receipt.tpl diff --git a/admin-dev/themes/default/template/supply_orders/view.tpl b/admin-dev/themes/default/template/controllers/supply_orders/view.tpl similarity index 100% rename from admin-dev/themes/default/template/supply_orders/view.tpl rename to admin-dev/themes/default/template/controllers/supply_orders/view.tpl diff --git a/admin-dev/themes/default/template/supply_orders_receipt_history/list_action_details.tpl b/admin-dev/themes/default/template/controllers/supply_orders_receipt_history/list_action_details.tpl similarity index 100% rename from admin-dev/themes/default/template/supply_orders_receipt_history/list_action_details.tpl rename to admin-dev/themes/default/template/controllers/supply_orders_receipt_history/list_action_details.tpl diff --git a/admin-dev/themes/default/template/tags/form.tpl b/admin-dev/themes/default/template/controllers/tags/form.tpl similarity index 100% rename from admin-dev/themes/default/template/tags/form.tpl rename to admin-dev/themes/default/template/controllers/tags/form.tpl diff --git a/admin-dev/themes/default/template/tax_rules/form.tpl b/admin-dev/themes/default/template/controllers/tax_rules/form.tpl similarity index 98% rename from admin-dev/themes/default/template/tax_rules/form.tpl rename to admin-dev/themes/default/template/controllers/tax_rules/form.tpl index 04ff264d5..faed1bdf3 100644 --- a/admin-dev/themes/default/template/tax_rules/form.tpl +++ b/admin-dev/themes/default/template/controllers/tax_rules/form.tpl @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="label"} {if isset($input.label)} diff --git a/admin-dev/themes/default/template/tax_rules/list_action_edit.tpl b/admin-dev/themes/default/template/controllers/tax_rules/list_action_edit.tpl similarity index 100% rename from admin-dev/themes/default/template/tax_rules/list_action_edit.tpl rename to admin-dev/themes/default/template/controllers/tax_rules/list_action_edit.tpl diff --git a/admin-dev/themes/default/template/tax_rules/list_content.tpl b/admin-dev/themes/default/template/controllers/tax_rules/list_content.tpl similarity index 100% rename from admin-dev/themes/default/template/tax_rules/list_content.tpl rename to admin-dev/themes/default/template/controllers/tax_rules/list_content.tpl diff --git a/admin-dev/themes/default/template/tax_rules_group/form.tpl b/admin-dev/themes/default/template/controllers/tax_rules_group/form.tpl similarity index 95% rename from admin-dev/themes/default/template/tax_rules_group/form.tpl rename to admin-dev/themes/default/template/controllers/tax_rules_group/form.tpl index 3ea9b3b05..882807024 100644 --- a/admin-dev/themes/default/template/tax_rules_group/form.tpl +++ b/admin-dev/themes/default/template/controllers/tax_rules_group/form.tpl @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{extends file="../helper/form/form.tpl"} +{extends file="helper/form/form.tpl"} {block name="after"}
diff --git a/admin-dev/themes/default/template/themes/options.tpl b/admin-dev/themes/default/template/controllers/themes/options.tpl similarity index 100% rename from admin-dev/themes/default/template/themes/options.tpl rename to admin-dev/themes/default/template/controllers/themes/options.tpl diff --git a/admin-dev/themes/default/template/tracking/list_header.tpl b/admin-dev/themes/default/template/controllers/tracking/list_header.tpl similarity index 100% rename from admin-dev/themes/default/template/tracking/list_header.tpl rename to admin-dev/themes/default/template/controllers/tracking/list_header.tpl diff --git a/admin-dev/themes/default/template/translations/auto_translate.tpl b/admin-dev/themes/default/template/controllers/translations/auto_translate.tpl similarity index 100% rename from admin-dev/themes/default/template/translations/auto_translate.tpl rename to admin-dev/themes/default/template/controllers/translations/auto_translate.tpl diff --git a/admin-dev/themes/default/template/translations/main.tpl b/admin-dev/themes/default/template/controllers/translations/main.tpl similarity index 100% rename from admin-dev/themes/default/template/translations/main.tpl rename to admin-dev/themes/default/template/controllers/translations/main.tpl diff --git a/admin-dev/themes/default/template/translations/translation_errors.tpl b/admin-dev/themes/default/template/controllers/translations/translation_errors.tpl similarity index 100% rename from admin-dev/themes/default/template/translations/translation_errors.tpl rename to admin-dev/themes/default/template/controllers/translations/translation_errors.tpl diff --git a/admin-dev/themes/default/template/translations/translation_form.tpl b/admin-dev/themes/default/template/controllers/translations/translation_form.tpl similarity index 98% rename from admin-dev/themes/default/template/translations/translation_form.tpl rename to admin-dev/themes/default/template/controllers/translations/translation_form.tpl index 9bf7c3fe5..1d3ac451e 100644 --- a/admin-dev/themes/default/template/translations/translation_form.tpl +++ b/admin-dev/themes/default/template/controllers/translations/translation_form.tpl @@ -36,7 +36,6 @@ {if !$suoshin_exceeded} {$toggle_button} - {*{include file="translations/auto_translate.tpl"}*}

diff --git a/admin-dev/themes/default/template/translations/translation_mails.tpl b/admin-dev/themes/default/template/controllers/translations/translation_mails.tpl similarity index 100% rename from admin-dev/themes/default/template/translations/translation_mails.tpl rename to admin-dev/themes/default/template/controllers/translations/translation_mails.tpl diff --git a/admin-dev/themes/default/template/translations/translation_modules.tpl b/admin-dev/themes/default/template/controllers/translations/translation_modules.tpl similarity index 98% rename from admin-dev/themes/default/template/translations/translation_modules.tpl rename to admin-dev/themes/default/template/controllers/translations/translation_modules.tpl index 88fe0bd77..502c78c92 100644 --- a/admin-dev/themes/default/template/translations/translation_modules.tpl +++ b/admin-dev/themes/default/template/controllers/translations/translation_modules.tpl @@ -35,7 +35,6 @@ {if !$suoshin_exceeded} {$toggle_button} - {*{include file="translations/auto_translate.tpl"}*}
diff --git a/admin-dev/themes/default/template/warehouses/view.tpl b/admin-dev/themes/default/template/controllers/warehouses/view.tpl similarity index 100% rename from admin-dev/themes/default/template/warehouses/view.tpl rename to admin-dev/themes/default/template/controllers/warehouses/view.tpl diff --git a/admin-dev/themes/default/template/webservice/form.tpl b/admin-dev/themes/default/template/controllers/webservice/form.tpl similarity index 100% rename from admin-dev/themes/default/template/webservice/form.tpl rename to admin-dev/themes/default/template/controllers/webservice/form.tpl diff --git a/classes/AdminController.php b/classes/AdminController.php index dbcceb6b3..7aa80834b 100644 --- a/classes/AdminController.php +++ b/classes/AdminController.php @@ -294,6 +294,8 @@ class AdminControllerCore extends Controller if (!Shop::isFeatureActive()) $this->shopLinkType = ''; + //$this->base_template_folder = _PS_BO_ALL_THEMES_DIR_.$this->bo_theme.'/template'; + $this->override_folder = Tools::toUnderscoreCase(substr($controller, 5)).'/'; // Get the name of the folder containing the custom tpl files $this->tpl_folder = Tools::toUnderscoreCase(substr($controller, 5)).'/'; @@ -1108,6 +1110,7 @@ class AdminControllerCore extends Controller // Template override $tpl = $this->tpl_folder.'content.tpl'; $tpl_action = $this->tpl_folder.$this->display.'.tpl'; + // Check if action template has been override // new smarty : template_dir is an array. @@ -1121,11 +1124,8 @@ class AdminControllerCore extends Controller if (!$this->ajax) { - // Check if content template has been override - if (file_exists($this->context->smarty->getTemplateDir(0).'/'.$tpl)) - $page = $this->context->smarty->fetch($tpl); - else - $page = $this->context->smarty->fetch($this->template); + $template = $this->createTemplate($this->template); + $page = $template->fetch(); } else $page = $this->content; @@ -2563,5 +2563,20 @@ class AdminControllerCore extends Controller $helper->token = $this->token; return $helper->renderRequiredFields($this->className, $this->identifier, $this->required_fields); } + + /** + * Create a template from the override file, else from the base file. + * + * @param string $tpl_name filename + * @return Template + */ + public function createTemplate($tpl_name) + { + // Overrides exists? + 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, $this->context->smarty); + + return $this->context->smarty->createTemplate($this->context->smarty->getTemplateDir(0).$tpl_name, $this->context->smarty); + } } diff --git a/classes/helper/Helper.php b/classes/helper/Helper.php index 9f6ad8d6e..fc3084410 100755 --- a/classes/helper/Helper.php +++ b/classes/helper/Helper.php @@ -80,8 +80,8 @@ class HelperCore public function createTemplate($tpl_name) { // Overrides exists? - if ($this->override_folder && file_exists($this->context->smarty->getTemplateDir(0).$this->override_folder.$tpl_name)) - return $this->context->smarty->createTemplate($this->override_folder.$tpl_name); + 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); } diff --git a/controllers/admin/AdminAccountingExportController.php b/controllers/admin/AdminAccountingExportController.php index 41b9c87d8..16a4489c9 100644 --- a/controllers/admin/AdminAccountingExportController.php +++ b/controllers/admin/AdminAccountingExportController.php @@ -59,7 +59,6 @@ class AdminAccountingExportControllerCore extends AdminController { $this->className = 'Accounting'; - $this->pathAccountExportTpl = _PS_ADMIN_DIR_.'/themes/default/template/accounting_export/'; $this->content = ''; $this->downloadDir = _PS_ADMIN_DIR_.'/export/'; $this->exportSelected = 'global_export'; @@ -118,8 +117,8 @@ class AdminAccountingExportControllerCore extends AdminController 'preventList' => $this->prevent ) ); - - $this->content .= $this->context->smarty->fetch($this->pathAccountExportTpl.'menu.tpl'); + + $this->content .= $this->createTemplate('menu.tpl')->fetch(); } /** @@ -155,23 +154,18 @@ class AdminAccountingExportControllerCore extends AdminController 'journal' => Configuration::get('ACCOUNTING_JOURNAL_EXPORT'), 'begin_date' => Tools::getValue('beginDate'), 'end_date' => Tools::getValue('endDate'), - 'pathAccountExportTpl' => $this->pathAccountExportTpl, 'urlDownload' => Tools::getShopDomain().'/download/' )); foreach($this->exportTypeList as $exportType) { - $pathTpl = $this->pathAccountExportTpl.$exportType['type'].'.tpl'; - $pathExportedFile = $this->downloadDir.$exportType['file']; - $this->context->smarty->assign(array( 'title' => $exportType['name'], 'type' => $exportType['type'], 'existingExport' => file_exists($this->downloadDir.$exportType['file']) ? true : false )); - - if (file_exists($pathTpl)) - $this->content .= $this->context->smarty->fetch($pathTpl); + + $this->content .= $this->createTemplate($exportType['type'].'.tpl')->fetch(); } parent::initContent(); } diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index 9136ebab9..77ee279e0 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -176,7 +176,7 @@ class AdminCartRulesControllerCore extends AdminController foreach ($results as $row) $attributes[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; Context::getContext()->smarty->assign('product_rule_itemlist', $attributes); - $choose_content = Context::getContext()->smarty->fetch('cart_rules/product_rule_itemlist.tpl'); + $choose_content = $this->createTemplate('product_rule_itemlist.tpl')->fetch(); Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); break; case 'products': @@ -190,7 +190,7 @@ class AdminCartRulesControllerCore extends AdminController foreach ($results as $row) $products[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; Context::getContext()->smarty->assign('product_rule_itemlist', $products); - $choose_content = Context::getContext()->smarty->fetch('cart_rules/product_rule_itemlist.tpl'); + $choose_content = $this->createTemplate('product_rule_itemlist.tpl')->fetch(); Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); break; case 'categories': @@ -204,14 +204,14 @@ class AdminCartRulesControllerCore extends AdminController foreach ($results as $row) $categories[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; Context::getContext()->smarty->assign('product_rule_itemlist', $categories); - $choose_content = Context::getContext()->smarty->fetch('cart_rules/product_rule_itemlist.tpl'); + $choose_content = $this->createTemplate('product_rule_itemlist.tpl')->fetch(); Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); break; default: die; } - return Context::getContext()->smarty->fetch('cart_rules/product_rule.tpl'); + return $this->createTemplate('product_rule.tpl')->fetch(); } public function ajaxProcess() @@ -337,7 +337,7 @@ class AdminCartRulesControllerCore extends AdminController ) ); - $this->content .= Context::getContext()->smarty->fetch('cart_rules/form.tpl'); + $this->content .= $this->createTemplate('form.tpl')->fetch(); $this->addJqueryUI('ui.datepicker'); return parent::renderForm(); diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php index 753f1d3c9..c5daa5e2e 100644 --- a/controllers/admin/AdminCustomerThreadsController.php +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -524,7 +524,7 @@ class AdminCustomerThreadsControllerCore extends AdminController private function displayMessage($message, $email = false, $id_employee = null) { - $tpl = $this->context->smarty->createTemplate($this->tpl_folder.'message.tpl'); + $tpl = $this->createTemplate('message.tpl'); $contacts = Contact::getContacts($this->context->language->id); diff --git a/controllers/admin/AdminHomeController.php b/controllers/admin/AdminHomeController.php index c721f4601..39233fb2c 100644 --- a/controllers/admin/AdminHomeController.php +++ b/controllers/admin/AdminHomeController.php @@ -148,7 +148,8 @@ class AdminHomeControllerCore extends AdminController } $this->context->smarty->assign('opti_list',$opti_list); $this->context->smarty->assign('content',$content); - return $this->context->smarty->fetch('home/optimizationTips.tpl'); + $template = $this->createTemplate('optimizationTips.tpl'); + return $template->fetch(); } public function setMedia() diff --git a/controllers/admin/AdminModulesPositionsController.php b/controllers/admin/AdminModulesPositionsController.php index 7b926a2dd..cb27e1fee 100644 --- a/controllers/admin/AdminModulesPositionsController.php +++ b/controllers/admin/AdminModulesPositionsController.php @@ -285,7 +285,7 @@ class AdminModulesPositionsControllerCore extends AdminController 'can_move' => (Shop::isFeatureActive() && $this->context->shop->getContextType() != Shop::CONTEXT_SHOP) ? false : true, )); - return $this->context->smarty->fetch('modules_positions/list_modules.tpl'); + return $this->createTemplate('list_modules.tpl')->fetch(); } public function renderForm() @@ -344,7 +344,7 @@ class AdminModulesPositionsControllerCore extends AdminController foreach ($exceptsList as $shopID => $fileList) $exception_list_diff[] = $this->displayModuleExceptionList($fileList, $shopID); - $tpl = $this->context->smarty->createTemplate('modules_positions/form.tpl'); + $tpl = $this->createTemplate('form.tpl'); $tpl->assign(array( 'url_submit' => self::$currentIndex.'&token='.$this->token, 'edit_graft' => Tools::isSubmit('editGraft'), diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index a17b76842..858c9bb6c 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -102,7 +102,7 @@ class AdminOrdersControllerCore extends AdminController 'toolbar_fix' => $this->toolbar_fix, 'title' => $this->l('Orders : create order'), )); - $this->content .= $this->context->smarty->fetch('orders/form.tpl'); + $this->content .= $this->createTemplate('form.tpl')->fetch(); } public function initToolbar() @@ -162,7 +162,7 @@ class AdminOrdersControllerCore extends AdminController 'tr' => $tr )); - return $this->context->smarty->fetch('orders/_print_pdf_icon.tpl'); + return $this->createTemplate('_print_pdf_icon.tpl')->fetch(); } public function postProcess() @@ -1393,13 +1393,13 @@ class AdminOrdersControllerCore extends AdminController die(Tools::jsonEncode(array( 'result' => true, - 'view' => $this->context->smarty->fetch('orders/_product_line.tpl'), + 'view' => $this->createTemplate('_product_line.tpl')->fetch(), 'can_edit' => $this->tabAccess['add'], 'order' => $order, 'invoices' => $invoice_array, - 'documents_html' => $this->context->smarty->fetch('orders/_documents.tpl'), - 'shipping_html' => $this->context->smarty->fetch('orders/_shipping.tpl'), - 'discount_form_html' => $this->context->smarty->fetch('orders/_discount_form.tpl') + 'documents_html' => $this->createTemplate('_documents.tpl')->fetch(), + 'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch(), + 'discount_form_html' => $this->createTemplate('_discount_form.tpl')->fetch() ))); } @@ -1552,13 +1552,13 @@ class AdminOrdersControllerCore extends AdminController die(Tools::jsonEncode(array( 'result' => $res, - 'view' => $this->context->smarty->fetch('orders/_product_line.tpl'), + 'view' => $this->createTemplate('_product_line.tpl')->fetch(), 'can_edit' => $this->tabAccess['add'], 'invoices_collection' => $invoice_collection, 'order' => $order, 'invoices' => $invoice_array, - 'documents_html' => $this->context->smarty->fetch('orders/_documents.tpl'), - 'shipping_html' => $this->context->smarty->fetch('orders/_shipping.tpl') + 'documents_html' => $this->createTemplate('_documents.tpl')->fetch(), + 'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch() ))); } @@ -1624,8 +1624,8 @@ class AdminOrdersControllerCore extends AdminController 'result' => $res, 'order' => $order, 'invoices' => $invoice_array, - 'documents_html' => $this->context->smarty->fetch('orders/_documents.tpl'), - 'shipping_html' => $this->context->smarty->fetch('orders/_shipping.tpl') + 'documents_html' => $this->createTemplate('_documents.tpl')->fetch(), + 'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch() ))); } diff --git a/controllers/admin/AdminOutstandingController.php b/controllers/admin/AdminOutstandingController.php index 5838c9403..4cc4b353d 100644 --- a/controllers/admin/AdminOutstandingController.php +++ b/controllers/admin/AdminOutstandingController.php @@ -135,7 +135,7 @@ class AdminOutstandingControllerCore extends AdminController 'id_invoice' => $id_invoice )); - return $this->context->smarty->fetch('outstanding/_print_pdf_icon.tpl'); + return $this->createTemplate('_print_pdf_icon.tpl')->fetch(); } public function printOutstandingCalculation($id_invoice, $tr) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 12ae852a2..b6839f894 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -1850,7 +1850,7 @@ class AdminProductsControllerCore extends AdminController $this->tab_display = 'Informations'; if(method_exists($this, 'initForm'.$this->tab_display)) - $this->tpl_form = 'products/'.strtolower($this->tab_display).'.tpl'; + $this->tpl_form = strtolower($this->tab_display).'.tpl'; if ($this->ajax) $this->content_only = true; @@ -2144,13 +2144,9 @@ class AdminProductsControllerCore extends AdminController $this->_errors[] = 'Unable to load object'; else { - if ($this->object->id && !Shop::isProductAvailable($this->object->id)) - $this->_displayUnavailableProductWarning(); - $this->_displayDraftWarning($this->object->active); $this->initPack($this->object); - $this->{'initForm'.$this->tab_display}($this->object, $languages, $default_language); $this->tpl_form_vars['product'] = $this->object; if ($this->ajax) @@ -2159,7 +2155,6 @@ class AdminProductsControllerCore extends AdminController else return $this->tpl_form_vars['custom_form']; } - $parent = parent::renderForm(); $this->addJqueryPlugin(array('autocomplete', 'fancybox', 'typewatch')); return $parent; @@ -2460,12 +2455,11 @@ class AdminProductsControllerCore extends AdminController */ public function initFormAccounting($obj) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ($obj->id) { $error = ''; - $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; $detail = array(); if (count($this->context->shop->getListOfID()) > 1) @@ -2498,13 +2492,13 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before manage accounting.')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormAssociations($obj) { $product = $obj; - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); // Prepare Categories tree for display in Associations tab $default_category = Tools::getValue('id_category', 1); @@ -2518,15 +2512,8 @@ class AdminProductsControllerCore extends AdminController $selected_cat = Product::getProductCategoriesFull($product->id, $this->default_form_language); } - if ($this->context->shop() == Shop::CONTEXT_SHOP) - { - $root_category = Category::getRootCategory(); - $root_category = array('id_category' => $root_category->id_category, 'name' => $root_category->name); - } - else - $root_category = array('id_category' => '0', 'name' => $this->l('Root')); $translations = array( - 'Root' => $root_category, + 'Home' => $this->l('Home'), 'selected' => $this->l('selected'), 'Collapse All' => $this->l('Collapse All'), 'Expand All' => $this->l('Expand All'), @@ -2569,12 +2556,12 @@ class AdminProductsControllerCore extends AdminController 'link' => $this->context->link )); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormPrices($obj) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); $product = $obj; if ($obj->id) { @@ -2651,12 +2638,12 @@ class AdminProductsControllerCore extends AdminController 'token' => $this->token )); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormSeo($product, $languages, $default_language) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); $data->assign(array( 'product' => $product, @@ -2665,12 +2652,12 @@ class AdminProductsControllerCore extends AdminController 'ps_ssl_enabled' => Configuration::get('PS_SSL_ENABLED') )); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormPack($product, $languages, $default_language) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); $product->packItems = Pack::getItems($product->id, $this->context->language->id); @@ -2698,12 +2685,12 @@ class AdminProductsControllerCore extends AdminController 'input_namepack_items' => $input_namepack_items )); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormVirtualProduct($product, $languages, $default_language) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); $currency = $this->context->currency; @@ -2775,7 +2762,7 @@ class AdminProductsControllerCore extends AdminController $data->assign($this->tpl_form_vars); $data->assign('link', $this->context->link); $this->tpl_form_vars['product'] = $product; - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } private function _getFinalPrice($specific_price, $productPrice, $taxRate) @@ -3009,7 +2996,7 @@ class AdminProductsControllerCore extends AdminController public function initFormCustomization($obj, $languages, $default_language) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ((bool)$obj->id) { @@ -3033,12 +3020,12 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before adding customization.')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormAttachments($obj, $languages, $default_language) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ((bool)$obj->id) { @@ -3065,12 +3052,12 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before adding attachements.')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormInformations($product) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); // autoload rich text editor (tiny mce) $iso = $this->context->language->iso_code; @@ -3152,12 +3139,12 @@ class AdminProductsControllerCore extends AdminController $data->assign('link', $this->context->link); $data->assign('PS_PRODUCT_SHORT_DESC_LIMIT', Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT') ? Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT') : 400); $this->tpl_form_vars['product'] = $product; - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormShipping($obj) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); $data->assign(array( 'product' => $obj, 'ps_dimension_unit' => Configuration::get('PS_DIMENSION_UNIT'), @@ -3166,7 +3153,7 @@ class AdminProductsControllerCore extends AdminController 'currency' => $this->context->currency, 'country_display_tax_label' => $this->context->country->display_tax_label )); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } protected function getCarrierList() @@ -3200,7 +3187,7 @@ class AdminProductsControllerCore extends AdminController public function initFormImages($obj) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ((bool)$obj->id) { @@ -3237,7 +3224,7 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before adding images.')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormCombinations($obj, $languages, $default_language) @@ -3254,7 +3241,7 @@ class AdminProductsControllerCore extends AdminController return; } - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ((bool)$product->id) { $attribute_js = array(); @@ -3314,7 +3301,7 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before adding combinations.')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function renderListAttributes($id_product_download, $product, $currency) @@ -3463,7 +3450,7 @@ class AdminProductsControllerCore extends AdminController public function initFormQuantities($obj, $languages) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ($obj->id) { @@ -3559,12 +3546,12 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before managing quantities.')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormSuppliers($obj) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ($obj->id) { @@ -3631,12 +3618,12 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before managing suppliers')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormWarehouses($obj) { - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ($obj->id) { @@ -3676,7 +3663,7 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before managing warehouses')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function initFormFeatures($obj) @@ -3687,7 +3674,7 @@ class AdminProductsControllerCore extends AdminController return; } - $data = $this->context->smarty->createData(); + $data = $this->createTemplate($this->tpl_form); if ($obj->id) { $features = Feature::getFeatures($this->context->language->id); @@ -3722,7 +3709,7 @@ class AdminProductsControllerCore extends AdminController else $this->displayWarning($this->l('You must save this product before adding features.')); - $this->tpl_form_vars['custom_form'] = $this->context->smarty->createTemplate($this->tpl_form, $data)->fetch(); + $this->tpl_form_vars['custom_form'] = $data->fetch(); } public function ajaxProcessProductQuantity() diff --git a/controllers/admin/AdminReferrersController.php b/controllers/admin/AdminReferrersController.php index 1b5973bfe..bbedd217b 100644 --- a/controllers/admin/AdminReferrersController.php +++ b/controllers/admin/AdminReferrersController.php @@ -364,7 +364,7 @@ class AdminReferrersControllerCore extends AdminController public static function displayCalendarForm($translations, $token, $action = null, $table = null, $identifier = null, $id = null) { $context = Context::getContext(); - $tpl = $context->smarty->createTemplate('referrers/calendar.tpl'); + $tpl = $context->controller->createTemplate('calendar.tpl'); $context->controller->addJqueryUI('ui.datepicker'); @@ -387,7 +387,7 @@ class AdminReferrersControllerCore extends AdminController { if (!Tools::isSubmit('viewreferrer')) { - $tpl = $this->context->smarty->createTemplate($this->tpl_folder.'form_settings.tpl'); + $tpl = $this->createTemplate('form_settings.tpl'); $tpl->assign(array( 'current' => self::$currentIndex, diff --git a/controllers/admin/AdminRequestSqlController.php b/controllers/admin/AdminRequestSqlController.php index e78b752aa..17ac8947e 100644 --- a/controllers/admin/AdminRequestSqlController.php +++ b/controllers/admin/AdminRequestSqlController.php @@ -171,7 +171,7 @@ class AdminRequestSqlControllerCore extends AdminController */ public function displayExportLink($token, $id) { - $tpl = $this->context->smarty->createTemplate('request_sql/list_action_export.tpl'); + $tpl = $this->createTemplate('list_action_export.tpl'); $tpl->assign(array( 'href' => self::$currentIndex.'&token='.$this->token.'&'.$this->identifier.'='.$id.'&export'.$this->table.'=1', diff --git a/controllers/admin/AdminStatsTabController.php b/controllers/admin/AdminStatsTabController.php index fbc70da43..d8fb61e86 100644 --- a/controllers/admin/AdminStatsTabController.php +++ b/controllers/admin/AdminStatsTabController.php @@ -74,7 +74,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor public static function displayCalendarForm($translations, $token, $action = null, $table = null, $identifier = null, $id = null) { $context = Context::getContext(); - $tpl = $context->smarty->createTemplate('stats/calendar.tpl'); + $tpl = $context->controller->createTemplate('calendar.tpl'); $context->controller->addJqueryUI('ui.datepicker'); @@ -95,7 +95,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor protected function displayEngines() { - $tpl = $this->context->smarty->createTemplate('stats/engines.tpl'); + $tpl = $this->createTemplate('engines.tpl'); $autoclean_period = array( 'never' => $this->l('Never'), @@ -120,7 +120,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor public function displayMenu() { - $tpl = $this->context->smarty->createTemplate('stats/menu.tpl'); + $tpl = $this->createTemplate('menu.tpl'); $modules = $this->getModules(); $module_instance = array(); @@ -152,7 +152,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor public function displayStats() { - $tpl = $this->context->smarty->createTemplate('stats/stats.tpl'); + $tpl = $this->createTemplate('stats.tpl'); if (!($module_name = Tools::getValue('module')) && $module_instance = Module::getInstanceByName('statsforecast') AND $module_instance->active) $module_name = 'statsforecast'; diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index 0462c357c..0f703fce2 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -173,7 +173,7 @@ class AdminStatusesControllerCore extends AdminController 'action' => self::$cache_lang['editaddresses'], )); - return $this->context->smarty->fetch('manufacturers/list_action_edit_adresses.tpl'); + return $this->createTemplate('list_action_edit_adresses.tpl')->fetch(); } public function renderForm()