Merge branch 'master' into frontend
This commit is contained in:
@@ -30,94 +30,102 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 clearfix">
|
||||
<div>
|
||||
<strong>{intl l='Period'} :</strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>
|
||||
<strong>{intl l='Period'} :</strong>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-3 clearfix">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{intl l='From'}</span>
|
||||
<input class="form-control" type="text" id="from_date" readonly="readonly">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default js-show-datepicker" data-datepicker-selector="#from_date" type="button">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 clearfix input-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{intl l='To'}</span>
|
||||
<input class="form-control" type="text" id="to_date" readonly="readonly">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default js-show-datepicker" data-datepicker-selector="#to_date" type="button">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 clearfix">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{intl l='From'}</span>
|
||||
<input class="form-control" type="text" id="from_date" readonly="readonly">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default js-show-datepicker" data-datepicker-selector="#from_date" type="button">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 clearfix input-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{intl l='To'}</span>
|
||||
<input class="form-control" type="text" id="to_date" readonly="readonly">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default js-show-datepicker" data-datepicker-selector="#to_date" type="button">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 clearfix">
|
||||
<div>
|
||||
<strong>{intl l='Administrators'} :</strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>
|
||||
<strong>{intl l='Administrators'} :</strong>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{loop type="admin" name="admin-list" backend_context="1"}
|
||||
{if ($LOOP_COUNT-1)%4 == 0 AND $LOOP_COUNT != 0 AND $LOOP_COUNT != $LOOP_TOTAL}
|
||||
</div>
|
||||
<div class="row">
|
||||
{/if}
|
||||
<div class="col-md-3">
|
||||
<input id="admin_{$ID}" data-id="{$LOGIN}" class="js-admin" type="checkbox" checked>
|
||||
<label for="admin_{$ID}" style="font-weight: normal;">{$LOGIN} ({$FIRSTNAME|upper} {$LASTNAME|ucwords})</label>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="row">
|
||||
{loop type="admin" name="admin-list" backend_context="1"}
|
||||
{if ($LOOP_COUNT-1)%4 == 0 AND $LOOP_COUNT != 0 AND $LOOP_COUNT != $LOOP_TOTAL}
|
||||
</div>
|
||||
<div class="row">
|
||||
{/if}
|
||||
<div class="col-md-3">
|
||||
<input id="admin_{$ID}" data-id="{$LOGIN}" class="js-admin" type="checkbox" checked>
|
||||
<label for="admin_{$ID}" style="font-weight: normal;">{$LOGIN} ({$FIRSTNAME|upper} {$LASTNAME|ucwords})</label>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>
|
||||
<strong>{intl l='Resources'} :</strong>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{loop type="resource" name="resources-list" backend_context="1"}
|
||||
{if ($LOOP_COUNT-1)%4 == 0 AND $LOOP_COUNT != 0 AND $LOOP_COUNT != $LOOP_TOTAL}
|
||||
</div>
|
||||
<div class="row">
|
||||
{/if}
|
||||
<div class="col-md-3">
|
||||
<input id="resource_{$ID}" data-id="{$CODE}" class="js-resource" type="checkbox" checked>
|
||||
<label for="resource_{$ID}" style="font-weight: normal;">{$TITLE}</label>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 clearfix">
|
||||
<div>
|
||||
<strong>{intl l='Resources'} :</strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>
|
||||
<strong>{intl l='Modules'} :</strong>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{loop type="resource" name="resources-list" backend_context="1"}
|
||||
{if ($LOOP_COUNT-1)%4 == 0 AND $LOOP_COUNT != 0 AND $LOOP_COUNT != $LOOP_TOTAL}
|
||||
</div>
|
||||
<div class="row">
|
||||
{/if}
|
||||
<div class="col-md-3">
|
||||
<input id="resource_{$ID}" data-id="{$CODE}" class="js-resource" type="checkbox" checked>
|
||||
<label for="resource_{$ID}" style="font-weight: normal;">{$TITLE}</label>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 clearfix">
|
||||
<div>
|
||||
<strong>{intl l='Modules'} :</strong>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{loop type="module" name="modules-list" backend_context="1"}
|
||||
{if ($LOOP_COUNT-1)%4 == 0 AND $LOOP_COUNT != 0 AND $LOOP_COUNT != $LOOP_TOTAL}
|
||||
</div>
|
||||
<div class="row">
|
||||
{/if}
|
||||
<div class="col-md-3">
|
||||
<input id="module_{$ID}" data-id="{$CODE}" class="js-module" type="checkbox" checked>
|
||||
<label for="module_{$ID}" style="font-weight: normal;">{$TITLE}</label>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="row">
|
||||
{loop type="module" name="modules-list" backend_context="1"}
|
||||
{if ($LOOP_COUNT-1)%4 == 0 AND $LOOP_COUNT != 0 AND $LOOP_COUNT != $LOOP_TOTAL}
|
||||
</div>
|
||||
<div class="row">
|
||||
{/if}
|
||||
<div class="col-md-3">
|
||||
<input id="module_{$ID}" data-id="{$CODE}" class="js-module" type="checkbox" checked>
|
||||
<label for="module_{$ID}" style="font-weight: normal;">{$TITLE}</label>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row inner-toolbar">
|
||||
@@ -129,7 +137,6 @@
|
||||
<div id="loading-block" class="col-md-12 loading-block"></div>
|
||||
|
||||
<div class="col-md-12 clearfix" id="logger-display"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -151,6 +151,13 @@
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc5.1" role="ADMIN" resource="admin.configuration.translations" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/translations'}">{intl l='Translations'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/translations'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.mailing-system" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/mailingSystem'}">{intl l='Mailing system'}</a></td>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Edit customer $FIRSTNAME $LASTNAME"}
|
||||
{intl l="Edit customer %firstname %lastname" firstname=$FIRSTNAME lastname=$LASTNAME}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
@@ -143,7 +143,7 @@
|
||||
</a>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
|
||||
@@ -16,7 +16,7 @@ Parameters:
|
||||
<ul class="nav nav-pills">
|
||||
{loop name="lang_list" type="lang"}
|
||||
<li {if $ID == $edit_language_id}class="active"{/if}>
|
||||
<a href="{url path={$page_url|default:$current_url} edit_language_id=$ID}" title="{intl l='Edit information in %lng' lng=$TITLE}">
|
||||
<a class="language-change-button" data-language-id="{$ID}" href="{url path={$page_url|default:$current_url} edit_language_id=$ID}" title="{intl l='Edit information in %lng' lng=$TITLE}">
|
||||
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
258
templates/admin/default/translations.html
Normal file
258
templates/admin/default/translations.html
Normal file
@@ -0,0 +1,258 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Translations'}{/block}
|
||||
|
||||
{block name="check-resource"}admin.configuration.variable{/block}
|
||||
{block name="check-access"}update{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="variables translations">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/translations'}">{intl l="Translations"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Translation"}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
<form method="POST" id="translation_form" action="{url path='/admin/configuration/translations/update'}">
|
||||
<fieldset>
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
close_url = {url path='/admin/configuration'}
|
||||
}
|
||||
|
||||
<input type="hidden" name="edit_language_id" value="{$edit_language_id}" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="item_to_translate">{intl l='Select which items you want to translate'}</label>
|
||||
|
||||
<select id="item_to_translate" required="required" name="item_to_translate" class="submit-on-change form-control">
|
||||
<option value="">{intl l='Please select items to translate'}</option>
|
||||
<option value="fo" {if $item_to_translate=='fo'}selected="selected"{/if}>{intl l='Front-office templates'}</option>
|
||||
<option value="pf" {if $item_to_translate=='pf'}selected="selected"{/if}>{intl l='PDF templates'}</option>
|
||||
<option value="bo" {if $item_to_translate=='bo'}selected="selected"{/if}>{intl l='Back-office templates'}</option>
|
||||
<option value="mo" {if $item_to_translate=='mo'}selected="selected"{/if}>{intl l='Modules'}</option>
|
||||
<option value="co" {if $item_to_translate=='co'}selected="selected"{/if}>{intl l='Thelia core'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $item_to_translate == 'mo'}
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="item_id">{intl l='Select the module you want to translate'}</label>
|
||||
|
||||
<select id="item_id" required="required" name="item_id" class="submit-on-change form-control">
|
||||
<option value="">{intl l='Please select the module to translate'}</option>
|
||||
{loop type="module" name="translate-module" backend_context=1}
|
||||
<option value="{$ID}" {if $item_id == $ID}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{else if $item_to_translate == 'fo'}
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="item_id">{intl l='Select the front-office template you want to translate'}</label>
|
||||
|
||||
<select id="item_id" required="required" name="item_id" class="submit-on-change form-control">
|
||||
<option value="">{intl l='Please select the F.O. template to translate'}</option>
|
||||
{loop type="template" name="translate-fo-template" template-type="front-office" backend_context=1}
|
||||
<option value="{$NAME}" {if $item_id == $NAME}selected="selected"{/if}>{$NAME}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{else if $item_to_translate == 'bo'}
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="item_id">{intl l='Select the back-office template you want to translate'}</label>
|
||||
|
||||
<select id="item_id" required="required" name="item_id" class="submit-on-change form-control">
|
||||
<option value="">{intl l='Please select the B.O. template to translate'}</option>
|
||||
{loop type="template" name="translate-fo-template" template-type="back-office" backend_context=1}
|
||||
<option value="{$NAME}" {if $item_id == $NAME}selected="selected"{/if}>{$NAME}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{else if $item_to_translate == 'pf'}
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="item_id">{intl l='Select the PDF template you want to translate'}</label>
|
||||
|
||||
<select id="item_id" required="required" name="item_id" class="submit-on-change form-control">
|
||||
<option value="">{intl l='Please select the PDF template to translate'}</option>
|
||||
{loop type="template" name="translate-pdf-template" template-type="pdf" backend_context=1}
|
||||
<option value="{$NAME}" {if $item_id == $NAME}selected="selected"{/if}>{$NAME}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label"> </label>
|
||||
<label class="checkbox control-label">
|
||||
<input type="checkbox" name="view_missing_traductions_only" value="1" {if $view_missing_traductions_only}checked="checked"{/if}> {intl l='View only missing translations'}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{* -- STRINGS TO TRANSLATE --------------------------------------------- *}
|
||||
|
||||
{$currfile = false}
|
||||
{$untranslated = 0}
|
||||
|
||||
{foreach $all_strings as $hash => $info}
|
||||
|
||||
{$not_translated = empty($info.translation)}
|
||||
|
||||
{if $view_missing_traductions_only != 1 || $not_translated }
|
||||
|
||||
{* Create a liste of files names *}
|
||||
|
||||
{if count($info.files) > 1}
|
||||
{$label = {intl l='In pages:'}}
|
||||
{capture name="banner" assign=file_names}
|
||||
<ul>
|
||||
{foreach $info.files as $file}
|
||||
<li>{$file}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/capture}
|
||||
{else}
|
||||
{$label = {intl l='In page'}}
|
||||
{$file_names = $info.files.0}
|
||||
{/if}
|
||||
|
||||
{* Display current file liste, if required *}
|
||||
|
||||
{if $file_names != $currfile}
|
||||
|
||||
{if $currfile !== false}
|
||||
{* Close current panel *}
|
||||
</tbody></table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{$currfile = $file_names}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{loop name="lang_list" type="lang" id=$edit_language_id}
|
||||
<img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
|
||||
{/loop}
|
||||
|
||||
{$label} {$file_names nofilter}
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed table-hover">
|
||||
<tbody>
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
<td class="col-md-6">
|
||||
<span id="{$hash}">{$info.chaine}</span>
|
||||
|
||||
{if $info.dollar}
|
||||
<div>
|
||||
<span class="label label-warning">{intl l='Warning'}</span>
|
||||
{intl l='Il seems that this string contains a Smarty variable ($). If \'s the case, it cannot be transleted properly.'}
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
<td class="col-md-6" >
|
||||
<div class="input-group {if $not_translated}has-error{/if}">
|
||||
<span class="input-group-addon"><a href="#" data-hash="{$hash}" class="copy-translation" title="{intl l='Copy source text in input field'}"><span class="glyphicon glyphicon-chevron-right"></span></a></span>
|
||||
<input type="text" class="translation_field form-control" name="{$hash}" value="{$info.translation}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div> {* panel *}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
var translation_changed = false;
|
||||
|
||||
$('#item_to_translate').change(function() {
|
||||
$('#item_id').val('');
|
||||
});
|
||||
|
||||
$('.submit-on-change').change(function() {
|
||||
$('#translation_form').submit();
|
||||
});
|
||||
|
||||
$('input.translation_field').change(function() { translation_changed = true; });
|
||||
|
||||
$('.copy-translation').click(function(ev) {
|
||||
var hash = $(this).data('hash');
|
||||
|
||||
$('input[name='+hash+']').val($('#'+hash).html());
|
||||
|
||||
translation_changed = true;
|
||||
|
||||
ev.preventDefault();
|
||||
})
|
||||
|
||||
$('#translation_form').submit(function(ev) {
|
||||
|
||||
if (translation_changed
|
||||
&&
|
||||
! confirm("{intl l='Some of your translations are not saved. Continue anyway ?'}") ) {
|
||||
|
||||
ev.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// Intercept language changes, to reload string when changing language
|
||||
$('.language-change-button').click(function(ev) {
|
||||
|
||||
$('input[name=edit_language_id]').val($(this).data('language-id'));
|
||||
|
||||
$('#translation_form').submit();
|
||||
|
||||
ev.preventDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -16,7 +16,7 @@
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/variables'}">{intl l="System variables"}</a></li>
|
||||
<li>{intl l='Editing variable "%name"' name="{$NAME}"}</li>
|
||||
<li>{intl l='Editing variable "%name"' name=$NAME}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Edit variable $NAME"}
|
||||
{intl l="Edit variable %name" name=$NAME}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
|
||||
4
templates/pdf/default/I18n/en_US.php
Normal file
4
templates/pdf/default/I18n/en_US.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
);
|
||||
4
templates/pdf/default/I18n/es_ES.php
Normal file
4
templates/pdf/default/I18n/es_ES.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
);
|
||||
4
templates/pdf/default/I18n/fr_FR.php
Normal file
4
templates/pdf/default/I18n/fr_FR.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
);
|
||||
4
templates/pdf/default/I18n/it_IT.php
Normal file
4
templates/pdf/default/I18n/it_IT.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
);
|
||||
Reference in New Issue
Block a user