forked from ZwiiCMS-Team/ZwiiCMS
Merge branch 'i18n' into i18n_search
This commit is contained in:
commit
7b4bfcc484
@ -44,7 +44,7 @@ class common {
|
||||
const ACCESS_TIMER = 1800;
|
||||
|
||||
// Numéro de version
|
||||
const ZWII_VERSION = '10.4.00.011';
|
||||
const ZWII_VERSION = '10.4.00.012';
|
||||
const ZWII_UPDATE_CHANNEL = "v10";
|
||||
|
||||
public static $actions = [];
|
||||
|
@ -21,7 +21,7 @@ class translate extends common {
|
||||
];
|
||||
|
||||
public static $typeTranslate = [
|
||||
'none' => 'Masqué',
|
||||
'none' => 'Drapeau masqué',
|
||||
'script' => 'Traduction automatique',
|
||||
'site' => 'Traduction rédigée'
|
||||
];
|
||||
|
69
core/module/translate/view/index/index.js.php
Normal file
69
core/module/translate/view/index/index.js.php
Normal file
@ -0,0 +1,69 @@
|
||||
|
||||
/**
|
||||
* This file is part of Zwii.
|
||||
*
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
/*
|
||||
* Active le script Google quand une langue est traduite automatiquement
|
||||
*/
|
||||
$("form :input").change(function() {
|
||||
$(this).closest('form').data('changed', true);
|
||||
if($(this).closest('form').data('changed')) {
|
||||
if( $(this).val() === "script"
|
||||
|| $(this).val() === "script"
|
||||
|| $(this).val() === "script"
|
||||
|| $(this).val() === "script"
|
||||
|| $(this).val() === "script"
|
||||
|| $(this).val() === "script" ) {
|
||||
$("#translateScriptGoogle").prop("checked", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Désactive la traduction auto des langues lorsque le script est désélectionné
|
||||
*/
|
||||
$("#translateScriptGoogle").on("change", function() {
|
||||
if ( $("input[name=translateScriptGoogle]").is(':not(:checked)') ) {
|
||||
if ($("#translateDE :selected").val() === "script" ) {
|
||||
$("#translateDE").val("none");
|
||||
}
|
||||
if ($("#translateEN :selected").val() === "script" ) {
|
||||
$("#translateEN").val("none");
|
||||
}
|
||||
if ($("#translateES :selected").val() === "script" ) {
|
||||
$("#translateEs").val("none");
|
||||
}
|
||||
if ($("#translateIT :selected").val() === "script" ) {
|
||||
$("#translateIT").val("none");
|
||||
}
|
||||
if ($("#translateNL :selected").val() === "script" ) {
|
||||
$("#translateNL").val("none");
|
||||
}
|
||||
if ($("#translatePT :selected").val() === "script" ) {
|
||||
$("#translatePT").val("none");
|
||||
}
|
||||
$(".translateGoogleScriptOption").prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Active le script quand une option est activée
|
||||
*/
|
||||
$(".translateGoogleScriptOption").on("change", function() {
|
||||
$("#translateScriptGoogle").prop("checked", true);
|
||||
});
|
||||
|
||||
});
|
@ -14,11 +14,11 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Activation</h4>
|
||||
<div class="block" id="flagsWrapper">
|
||||
<h4>Affichage des drapeaux et sélection du mode de traduction</h4>
|
||||
<div class="row">
|
||||
<div class="col4 offset4">
|
||||
<?php echo template::select('translateFR', ['non'=>'Masqué','site'=>'Affiché'], [
|
||||
<?php echo template::select('translateFR', ['none'=>'Drapeau masqué','site'=>'Affiché'], [
|
||||
'label' => 'Français',
|
||||
'selected' => $this->getData(['config', 'translate' , 'fr'])
|
||||
]); ?>
|
||||
@ -29,18 +29,21 @@
|
||||
<div class="col8 offset2">
|
||||
<?php echo template::select('translateDE', $module::$typeTranslate, [
|
||||
'label' => 'Allemand',
|
||||
'class' => 'translateFlagSelect',
|
||||
'selected' => $this->getData(['config', 'translate' , 'de'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8 offset2">
|
||||
<?php echo template::select('translateEN', $module::$typeTranslate, [
|
||||
'label' => 'Anglais',
|
||||
'class' => 'translateFlagSelect',
|
||||
'selected' => $this->getData(['config', 'translate' , 'en'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8 offset2">
|
||||
<?php echo template::select('translateES', $module::$typeTranslate, [
|
||||
'label' => 'Espagnol',
|
||||
'class' => 'translateFlagSelect',
|
||||
'selected' => $this->getData(['config', 'translate' , 'es'])
|
||||
]); ?>
|
||||
</div>
|
||||
@ -49,18 +52,21 @@
|
||||
<div class="col8 offset2">
|
||||
<?php echo template::select('translateIT', $module::$typeTranslate, [
|
||||
'label' => 'Italien',
|
||||
'class' => 'translateFlagSelect',
|
||||
'selected' => $this->getData(['config', 'translate' , 'it'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8 offset2">
|
||||
<?php echo template::select('translateNL', $module::$typeTranslate, [
|
||||
'label' => 'Néerlandais',
|
||||
'class' => 'translateFlagSelect',
|
||||
'selected' => $this->getData(['config', 'translate' , 'nl'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8 offset2">
|
||||
<?php echo template::select('translatePT', $module::$typeTranslate, [
|
||||
'label' => 'Portugais',
|
||||
'class' => 'translateFlagSelect',
|
||||
'selected' => $this->getData(['config', 'translate' , 'pt'])
|
||||
]); ?>
|
||||
</div>
|
||||
@ -83,6 +89,7 @@
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('translateCredits', true, 'Afficher les crédits du script Google', [
|
||||
'checked' => $this->getData(['config','translate', 'showCredits']),
|
||||
'class' => 'translateGoogleScriptOption',
|
||||
'help' => 'Option recommandée pour le respect du droit d\'auteur'
|
||||
]); ?>
|
||||
</div>
|
||||
@ -91,12 +98,14 @@
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('translateAutoDetect', true, 'Détection automatique de la langue', [
|
||||
'checked' => $this->getData(['config','translate', 'autoDetect']),
|
||||
'class' => 'translateGoogleScriptOption',
|
||||
'help' => 'Détecte la langue du navigateur, dans ce mode il n\'est pas nécessaire d\'afficher les drapeaux.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('translateAdmin', true, 'Traduction en mode connecté', [
|
||||
'checked' => $this->getData(['config','translate', 'admin']),
|
||||
'class' => 'translateGoogleScriptOption',
|
||||
'help' => 'Traduit le site et l\'interface de ZwiiCMS quand un utilisateur est connecté'
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -625,7 +625,7 @@ class user extends common {
|
||||
$item['prenom'],
|
||||
self::$groups[$item['groupe']],
|
||||
$item['prenom'],
|
||||
$item['email'],
|
||||
helper::filter($item['email'] , helper::FILTER_MAIL),
|
||||
$item['notification']
|
||||
];
|
||||
// L'utilisateur n'existe pas
|
||||
|
@ -53,10 +53,10 @@
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
<?php if ($module::$users): ?>
|
||||
<?php echo template::table([1, 3, 3, 1, 1, 2, 1, 1 ], $module::$users, ['Identifiant', 'Nom', 'Prénom','Groupe', 'Pseudo', 'eMail', 'Succès']); ?>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<?php echo template::ico('check');?> Compte créé | <?php echo template::ico('comment');?> Compte créé et notifié | <?php echo template::ico('cancel');?> ou manquant : erreur, compte non importé
|
||||
<?php echo template::table([1, 3, 3, 1, 1, 2, 1], $module::$users, ['Id', 'Nom', 'Prénom','Groupe', 'Pseudo', 'eMail', '']); ?>
|
||||
<?php echo template::ico('check');?> Compte créé | <?php echo template::ico('mail');?> Compte créé et notifié | <?php echo template::ico('cancel');?> Erreur dans le fichier, compte non créé.
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
Loading…
Reference in New Issue
Block a user