Improved profiles management

This commit is contained in:
Franck Allimant
2014-04-15 18:25:01 +02:00
parent 0f87055f11
commit f0e8df81e1
3 changed files with 42 additions and 15 deletions

View File

@@ -45,8 +45,9 @@ return array(
'Additional categories' => 'Rubriques supplémentaires',
'Address' => 'Adresse',
'Administration logs' => 'Journal des logs',
'Administration profiles' => 'Gestion des profils',
'Administration profiles' => 'Profils d\'administration',
'Administrators' => 'Administrateurs',
'Afficher ce profil' => 'View this profile',
'All orders' => 'Toutes les commandes',
'Alpha code 2' => 'Code alpha 2',
'Alpha code 3' => 'Code alpha 3',
@@ -74,6 +75,7 @@ return array(
'Browse files' => 'Parcourir les fichiers',
'Browse this category' => 'Parcourir cette catégorie',
'Browse this folder' => 'Parcourir ce dossier',
'Cache' => 'Cache',
'Can\'t be cumulative' => 'Ne peut pas se cumuler',
'Can\'t load documents, please refresh this page.' => 'Impossible de charger les documents. Rechargez la page',
'Can\'t load images, please refresh this page.' => 'Impossible de charger l\'image. Rechargez la page',
@@ -397,6 +399,7 @@ return array(
'Editing mailing template "%name"' => 'En cours de modification du template de mailing "%name"',
'Editing module' => 'Module en cours de modification',
'Editing profile' => 'Modification du profil',
'Editing profile \'%name\'' => 'Edition du profil \'%name\' ',
'Editing shipping configuration "%name"' => 'En cours de modification de la configuration de livraison "%name"',
'Editing shipping zone "%name"' => 'En cours de modification de la zone de livraison "%name"',
'Editing tax' => 'En cours de modification de la taxe',
@@ -428,6 +431,8 @@ return array(
'Enter here the template name in the default language (%title)' => 'Renseignez le nom du template dans la langue par défaut (%title)',
'Enter here the value in the current edit language (%language_name)' => 'Rensignez la valeur dans la langue d\'édition actuelle (%language_name)',
'Enter here the value in the current edit language (%title)' => 'Entrez la valeur dans la langue d\'édition courante (%title)',
'Enter here the value in the default language (%title)' => 'Indiquez la valeur pour la langue par défaut (%title) ',
'Enter information in the default language (%title)' => 'Entrez les informations dans la langue par défaut (%title) ',
'Enter new accessory position' => 'Renseigner la nouvelle position pour cet accessoire',
'Enter new attribute position' => 'Modifier la position de la déclinaison',
'Enter new category position' => 'Classement de la catégorie',
@@ -462,6 +467,7 @@ return array(
'First orders' => 'Premières commandes',
'FirstName' => 'Prénom',
'Firstname' => 'Prénom',
'Flush the cache' => 'Vider le cache',
'Folder created on %date_create. Last modification: %date_change' => 'Dossier créé le %date_create. Dernière modification le %date_change',
'Folder title' => 'Titre du dossier',
'Folders' => 'Dossiers',
@@ -524,6 +530,7 @@ return array(
'Leave empty to keep current password' => 'Laisser ce champ vide pour ne pas modifier le mot de passe',
'Lire la suite' => 'Lire la suite',
'Loading Thelia lastest news...' => 'Chargement des dernières information Thelia...',
'Loading...' => 'Chargement...',
'Locale' => 'Paramètre régional',
'Log lines format' => 'Format d\'une ligne de log',
'Log lines header format. You may use the following variables: ' => 'Format d\'une ligne de log. Vous pouvez utiliser ces variables : ',
@@ -606,9 +613,9 @@ return array(
'Please select a coupon type' => 'Merci d\'entrer le type de code',
'Please select another condition' => 'Merci de sélectionner une autre condition',
'Please select items to translate' => 'Veuillez sélectionner un élément',
'Please select the B.O. template to translate' => 'Sélectionnez le template back-office que vous souhaitez traduire',
'Please select the B.O. template to translate' => 'Sélectionnez le template back-office à traduire',
'Please select the E-mail template to translate' => 'Sélectionnez le template de mail à traduire',
'Please select the F.O. template to translate' => 'Sélectionnez le template front-office que vous souhaitez traduire',
'Please select the F.O. template to translate' => 'Sélectionnez le template front-office à traduire',
'Please select the PDF template to translate' => 'Sélectionnez le template PDF à traduire',
'Please select the module to translate' => 'Sélectionnez le module à traduire',
'Please wait, loading' => 'Chargement, veuillez patienter',
@@ -697,6 +704,7 @@ return array(
'Save this condition' => 'Enregistrer cette condition',
'Save your modifications' => 'Enregistrer les modifications',
'Search' => 'Recherche',
'Search for \'%term\'' => 'Recherche de \'%term\'',
'Select a category and click (+) to add it to the additional category list' => 'Sélectionner une rubrique et cliquez sur (+) pour la rajouter dans la liste des rubrique associées',
'Select a category to get its products' => 'Sélectionner une rubrique pour avoir les produits qu\'elle contient',
'Select a category...' => 'Sélectionner une rubrique...',
@@ -720,10 +728,10 @@ return array(
'Select here the tax applicable to this product' => 'Sélectionnez ici la taxe applicable sur ce produit',
'Select the E-mail template you want to translate' => 'Sélectionnez le template de mail à traduire',
'Select the PDF template you want to translate' => 'Sélectionnez le template PDF à traduire',
'Select the back-office template you want to translate' => 'Sélectionnez le template back-office que vous souhaitez traduire',
'Select the front-office template you want to translate' => 'Sélectionnez le template front-office que vous souhaitez traduire',
'Select the back-office template you want to translate' => 'Sélectionnez le template back-office à traduire',
'Select the front-office template you want to translate' => 'Sélectionnez le template front-office à traduire',
'Select the module you want to translate' => 'Sélectionnez le module à traduire',
'Select which items you want to translate' => 'Sélectionnez l\'élément que vous souhaitez traduire',
'Select which items you want to translate' => 'Sélectionnez l\'élément à traduire',
'Send a mail to this customer' => 'Contacter ce client par mail',
'Send files' => 'Envoyer des fichiers',
'Sequential number of log line' => 'Sequential number of log line',

View File

@@ -8,7 +8,6 @@
{block name="main-content"}
{assign oder_tab {$smarty.get.tab|default:$smarty.post.tab|default:'data'}}
{assign asked_country {$smarty.get.country|default:{country ask="default" attr="id"}}}
<div class="profiles edit-profiles">
@@ -26,8 +25,8 @@
<div class="row">
<div class="col-md-12 general-block-decorator clearfix">
<div class="lead clearfix">
<span class='label label-default pull-left'>{$CODE}</span>
<div class="row">
<div class="col-md-12 title">{intl l="Editing profile '%name'" name=$TITLE}</div>
</div>
<ul class="nav nav-tabs clearfix">

View File

@@ -45,14 +45,27 @@
{loop type="profile" name="profiles" backend_context="1"}
{$can_change = false}
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.profile" access="UPDATE"}
{$can_change = true}
{/loop}
<tr>
<td>{$TITLE}</td>
<td>
{if $can_change}
<a title="{intl l='Change this profile'}" href="{url path="/admin/configuration/profiles/update/$ID"}">
{$TITLE}
</a>
{else}
{$TITLE}
{/if}
</td>
<td>{$DESCRIPTION}</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.profile" access="UPDATE"}
{if $can_change}
<a class="btn btn-default btn-xs" title="{intl l='Change this profile'}" href="{url path="/admin/configuration/profiles/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{/if}
{assign linkedAdminCount {count name="linked-admin" type="admin" profile=$ID}}
@@ -93,9 +106,16 @@
{form_hidden_fields form=$form}
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}
{loop type="lang" name="current-edit-lang" default_only="1"}
<div class="text-center well well-sm">
<img src="{image file="assets/img/flags/$CODE.png"}" alt="{intl l=$TITLE}" />
{intl l="Enter information in the default language (%title)" title=$TITLE}
</div>
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{/loop}
{form_field form=$form field='code'}
<div class="form-group {if $error}has-error{/if}">