diff --git a/core/core.php b/core/core.php index feba0ecb..e1a4cece 100644 --- a/core/core.php +++ b/core/core.php @@ -35,7 +35,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '10.0.12.dev'; + const ZWII_VERSION = '10.0.13.dev'; public static $actions = []; public static $coreModuleIds = [ @@ -2227,7 +2227,6 @@ class layout extends common { // Fermeture du bloc copyright $items .= ''; - $items .= $this->geti18n(); echo $items; } diff --git a/core/module/config/config.php b/core/module/config/config.php index f1245ef7..cee670eb 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -290,15 +290,7 @@ class config extends common { 'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true), 'legalPageId' => $this->getInput('configLegalPageId') ] - ]); - $this->setData([ - 'page', - [ - 'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true), - 'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true), - 'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true) - ] - ]); + ]); if(self::$inputNotices === []) { // Ecrire les fichiers de script file_put_contents(self::DATA_DIR . 'head.inc.html',$this->getInput('configScriptHead',null)); diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index ee607dca..7313fabc 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -12,33 +12,6 @@ -
-
-
-

Informations générales

-
-
- getData(['page']), 'title', 'SORT_ASC'), [ - 'label' => 'Page d\'accueil', - 'selected' => $this->getData(['page', 'homePageId']) - ]); ?> -
-
- 'Titre du site', - 'value' => $this->getData(['page', 'title']), - 'help' => 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.' - ]); ?> -
-
- 'Description du site', - 'value' => $this->getData(['page', 'metaDescription']), - 'help' => 'Elle apparaît dans les partages sur les réseaux sociaux.' - ]); ?> -
-
-
diff --git a/core/module/i18n/i18n.php b/core/module/i18n/i18n.php index 62852179..8d7e1f3f 100644 --- a/core/module/i18n/i18n.php +++ b/core/module/i18n/i18n.php @@ -16,14 +16,37 @@ class i18n extends common { public static $actions = [ 'index' => self::GROUP_MODERATOR, + 'config' => self::GROUP_MODERATOR, 'lang' => self::GROUP_VISITOR ]; - /** - * Configuration + /** + * Index : paramétrage des méta de la langue */ - public function index() { + public function index() { + if($this->isPost()) { + $this->setData([ + 'page', + [ + 'homePageId' => $this->getInput('pagei18nHomePageId', helper::FILTER_ID, true), + 'metaDescription' => $this->getInput('pagei18nMetaDescription', helper::FILTER_STRING_LONG, true), + 'title' => $this->getInput('pagei18nTitle', helper::FILTER_STRING_SHORT, true) + ] + ]); + } else { + // Valeurs en sortie sans post + $this->addOutput([ + 'title' => 'Internationalisation', + 'view' => 'index' + ]); + } + } + + /** + * Config : gestion des langues + */ + public function config() { if($this->isPost()) { // Et faire un backup @@ -90,7 +113,7 @@ class i18n extends common { // Valeurs en sortie sans post $this->addOutput([ 'title' => 'Internationalisation', - 'view' => 'index' + 'view' => 'config' ]); } diff --git a/core/module/i18n/view/config/config.php b/core/module/i18n/view/config/config.php new file mode 100644 index 00000000..f70b33b8 --- /dev/null +++ b/core/module/i18n/view/config/config.php @@ -0,0 +1,53 @@ + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . $this->getUrl(0) , + 'value' => 'Retour' + ]); ?> +
+
+ +
+
+
+
+
+

Ajouter une localisation

+
+
+ i18nInstalled(true), [ + 'label' => 'Copier à partir ', + 'help' => 'Pour démarrer sans copie des pages te des modules d\'une langue existante, ne rien sélectionner', + 'selected' => -1 + ]); ?> +
+
+ +
+
+ 'Sélectionner'); + $available = array_merge ($available, self::$i18nList); + echo template::select('i18nLanguageAdd', $available, [ + 'label' => 'vers' + ]); ?> +
+
+
+
+
+
+

Supprimer une localisation

+
+ i18nInstalled(true, true), [ + 'label' => 'Localisations installées', + 'help' => 'La suppression d\'une langue entraîne l\'effacement des pages et des modules', + 'selected' => -1 + ]); ?> +
+
+
+
+ \ No newline at end of file diff --git a/core/module/i18n/view/index/index.php b/core/module/i18n/view/index/index.php index 1607e022..a65451d1 100644 --- a/core/module/i18n/view/index/index.php +++ b/core/module/i18n/view/index/index.php @@ -1,55 +1,49 @@ - -
-
- 'buttonGrey', - 'href' => helper::baseUrl(false), - 'ico' => 'home', - 'value' => 'Accueil' - ]); ?> -
-
- -
-
- -
-
-
-

Ajouter une localisation

-
-
- i18nInstalled(true), [ - 'label' => 'Copier à partir ', - 'help' => 'Pour démarrer sans copie des pages te des modules d\'une langue existante, ne rien sélectionner', - 'selected' => -1 - ]); ?> -
-
- -
-
- 'Sélectionner'); - $available = array_merge ($available, self::$i18nList); - echo template::select('i18nLanguageAdd', $available, [ - 'label' => 'vers' + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl(false), + 'ico' => 'home', + 'value' => 'Accueil' + ]); ?> +
+
+ helper::baseUrl() . $this->getUrl(0) . '/config', + 'value' => 'Langues' + ]); ?> +
+
+ +
+
+
+
+
+

Informations langue : + geti18n();?>

+
+
+ getData(['page']), 'title', 'SORT_ASC'), [ + 'label' => 'Page d\'accueil', + 'selected' => $this->getData(['page', 'homePageId']) ]); ?> +
+
+ 'Titre du site', + 'value' => $this->getData(['page', 'title']), + 'help' => 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.' + ]); ?> +
-
-
-
-
-
-

Supprimer une localisation

-
- i18nInstalled(true, true), [ - 'label' => 'Localisations installées', - 'help' => 'La suppression d\'une langue entraîne l\'effacement des pages et des modules', - 'selected' => -1 + 'Description du site', + 'value' => $this->getData(['page', 'metaDescription']), + 'help' => 'Elle apparaît dans les partages sur les réseaux sociaux.' ]); ?>
-
-
-
- \ No newline at end of file +
+
+