From a7e287b74c67522103e252c5a2893553392d0e9e Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 20 Jan 2022 10:37:00 +0100 Subject: [PATCH] news layout -> option --- module/news/news.php | 18 +++++++++--------- module/news/view/config/config.php | 12 +++++------- .../{layout/layout.css => option/option.css} | 0 .../{layout/layout.php => option/option.php} | 16 ++++++++-------- 4 files changed, 22 insertions(+), 24 deletions(-) rename module/news/view/{layout/layout.css => option/option.css} (100%) rename module/news/view/{layout/layout.php => option/option.php} (86%) diff --git a/module/news/news.php b/module/news/news.php index 1bb0ae6a..c47c8dca 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -24,7 +24,7 @@ class news extends common { public static $actions = [ 'add' => self::GROUP_MODERATOR, 'config' => self::GROUP_MODERATOR, // Edition des news - 'layout' => self::GROUP_MODERATOR, // paramétrage des news + 'option' => self::GROUP_MODERATOR, // paramétrage des news 'delete' => self::GROUP_MODERATOR, 'edit' => self::GROUP_MODERATOR, 'index' => self::GROUP_VISITOR, @@ -244,7 +244,7 @@ class news extends common { ]); } - public function layout() { + public function option() { // Soumission du formulaire if($this->isPost()) { @@ -272,18 +272,18 @@ class news extends common { ]]); $this->setData(['module', $this->getUrl(0), 'config',[ - 'feeds' => $this->getInput('newsLayoutShowFeeds',helper::FILTER_BOOLEAN), - 'feedsLabel' => $this->getInput('newsLayoutFeedslabel',helper::FILTER_STRING_SHORT), - 'itemsperPage' => $this->getInput('newsLayoutItemsperPage', helper::FILTER_INT,true), - 'itemsperCol' => $this->getInput('newsLayoutItemsperCol', helper::FILTER_INT,true), - 'height' => $this->getInput('newsLayoutHeight', helper::FILTER_INT,true), + 'feeds' => $this->getInput('newsOptionShowFeeds',helper::FILTER_BOOLEAN), + 'feedsLabel' => $this->getInput('newsOptionFeedslabel',helper::FILTER_STRING_SHORT), + 'itemsperPage' => $this->getInput('newsOptionItemsperPage', helper::FILTER_INT,true), + 'itemsperCol' => $this->getInput('newsOptionItemsperCol', helper::FILTER_INT,true), + 'height' => $this->getInput('newsOptionHeight', helper::FILTER_INT,true), 'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']) ]]); // Valeurs en sortie $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/layout', + 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/option', 'notification' => 'Modifications enregistrées', 'state' => true ]); @@ -291,7 +291,7 @@ class news extends common { // Valeurs en sortie $this->addOutput([ 'title' => 'Mise en page', - 'view' => 'layout', + 'view' => 'option', 'vendor' => [ 'tinycolorpicker' ] diff --git a/module/news/view/config/config.php b/module/news/view/config/config.php index 781ab96b..6cf7dbbd 100644 --- a/module/news/view/config/config.php +++ b/module/news/view/config/config.php @@ -8,18 +8,16 @@ 'value' => 'Retour' ]); ?> -
+
helper::baseUrl() . $this->getUrl(0) . '/add', - 'ico' => 'plus', - 'value' => 'News' + 'value' => template::ico('plus') ]); ?>
-
+
helper::baseUrl() . $this->getUrl(0) . '/layout', - 'ico' => 'brush', - 'value' => 'Mise en page' + 'href' => helper::baseUrl() . $this->getUrl(0) . '/option', + 'value' => template::ico('brush') ]); ?>
diff --git a/module/news/view/layout/layout.css b/module/news/view/option/option.css similarity index 100% rename from module/news/view/layout/layout.css rename to module/news/view/option/option.css diff --git a/module/news/view/layout/layout.php b/module/news/view/option/option.php similarity index 86% rename from module/news/view/layout/layout.php rename to module/news/view/option/option.php index 44315e36..00a3e417 100644 --- a/module/news/view/layout/layout.php +++ b/module/news/view/option/option.php @@ -1,7 +1,7 @@ - +
- 'buttonGrey', 'href' => helper::baseUrl() . $this->getUrl(0) . '/config', 'ico' => 'left', @@ -9,7 +9,7 @@ ]); ?>
- +
@@ -18,13 +18,13 @@

Paramètres du module

- $this->getData(['module', $this->getUrl(0), 'config', 'feeds']), 'help' => 'Flux limité aux articles de la première page.' ]); ?>
- 'Etiquette RSS', 'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) ]); ?> @@ -32,19 +32,19 @@
- 'Nombre de colonnes', 'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperCol']) ]); ?>
- 'Articles par page', 'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperPage']) ]); ?>
- 'Abrégé de l\'article', 'selected' => $this->getData(['module', $this->getUrl(0),'config', 'height']) ]); ?>