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
+
+
+