diff --git a/admin-dev/themes/template/carriers/form.tpl b/admin-dev/themes/template/carriers/form.tpl index 41b93ee61..7496c634a 100644 --- a/admin-dev/themes/template/carriers/form.tpl +++ b/admin-dev/themes/template/carriers/form.tpl @@ -243,9 +243,9 @@ {elseif $input.type == 'group'} {assign var=groups value=$input.values} - {include file='form_group.tpl'} + {include file='helper/form/form_group.tpl'} {elseif $input.type == 'shop' OR $input.type == 'group_shop'} - {include file='form_shop.tpl'} + {include file='helper/form/form_shop.tpl'} {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
diff --git a/admin-dev/themes/template/countries/form.tpl b/admin-dev/themes/template/countries/form.tpl index 0c0f73c30..50fa21b4c 100644 --- a/admin-dev/themes/template/countries/form.tpl +++ b/admin-dev/themes/template/countries/form.tpl @@ -274,9 +274,9 @@ {elseif $input.type == 'group'} {assign var=groups value=$input.values} - {include file='form_group.tpl'} + {include file='helper/form/form_group.tpl'} {elseif $input.type == 'shop' OR $input.type == 'group_shop'} - {include file='form_shop.tpl'} + {include file='helper/form/form_shop.tpl'} {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
diff --git a/admin-dev/themes/template/customers/form.tpl b/admin-dev/themes/template/customers/form.tpl index 4a1dc4f6c..c65af23db 100644 --- a/admin-dev/themes/template/customers/form.tpl +++ b/admin-dev/themes/template/customers/form.tpl @@ -245,9 +245,9 @@ {/foreach} {elseif $input.type == 'group'} {assign var=groups value=$input.values} - {include file='form_group.tpl'} + {include file='helper/form/form_group.tpl'} {elseif $input.type == 'shop' OR $input.type == 'group_shop'} - {include file='form_shop.tpl'} + {include file='helper/form/form_shop.tpl'} {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
diff --git a/admin-dev/themes/template/employees/form.tpl b/admin-dev/themes/template/employees/form.tpl index 796c275ea..3dbe2f9ed 100644 --- a/admin-dev/themes/template/employees/form.tpl +++ b/admin-dev/themes/template/employees/form.tpl @@ -237,7 +237,7 @@ value="" /> {elseif $input.type == 'group'} {assign var=groups value=$input.values} - {include file='form_group.tpl'} + {include file='helper/form/form_group.tpl'} {elseif $input.type == 'shop' OR $input.type == 'group_shop'} - {include file='form_shop.tpl'} + {include file='helper/form/form_shop.tpl'} {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
diff --git a/admin-dev/themes/template/geolocation/options.tpl b/admin-dev/themes/template/geolocation/options.tpl index 748c7bf8c..09272d0fa 100644 --- a/admin-dev/themes/template/geolocation/options.tpl +++ b/admin-dev/themes/template/geolocation/options.tpl @@ -57,4 +57,5 @@

{/if} +
{/block} \ No newline at end of file diff --git a/admin-dev/themes/template/form.tpl b/admin-dev/themes/template/helper/form/form.tpl similarity index 100% rename from admin-dev/themes/template/form.tpl rename to admin-dev/themes/template/helper/form/form.tpl diff --git a/admin-dev/themes/template/helper/form/form_category.tpl b/admin-dev/themes/template/helper/form/form_category.tpl new file mode 100644 index 000000000..14c5d1de3 --- /dev/null +++ b/admin-dev/themes/template/helper/form/form_category.tpl @@ -0,0 +1,91 @@ +{* +* 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: 8971 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if count($categories) && isset($categories)} + + + + + {if isset($categories.use_search) && $categories.use_search}{/if} + + + +
+ {$categories.trads['Collapse All']} + - {$categories.trads['Expand All']} + {if !$categories.use_radio} + - {$categories.trads['Check All']} + - {$categories.trads['Uncheck All']} + {/if} + {if $categories.use_search} + + {$categories.trads.search} : +
+ +
+
+ {/if} +
+ + {assign var=home_is_selected value=false} + + {foreach $categories.selected_cat AS $cat} + {if is_array($cat)} + {if $cat['id_category'] != 1} + + {else} + {assign var=home_is_selected value=true} + {/if} + {else} + {if $cat != 1} + + {else} + {assign var=home_is_selected value=true} + {/if} + {/if} + {/foreach} +
    +
  • + + + {$categories.trads.Home} + +
      +
    •  
    • +
    +
  • +
+{/if} \ No newline at end of file diff --git a/admin-dev/themes/template/form_group.tpl b/admin-dev/themes/template/helper/form/form_group.tpl similarity index 100% rename from admin-dev/themes/template/form_group.tpl rename to admin-dev/themes/template/helper/form/form_group.tpl diff --git a/admin-dev/themes/template/form_shop.tpl b/admin-dev/themes/template/helper/form/form_shop.tpl similarity index 100% rename from admin-dev/themes/template/form_shop.tpl rename to admin-dev/themes/template/helper/form/form_shop.tpl diff --git a/admin-dev/themes/template/list_action_addstock.tpl b/admin-dev/themes/template/helper/list/list_action_addstock.tpl similarity index 100% rename from admin-dev/themes/template/list_action_addstock.tpl rename to admin-dev/themes/template/helper/list/list_action_addstock.tpl diff --git a/admin-dev/themes/template/list_action_delete.tpl b/admin-dev/themes/template/helper/list/list_action_delete.tpl similarity index 100% rename from admin-dev/themes/template/list_action_delete.tpl rename to admin-dev/themes/template/helper/list/list_action_delete.tpl diff --git a/admin-dev/themes/template/list_action_details.tpl b/admin-dev/themes/template/helper/list/list_action_details.tpl similarity index 98% rename from admin-dev/themes/template/list_action_details.tpl rename to admin-dev/themes/template/helper/list/list_action_details.tpl index c47cc128d..88e35c8dc 100644 --- a/admin-dev/themes/template/list_action_details.tpl +++ b/admin-dev/themes/template/helper/list/list_action_details.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision$ +* @version Release: $Revision: 9597 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} diff --git a/admin-dev/themes/template/list_action_duplicate.tpl b/admin-dev/themes/template/helper/list/list_action_duplicate.tpl similarity index 100% rename from admin-dev/themes/template/list_action_duplicate.tpl rename to admin-dev/themes/template/helper/list/list_action_duplicate.tpl diff --git a/admin-dev/themes/template/list_action_edit.tpl b/admin-dev/themes/template/helper/list/list_action_edit.tpl similarity index 100% rename from admin-dev/themes/template/list_action_edit.tpl rename to admin-dev/themes/template/helper/list/list_action_edit.tpl diff --git a/admin-dev/themes/template/list_action_removestock.tpl b/admin-dev/themes/template/helper/list/list_action_removestock.tpl similarity index 100% rename from admin-dev/themes/template/list_action_removestock.tpl rename to admin-dev/themes/template/helper/list/list_action_removestock.tpl diff --git a/admin-dev/themes/template/list_action_transferstock.tpl b/admin-dev/themes/template/helper/list/list_action_transferstock.tpl similarity index 100% rename from admin-dev/themes/template/list_action_transferstock.tpl rename to admin-dev/themes/template/helper/list/list_action_transferstock.tpl diff --git a/admin-dev/themes/template/list_action_view.tpl b/admin-dev/themes/template/helper/list/list_action_view.tpl similarity index 100% rename from admin-dev/themes/template/list_action_view.tpl rename to admin-dev/themes/template/helper/list/list_action_view.tpl diff --git a/admin-dev/themes/template/list_content.tpl b/admin-dev/themes/template/helper/list/list_content.tpl similarity index 99% rename from admin-dev/themes/template/list_content.tpl rename to admin-dev/themes/template/helper/list/list_content.tpl index 95e6f8482..0b2a33594 100644 --- a/admin-dev/themes/template/list_content.tpl +++ b/admin-dev/themes/template/helper/list/list_content.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision$ +* @version Release: $Revision: 9608 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} diff --git a/admin-dev/themes/template/list_footer.tpl b/admin-dev/themes/template/helper/list/list_footer.tpl similarity index 97% rename from admin-dev/themes/template/list_footer.tpl rename to admin-dev/themes/template/helper/list/list_footer.tpl index 90b82c8a2..db299698c 100644 --- a/admin-dev/themes/template/list_footer.tpl +++ b/admin-dev/themes/template/helper/list/list_footer.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision$ +* @version Release: $Revision: 9432 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} diff --git a/admin-dev/themes/template/list_header.tpl b/admin-dev/themes/template/helper/list/list_header.tpl similarity index 99% rename from admin-dev/themes/template/list_header.tpl rename to admin-dev/themes/template/helper/list/list_header.tpl index fb64308e7..0b8b320c5 100644 --- a/admin-dev/themes/template/list_header.tpl +++ b/admin-dev/themes/template/helper/list/list_header.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision$ +* @version Release: $Revision: 9639 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} diff --git a/admin-dev/themes/template/options.tpl b/admin-dev/themes/template/helper/options/options.tpl similarity index 99% rename from admin-dev/themes/template/options.tpl rename to admin-dev/themes/template/helper/options/options.tpl index d970fed67..ce1ab1c1c 100644 --- a/admin-dev/themes/template/options.tpl +++ b/admin-dev/themes/template/helper/options/options.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision$ +* @version Release: $Revision: 9548 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -179,8 +179,8 @@ {/if} {if isset($field['desc'])}

