From d744b9dbf2fa35e1af04b0620642749b00e97c69 Mon Sep 17 00:00:00 2001 From: Sarah Lorenzini Date: Wed, 31 Jul 2013 14:47:21 +0200 Subject: [PATCH] // update localization and modules tabs --- .../countries/helpers/list/list_footer.tpl | 1 + .../controllers/modules/favorites.tpl | 22 +-- .../template/controllers/modules/filters.tpl | 11 +- .../template/controllers/modules/list.tpl | 62 +++--- .../template/controllers/modules/page.tpl | 43 ++-- .../controllers/modules_positions/form.tpl | 94 +++++---- .../modules_positions/list_modules.tpl | 184 ++++++++++-------- .../controllers/payment/helpers/view/view.tpl | 1 - .../controllers/payment/restrictions.tpl | 27 +-- .../template/helpers/modules_list/list.tpl | 54 ++--- classes/controller/AdminController.php | 10 +- .../admin/AdminModulesPositionsController.php | 13 +- controllers/admin/AdminPaymentController.php | 6 +- controllers/admin/AdminStatesController.php | 2 +- 14 files changed, 294 insertions(+), 236 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl b/admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl index f512ab93f..c567089e1 100644 --- a/admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl +++ b/admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl @@ -55,6 +55,7 @@ + - - -
- {if !$except_diff} - {$exception_list} - {else} - {foreach $exception_list_diff as $value} - {$value} - {/foreach} - {/if} - {l s='Please specify the files for which you do not want the module to be displayed.'}.
- {l s='Please input each filename, separated by a comma.'}. -

-
- -
- {if $edit_graft} - - - {/if} - -
-
* {l s='Required field'}
+ \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl b/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl index e4b1ec6a6..df8e0d104 100644 --- a/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl +++ b/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl @@ -72,7 +72,7 @@ {foreach $hooks as $hook}
- +
@@ -80,94 +80,106 @@ - - + {if $hook['module_count'] && $can_move} - + {/if} - {$hook['title']} - - {$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if} - {if !empty($hook['description'])} -

- [{$hook['description']}] -

- {/if} -

({l s='Technical name: '}{$hook['name']})

- - - {if $hook['module_count']} - {foreach $hook['modules'] as $position => $module} - {if isset($module['instance'])} - - - {if !$display_key} - - - - - - {/if} - {/foreach} - {else} - - + - {/if} + + + {if !empty($hook['description'])} + + + + {/if} + {if $hook['module_count']} + {foreach $hook['modules'] as $position => $module} + {if isset($module['instance'])} + + + {if !$display_key} + + + + + + {/if} + {/foreach} + {else} + + + + {/if} +
+
+ +
- - {$module@iteration}= 2} align=center class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}"> - {if $can_move} - - {l s='Up'} -
- - {l s='Down'} - - {/if} -
-
- {else} -
-
- {/if} -

- {$module['instance']->name|stripslashes} - {$module['instance']->displayName|stripslashes} -

-
-
{l s='Version:'}
-
- {if $module['instance']->version}v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if} -
-
{l s='Description:'}
-
- {$module['instance']->description} -
-
-
-
-
- {l s='Choose an action'} - - -
-
-

{l s='No module was found for this hook.'}

-
+

+ {$hook['title']} - + {$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if} + ({l s='Technical name: '}{$hook['name']}) +

+
+

+ [{$hook['description']}] +

+
+ + {$module@iteration}= 2} align=center class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}"> + {if $can_move} + + {l s='Up'} +
+ + {l s='Down'} + + {/if} +
+
+ {else} +
+
+ {/if} +

+ {$module['instance']->name|stripslashes} + {$module['instance']->displayName|stripslashes} +

+
+
{l s='Version:'}
+
+ {if $module['instance']->version}v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if} +
+
{l s='Description:'}
+
+ {$module['instance']->description} +
+
+
+
+
+ {l s='Choose an action'} + + +
+
+

{l s='No module was found for this hook.'}

+
{/foreach} diff --git a/admin-dev/themes/default/template/controllers/payment/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/payment/helpers/view/view.tpl index 73d201022..60bc64e6e 100644 --- a/admin-dev/themes/default/template/controllers/payment/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/payment/helpers/view/view.tpl @@ -32,7 +32,6 @@ {$modules_list} {/if} {if $display_restrictions} - {l s='Payment module restrictions'} {foreach $lists as $list} {include file='controllers/payment/restrictions.tpl'} {/foreach} diff --git a/admin-dev/themes/default/template/controllers/payment/restrictions.tpl b/admin-dev/themes/default/template/controllers/payment/restrictions.tpl index 7554f29f2..e059d0c7a 100644 --- a/admin-dev/themes/default/template/controllers/payment/restrictions.tpl +++ b/admin-dev/themes/default/template/controllers/payment/restrictions.tpl @@ -24,18 +24,21 @@ *}
-
-  {$list['title']} +
+

+ + {$list['title']} +

{$list['desc']}

