// update localization tab

This commit is contained in:
Sarah Lorenzini
2013-07-30 12:25:20 +02:00
parent 8bafaceb40
commit 816153687c
15 changed files with 342 additions and 388 deletions
@@ -23,10 +23,7 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="width4">
{$localization_form}
</div>
<br />
<div class="width4">
{$localization_options}
</div>
{$localization_form}
{$localization_options}
@@ -26,9 +26,9 @@
{block name="label"}
{if $input.name == 'zipcode' && isset($input.label)}
<label id="zipcode-label">{$input.label}</label>
<label id="zipcode-label" class="control-label col-lg-3 ">{$input.label}</label>
{elseif $input.name == 'states[]'}
<label id="states-label">{$input.label}</label>
<label id="states-label" class="control-label col-lg-3 ">{$input.label}</label>
{else}
{$smarty.block.parent}
{/if}
@@ -22,4 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a onclick="loadTaxRule('{$id}'); return false;" href="#"><img src="../img/admin/edit.gif" alt="{$action}" title="{$action}" /></a>
<a onclick="loadTaxRule('{$id}'); return false;" href="#" class="btn btn-default">
<i class="icon-pencil"></i>
{$action}
</a>
@@ -22,110 +22,109 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<tbody>
{foreach $list AS $index => $tr}
<tr
{if $position_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position['position']}"{/if}
{if $index is odd}class="alt_row"{/if}
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
>
<td class="center">
{if $bulk_actions}
{assign var=bulkActionPossible value=true}
{foreach $list_skip_actions as $key => $value}
{if in_array($tr.$identifier, $value) == true}
{assign var=bulkActionPossible value=false}
<tbody>
{foreach $list AS $index => $tr}
<tr
{if $position_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position['position']}"{/if}
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
>
<td>
{if $bulk_actions}
{assign var=bulkActionPossible value=true}
{foreach $list_skip_actions as $key => $value}
{if in_array($tr.$identifier, $value) == true}
{assign var=bulkActionPossible value=false}
{/if}
{/foreach}
{if $bulkActionPossible == true}
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
{/if}
{/if}
{/foreach}
{if $bulkActionPossible == true}
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
{/if}
{/if}
</td>
{foreach $fields_display AS $key => $params}
<td
{if isset($params.position)}
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
{/if}
class="{if !$no_link}pointer{/if}
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
{if isset($params.align)} {$params.align}{/if}"
</td>
{foreach $fields_display AS $key => $params}
<td
{if isset($params.position)}
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
{/if}
class="{if !$no_link}pointer{/if}
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
{if isset($params.align)} {$params.align}{/if}"
{if (!isset($params.position) && !$no_link)}
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">{if isset($params.prefix)}{$params.prefix}{/if}
{else}
>
{/if}
{if isset($params.active)}
{$tr.$key}
{elseif isset($params.activeVisu)}
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
{elseif isset($params.position)}
{if $order_by == 'position' && $order_way != 'DESC'}
<a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
</a>
<a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
</a>
{else}
{$tr.$key.position + 1}
{/if}
{elseif isset($params.image)}
{$tr.$key}
{elseif (isset($params.icon))}
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$tr[$key]}" />
{elseif isset($params.price)}
{$tr.$key}
{elseif isset($params.float)}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'date'}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'datetime'}
{$tr.$key}
{elseif isset($params.callback)}
{$tr.$key}
{elseif isset($tr.$key)}
{if $key == 'behavior'}
{if $tr.$key == 0}
{l s='This tax only'}
{elseif $tr.$key == 1}
{l s='Compute with others'}
{elseif $tr.$key == 2}
{l s='One after another'}
{/if}
{elseif $key == 'rate'}
{$tr.$key|string_format:"%.2f"}%
{elseif $key == 'zipcode'}
{if $tr.$key == '0 - 0'}
--
{if (!isset($params.position) && !$no_link)}
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">{if isset($params.prefix)}{$params.prefix}{/if}
{else}
{$tr.$key|escape:'htmlall':'UTF-8'}
>
{/if}
{else}
{$tr.$key|escape:'htmlall':'UTF-8'}
{/if}
{else}
--
{/if}
{if isset($params.suffix)}{$params.suffix}{/if}
</td>
{/foreach}
{if isset($params.active)}
{$tr.$key}
{elseif isset($params.activeVisu)}
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
{elseif isset($params.position)}
{if $order_by == 'position' && $order_way != 'DESC'}
<a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
</a>
{if $shop_link_type}
<td class="center" {if $name != $tr.shop_name}title="{$tr.shop_name}"{/if}>{if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if}</td>
{/if}
{if $has_actions}
<td class="center" style="white-space: nowrap;">
{foreach $actions AS $action}
{if isset($tr.$action)}
{$tr.$action}
{/if}
{/foreach}
</td>
{/if}
</tr>
{/foreach}
</tbody>
<a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
</a>
{else}
{$tr.$key.position + 1}
{/if}
{elseif isset($params.image)}
{$tr.$key}
{elseif (isset($params.icon))}
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$tr[$key]}" />
{elseif isset($params.price)}
{$tr.$key}
{elseif isset($params.float)}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'date'}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'datetime'}
{$tr.$key}
{elseif isset($params.callback)}
{$tr.$key}
{elseif isset($tr.$key)}
{if $key == 'behavior'}
{if $tr.$key == 0}
{l s='This tax only'}
{elseif $tr.$key == 1}
{l s='Compute with others'}
{elseif $tr.$key == 2}
{l s='One after another'}
{/if}
{elseif $key == 'rate'}
{$tr.$key|string_format:"%.2f"}%
{elseif $key == 'zipcode'}
{if $tr.$key == '0 - 0'}
--
{else}
{$tr.$key|escape:'htmlall':'UTF-8'}
{/if}
{else}
{$tr.$key|escape:'htmlall':'UTF-8'}
{/if}
{else}
--
{/if}
{if isset($params.suffix)}{$params.suffix}{/if}
</td>
{/foreach}
{if $shop_link_type}
<td {if $name != $tr.shop_name}title="{$tr.shop_name}"{/if}>{if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if}</td>
{/if}
{if $has_actions}
<td>
{foreach $actions AS $action}
{if isset($tr.$action)}
{$tr.$action}
{/if}
{/foreach}
</td>
{/if}
</tr>
{/foreach}
</tbody>
@@ -33,81 +33,45 @@
{/if}
<form method="post" action="{$currentIndex}&{$identifier}&token={$token}&id_tax_rules_group={$id_tax_rules_group}&updatetax_rules_group#{$table}" class="form">
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
<table class="table_grid">
<tr>
<td style="vertical-align: bottom;">
<span style="float: left;">
{if $page > 1}
<input type="image" src="../img/admin/list-prev2.gif" onclick="getE('submitFilter{$table}').value=1"/>&nbsp;
<input type="image" src="../img/admin/list-prev.gif" onclick="getE('submitFilter{$table}').value={$page - 1}"/>
{/if}
{l s='Page'} <b>{$page}</b> / {$total_pages}
{if $page < $total_pages}
<input type="image" src="../img/admin/list-next.gif" onclick="getE('submitFilter{$table}').value={$page + 1};"/>&nbsp;
<input type="image" src="../img/admin/list-next2.gif" onclick="getE('submitFilter{$table}').value={$total_pages}"/>
{/if}
| {l s='Display'}
<select name="pagination" onchange="submit()">
{* Choose number of results per page *}
{foreach $pagination AS $value}
<option value="{$value|intval}"{if $selected_pagination == $value} selected="selected" {elseif $selected_pagination == NULL && $value == $pagination[1]} selected="selected2"{/if}>{$value|intval}</option>
{/foreach}
</select>
/ {$list_total} {l s='result(s)'}
</span>
<span style="float: right;">
<input type="submit" name="submitReset{$table}" value="{l s='Reset'}" class="button" />
</span>
<span class="clear"></span>
</td>
</tr>
<tr>
<td>
<table
{if $table_id} id={$table_id}{/if}
class="table {if $table_dnd}tableDnD{/if} {$table}"
cellpadding="0" cellspacing="0"
style="width: 100%; margin-bottom:10px;"
>
<col width="10px" />
<fieldset class="col-lg-12">
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
<table {if $table_id} id={$table_id}{/if} class="table {if $table_dnd}tableDnD{/if} {$table}">
<col width="10" />
{foreach $fields_display AS $key => $params}
<col {if isset($params.width) && $params.width != 'auto'}width="{$params.width}px"{/if}/>
{/foreach}
{if $shop_link_type}
<col width="80" />
{/if}
{if $has_actions}
<col width="52" />
{/if}
<thead>
<tr class="nodrag nodrop">
<th>
{if $has_bulk_actions}
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
{/if}
</th>
{foreach $fields_display AS $key => $params}
<col {if isset($params.width) && $params.width != 'auto'}width="{$params.width}px"{/if}/>
<th {if isset($params.align)} class="{$params.align}"{/if}>
{if isset($params.hint)}<span class="alert alert-info" name="help_box">{$params.hint}<span class="hint-pointer">&nbsp;</span></span>{/if}
<span class="title_box">
{$params.title}
</span>
</th>
{/foreach}
{if $shop_link_type}
<col width="80px" />
<th>
{if $shop_link_type == 'shop'}
{l s='Shop'}
{else}
{l s='Group shop'}
{/if}
</th>
{/if}
{if $has_actions}
<col width="52px" />
<th>{l s='Actions'}<br />&nbsp;</th>
{/if}
<thead>
<tr class="nodrag nodrop">
<th class="center">
{if $has_bulk_actions}
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
{/if}
</th>
{foreach $fields_display AS $key => $params}
<th {if isset($params.align)} class="{$params.align}"{/if}>
{if isset($params.hint)}<span class="alert alert-info" name="help_box">{$params.hint}<span class="hint-pointer">&nbsp;</span></span>{/if}
<span class="title_box">
{$params.title}
</span>
<br />&nbsp;
</th>
{/foreach}
{if $shop_link_type}
<th>
{if $shop_link_type == 'shop'}
{l s='Shop'}
{else}
{l s='Group shop'}
{/if}
<br />&nbsp;
</th>
{/if}
{if $has_actions}
<th class="center">{l s='Actions'}<br />&nbsp;</th>
{/if}
</tr>
</thead>
</tr>
</thead>
@@ -60,39 +60,78 @@
});
</script>
<fieldset>
<legend><img src="../img/admin/translation.gif" />{l s='Modify translations'}</legend>
{l s='Here you can modify translations for every line of code inside PrestaShop.'}<br />
{l s='First, select a section (such as Back Office or Installed modules), and then click the flag representing the language you want to edit.'}<br /><br />
<form method="get" action="index.php" id="typeTranslationForm">
<form method="get" action="index.php" id="typeTranslationForm" class="form-horizontal">
<fieldset>
<h3>
<i class="icon-file-text"></i>
{l s='Modify translations'}
</h3>
<p class="alert alert-block">
{l s='Here you can modify translations for every line of code inside PrestaShop.'}<br />
{l s='First, select a section (such as Back Office or Installed modules), and then click the flag representing the language you want to edit.'}
</p>
<input type="hidden" name="controller" value="AdminTranslations" />
<input type="hidden" name="lang" id="translation_lang" value="0" />
<select name="type" style="float:left;margin-right:10px">
{foreach $translations_type as $type => $array}
<option value="{$type}">{$array.name}</option>
<div class="row">
<label class="control-label col-lg-3">{l s='Type of translation:'}</label>
<div class="col-lg-6">
<select name="type">
{foreach $translations_type as $type => $array}
<option value="{$type}">{$array.name}</option>
{/foreach}
</select>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{l s='Choose your theme:'}</label>
<div class="col-lg-6">
<select name="theme">
<option value="">{l s='Core (no theme selected)'}</option>
{foreach $themes as $theme}
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
{/foreach}
</select>
</div>
</div>
{* TO DO - ajouter la langue*}
{*<div class="row">
{foreach from=$languages item=language}
<div class="input-group col-lg-12 translatable-field lang-{$language.id_lang}">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt="">
{$language.iso_code}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach $languages as $language}
<li>
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}');">
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
{$language['iso_code']}
</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/foreach}
</select>
<select name="theme" style="float:left;margin-right:10px">
<option value="">{l s='Core (no theme selected)'}</option>
{foreach $themes as $theme}
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
</div>*}
{foreach $languages as $language}
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}');">
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
</a>
{/foreach}
</select>
{foreach $languages as $language}
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}');">
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
</a>
{/foreach}
<input type="hidden" name="token" value="{$token}" />
</form>
</fieldset>
<br /><h2>{l s='Translation exchange'}</h2>
<input type="hidden" name="token" value="{$token}" />
</div>
</fieldset>
</form>
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
<fieldset>
<legend>
<img src="../img/admin/import.gif" />{l s='Add / Update a language'}
</legend>
<h3>
<i class="icon-download"></i>
{l s='Add / Update a language'}
</h3>
<div id="submitAddLangContent" style="float:left;">
<p>{l s='You can add or update a language directly from the PrestaShop website here:'}</p>
<div class="alert alert-block">