{$field['desc']}

{/if} {if $field['is_invisible']}

{l s='You can\'t change the value of this configuration field in this shop context'}

{/if} -
- {block name="end_field_block"}{/block} +
+ {block name="end_field_block"}{/block} {/if} {/foreach} {if isset($categoryData['submit'])} diff --git a/admin-dev/themes/template/languages/form.tpl b/admin-dev/themes/template/languages/form.tpl index 4d9ef7a63..33a430691 100644 --- a/admin-dev/themes/template/languages/form.tpl +++ b/admin-dev/themes/template/languages/form.tpl @@ -242,9 +242,9 @@

{$input.text}

{elseif $input.type == 'group'} {assign var=groups value=$input.values} - {include file='form_group.tpl'} + {include file='helper/form/form_group.tpl'} {elseif $input.type == 'shop' OR $input.type == 'group_shop'} - {include file='form_shop.tpl'} + {include file='helper/form/form_shop.tpl'} {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
diff --git a/classes/HelperForm.php b/classes/HelperForm.php index dadcf391d..1c4744aa1 100644 --- a/classes/HelperForm.php +++ b/classes/HelperForm.php @@ -61,7 +61,7 @@ class HelperFormCore extends Helper public $default_form_language = null; public $allow_employee_form_lang = null; - public $tpl = 'form.tpl'; + public $tpl = 'helper/form/form.tpl'; public function generateForm($fields_form) { diff --git a/classes/HelperList.php b/classes/HelperList.php index 56ccb0555..1962f79a8 100644 --- a/classes/HelperList.php +++ b/classes/HelperList.php @@ -76,9 +76,9 @@ class HelperListCore extends Helper /** @var boolean Content line is clickable if true */ public $no_link = false; - public $header_tpl = 'list_header.tpl'; - public $content_tpl = 'list_content.tpl'; - public $footer_tpl = 'list_footer.tpl'; + public $header_tpl = 'helper/list/list_header.tpl'; + public $content_tpl = 'helper/list/list_content.tpl'; + public $footer_tpl = 'helper/list/list_footer.tpl'; /** @var array list of required actions for each list row */ public $actions = array(); @@ -120,7 +120,6 @@ class HelperListCore extends Helper $this->displayWarning($this->l('Bad SQL query')); return false; } - $this->_list = $list; $this->fieldsDisplay = $fields_display; @@ -294,7 +293,7 @@ class HelperListCore extends Helper 'has_actions' => (bool)count($this->actions), 'list_skip_actions' => $this->list_skip_actions, )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_content.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/'.$this->content_tpl); } /** @@ -318,7 +317,7 @@ class HelperListCore extends Helper 'location_ko' => $duplicate.'&noimage=1&token='.($token ? $token : $this->token).'\\', )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_action_duplicate.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_duplicate.tpl'); } @@ -351,7 +350,7 @@ class HelperListCore extends Helper 'token' => $this->token, 'action' => self::$cache_lang['Details'], )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_action_details.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_details.tpl'); } /** @@ -367,7 +366,7 @@ class HelperListCore extends Helper 'action' => self::$cache_lang['View'], )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_action_view.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_view.tpl'); } @@ -384,7 +383,7 @@ class HelperListCore extends Helper 'action' => self::$cache_lang['Edit'], )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_action_edit.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_edit.tpl'); } @@ -405,7 +404,7 @@ class HelperListCore extends Helper 'action' => self::$cache_lang['Delete'], )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_action_delete.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_delete.tpl'); } @@ -535,7 +534,7 @@ class HelperListCore extends Helper 'name_id' => isset($name_id) ? $name_id : null, )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_header.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/'.$this->header_tpl); } /** @@ -548,7 +547,7 @@ class HelperListCore extends Helper 'simple_header' => $this->simple_header, 'bulk_actions' => $this->bulk_actions, )); - return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/list_footer.tpl'); + return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/'.$this->footer_tpl); } } diff --git a/classes/HelperOptions.php b/classes/HelperOptions.php index 04a369d2a..deeba9b32 100644 --- a/classes/HelperOptions.php +++ b/classes/HelperOptions.php @@ -42,7 +42,7 @@ class HelperOptionsCore extends Helper public $fields_value = array(); - public $tpl = 'options.tpl'; + public $tpl = 'helper/options/options.tpl'; /** * Generate a form for options