forked from ZwiiCMS-Team/ZwiiCMS
trad auto hors connexion
This commit is contained in:
parent
972b86676e
commit
34a26ea4ab
@ -116,8 +116,7 @@ class common {
|
|||||||
'tippy',
|
'tippy',
|
||||||
'zwiico',
|
'zwiico',
|
||||||
'imagemap',
|
'imagemap',
|
||||||
'simplelightbox',
|
'simplelightbox'
|
||||||
'translation'
|
|
||||||
],
|
],
|
||||||
'view' => ''
|
'view' => ''
|
||||||
];
|
];
|
||||||
@ -2028,6 +2027,7 @@ class core extends common {
|
|||||||
'vendor' => array_merge($this->output['vendor'], $output['vendor'])
|
'vendor' => array_merge($this->output['vendor'], $output['vendor'])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($output['title'] !== null) {
|
if($output['title'] !== null) {
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => $output['title']
|
'title' => $output['title']
|
||||||
@ -2047,6 +2047,13 @@ class core extends common {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Librairie googtrans ajouté dynamiquement
|
||||||
|
if ( $this->getData(['translate','active']) === true
|
||||||
|
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) {
|
||||||
|
$this->addOutput([
|
||||||
|
'vendor' => array_merge($this->output['vendor'], ['i18n'])
|
||||||
|
]);
|
||||||
|
}
|
||||||
// Erreurs
|
// Erreurs
|
||||||
if($access === 'login') {
|
if($access === 'login') {
|
||||||
http_response_code(302);
|
http_response_code(302);
|
||||||
@ -2825,12 +2832,6 @@ class layout extends common {
|
|||||||
// Librairies
|
// Librairies
|
||||||
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
|
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
|
||||||
foreach($this->core->output['vendor'] as $vendorName) {
|
foreach($this->core->output['vendor'] as $vendorName) {
|
||||||
// Librairie googtrans
|
|
||||||
if ( $vendorName === 'translation'
|
|
||||||
AND $this->getData(['translate','active']) === false
|
|
||||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// Coeur
|
// Coeur
|
||||||
if(file_exists('core/vendor/' . $vendorName . '/inc.json')) {
|
if(file_exists('core/vendor/' . $vendorName . '/inc.json')) {
|
||||||
$vendorPath = 'core/vendor/' . $vendorName . '/';
|
$vendorPath = 'core/vendor/' . $vendorName . '/';
|
||||||
|
@ -79,6 +79,10 @@ class init extends common {
|
|||||||
'hideMenuChildren' =>false
|
'hideMenuChildren' =>false
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'translate' => [
|
||||||
|
'active' => false,
|
||||||
|
'showCredits' => false
|
||||||
|
],
|
||||||
'module' => [],
|
'module' => [],
|
||||||
'user' => [],
|
'user' => [],
|
||||||
'theme' => [
|
'theme' => [
|
||||||
|
@ -26,8 +26,8 @@ class translate extends common {
|
|||||||
// Soumission du formulaire
|
// Soumission du formulaire
|
||||||
if($this->isPost()) {
|
if($this->isPost()) {
|
||||||
$this->setData(['translate', [
|
$this->setData(['translate', [
|
||||||
'active' => $this->getInput('translateActive', helper::FILTER_URL),
|
'active' => $this->getInput('translateActive', helper::FILTER_BOOLEAN),
|
||||||
'showCredits' => $this->getInput('translateCredits', helper::FILTER_URL),
|
'showCredits' => $this->getInput('translateCredits', helper::FILTER_BOOLEAN),
|
||||||
]]);
|
]]);
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
20
core/module/translate/view/index/index.css
Normal file
20
core/module/translate/view/index/index.css
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* @author Fré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/
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/** @import url("site/data/admin.css"); */
|
||||||
|
|
||||||
|
/** NE PAS EFFACER
|
||||||
|
* admin.css
|
||||||
|
*/
|
@ -3,7 +3,7 @@
|
|||||||
<div class="col2">
|
<div class="col2">
|
||||||
<?php echo template::button('translateFormBack', [
|
<?php echo template::button('translateFormBack', [
|
||||||
'class' => 'buttonGrey',
|
'class' => 'buttonGrey',
|
||||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
|
'href' => helper::baseUrl(),
|
||||||
'ico' => 'left',
|
'ico' => 'left',
|
||||||
'value' => 'Retour'
|
'value' => 'Retour'
|
||||||
]); ?>
|
]); ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user