- + {foreach $payment_modules as $module} {if $module->active} - {foreach $list['items'] as $item} - + {foreach $payment_modules as $key_module => $module} {if $module->active} - {/foreach} {if $list['name_id'] === 'currency'} - + {foreach $payment_modules as $module} {if $module->active} - - + {foreach $payment_modules as $module} {if $module->active} -
{$list['title']}{$list['title']} + {if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'} - + {/if}  {$module->name} {if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'} @@ -46,13 +49,13 @@ {/foreach}
{$item['name']} + {assign var='type' value='null'} {if !$item['check_list'][$key_module]} {* Keep $type to null *} @@ -76,13 +79,13 @@
{l s='Customer currency'} + {if $module->currencies && $module->currencies_mode == 'radio'} $list['name_id'])} checked="checked" {/if} /> @@ -93,13 +96,13 @@ {/if} {/foreach}
{l s='Shop default currency'} + {if $module->currencies && $module->currencies_mode == 'radio'} $list['name_id'])} checked="checked" {/if} @@ -114,7 +117,7 @@ {/if}

- diff --git a/admin-dev/themes/default/template/helpers/modules_list/list.tpl b/admin-dev/themes/default/template/helpers/modules_list/list.tpl index beb531102..9bcedabd3 100644 --- a/admin-dev/themes/default/template/helpers/modules_list/list.tpl +++ b/admin-dev/themes/default/template/helpers/modules_list/list.tpl @@ -23,29 +23,33 @@ * International Registered Trademark & Property of PrestaShop SA *} -{l s='Modules list'} -

-
- {if count($modules_list)} - - {counter start=1 assign="count"} - {foreach from=$modules_list item=module} -
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",row alt"}}
- {if $count %3 == 0} - -
  • - {/if} - {counter} - {/foreach} -
  • - {else} - - - - -
    -
    {l s='No modules available in this section.'}
    -
    - {/if} +
    +

    + + {l s='Modules list'} +

    +
    +
    + {if count($modules_list)} + + {counter start=1 assign="count"} + {foreach from=$modules_list item=module} +
    {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",row alt"}}
    + {if $count %3 == 0} + {/if} + {counter} + {/foreach} +
    + {else} + + + + +
    +
    {l s='No modules available in this section.'}
    +
    + {/if} +
    -
    +
    + diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 39ce03599..0db6e6b33 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -3003,11 +3003,11 @@ class AdminControllerCore extends Controller if ($option['cond']) { if ($output_type == 'link') - $return .= ' - - '.$option['text'].' - - '; + $return .= '
  • + + '.$option['text'].' + +
  • '; elseif ($output_type == 'select') $return .= ''; } diff --git a/controllers/admin/AdminModulesPositionsController.php b/controllers/admin/AdminModulesPositionsController.php index 76275766f..e0f6b4d59 100644 --- a/controllers/admin/AdminModulesPositionsController.php +++ b/controllers/admin/AdminModulesPositionsController.php @@ -394,21 +394,26 @@ class AdminModulesPositionsControllerCore extends AdminController if (!is_array($file_list)) $file_list = ($file_list) ? array($file_list) : array(); - $content = ''; + $content = '

    '; if ($shop_id) { $shop = new Shop($shop_id); $content .= ' ('.$shop->name.')'; } - $content .= '
    '; // @todo do something better with controllers $controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_); ksort($controllers); foreach ($controllers as $k => $v) $content .= ''; - $content .= ' -

    '; + $content .= ' +

    +

    + + +

    '; return $content; } diff --git a/controllers/admin/AdminPaymentController.php b/controllers/admin/AdminPaymentController.php index 70c7bdf75..4988169ff 100644 --- a/controllers/admin/AdminPaymentController.php +++ b/controllers/admin/AdminPaymentController.php @@ -172,21 +172,21 @@ class AdminPaymentControllerCore extends AdminController 'desc' => $this->l('Please mark each checkbox for the currency, or currencies, in which you want the payment module(s) to be available.'), 'name_id' => 'currency', 'identifier' => 'id_currency', - 'icon' => 'dollar', + 'icon' => 'icon-money', ), array('items' => Group::getGroups($this->context->language->id), 'title' => $this->l('Group restrictions'), 'desc' => $this->l('Please mark each checkbox for the currency, or currencies, in which you want the payment module(s) to be available.'), 'name_id' => 'group', 'identifier' => 'id_group', - 'icon' => 'group', + 'icon' => 'icon-group', ), array('items' =>Country::getCountries($this->context->language->id), 'title' => $this->l('Country restrictions'), 'desc' => $this->l('Please mark each checkbox for the country, or countries, in which you want the payment module(s) to be available.'), 'name_id' => 'country', 'identifier' => 'id_country', - 'icon' => 'world', + 'icon' => 'icon-globe', ) ); diff --git a/controllers/admin/AdminStatesController.php b/controllers/admin/AdminStatesController.php index 8f7abfef9..5e1f95b1f 100644 --- a/controllers/admin/AdminStatesController.php +++ b/controllers/admin/AdminStatesController.php @@ -124,7 +124,7 @@ class AdminStatesControllerCore extends AdminController 'id' => 'id_country', 'name' => 'name', ), - 'desc' => $this->l('Country where the state, region or city is located') + 'hint' => $this->l('Country where the state, region or city is located') ), array( 'type' => 'select',