From c0e6781dda9240ef1fcf69fea036fb4631ea832c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Tue, 15 Oct 2024 15:19:38 +0200 Subject: [PATCH] news 6 option show pseudo --- module/news/changes.md | 2 +- module/news/news.php | 2 ++ module/news/view/article/article.php | 10 +++++++--- module/news/view/index/index.php | 8 ++++++-- module/news/view/option/option.php | 19 +++++++++++++------ 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/module/news/changes.md b/module/news/changes.md index c6628690..7ce9e9f9 100644 --- a/module/news/changes.md +++ b/module/news/changes.md @@ -1,5 +1,5 @@ # Versions 6.0 -- Ajoute deux nouvelles options pour afficher ou masquer la date et l'heure de l'article. +- Ajoute trois nouvelles options pour afficher ou masquer la signature, la date et l'heure de l'article. - Corrige un mauvais format de la propriété buttonBack non stockée au type booléen. # Versions 5.9 - Largeur d'un bouton de retour. diff --git a/module/news/news.php b/module/news/news.php index 6b6c477e..80403089 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -317,6 +317,7 @@ class news extends common 'buttonBack' => $this->getInput('newsOptionButtonBack', helper::FILTER_BOOLEAN), 'showDate' => $this->getInput('newsOptionShowDate', helper::FILTER_BOOLEAN), 'showTime' => $this->getInput('newsOptionShowTime', helper::FILTER_BOOLEAN), + 'showPseudo' => $this->getInput('newsOptionShowPseudo', helper::FILTER_BOOLEAN), 'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']), ] ]); @@ -623,6 +624,7 @@ class news extends common $this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]); $this->setData(['module', $this->getUrl(0), 'config', 'showTime', true]); $this->setData(['module', $this->getUrl(0), 'config', 'showDate', true]); + $this->setData(['module', $this->getUrl(0), 'config', 'showPseudo', true]); // Mettre à jour la version $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.0']); } diff --git a/module/news/view/article/article.php b/module/news/view/article/article.php index a0c037b2..a82413f6 100644 --- a/module/news/view/article/article.php +++ b/module/news/view/article/article.php @@ -13,8 +13,12 @@
- - + getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true + ): ?> + + signature($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId'])); ?> + getData(['module', $this->getUrl(0), 'config', 'showDate']) === true @@ -33,7 +37,7 @@ getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?> getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?> - + isConnected() === true and diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php index 8a97abe8..6b3cdd0a 100644 --- a/module/news/view/index/index.php +++ b/module/news/view/index/index.php @@ -22,8 +22,12 @@
- - + getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true + ): ?> + + signature($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'userId'])); ?> + getData(['module', $this->getUrl(0), 'config', 'showDate']) === true diff --git a/module/news/view/option/option.php b/module/news/view/option/option.php index 9d16be83..8bfd7559 100644 --- a/module/news/view/option/option.php +++ b/module/news/view/option/option.php @@ -15,6 +15,18 @@

+
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack']) + ]); ?> +
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'showPseudo']) + ]); ?> +
+
-
- $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack']) - ]); ?> -
-
+
$this->getData(['module', $this->getUrl(0), 'config', 'feeds']), 'help' => 'Flux limité aux articles de la première page.'