From 953ba662e89e26121fa19677c52a86c3b5b98553 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 20 Dec 2023 13:00:50 +0100 Subject: [PATCH] 7.4 bouton de retour --- module/blog/blog.php | 11 ++++--- module/blog/view/article/article.php | 47 ++++++++++++++++------------ module/blog/view/option/option.php | 9 ++++-- 3 files changed, 41 insertions(+), 26 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index 83518106..a2a2e15f 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -16,7 +16,7 @@ class blog extends common { - const VERSION = '7.3'; + const VERSION = '7.4'; const REALNAME = 'Blog'; const DELETE = true; const UPDATE = '0.0'; @@ -174,11 +174,13 @@ class blog extends common $this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']); $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.5']); } + // Version 7.4 + if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '7.4', '<')) { + $this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]); + $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '7.4']); + } } - - - /** * Flux RSS */ @@ -574,6 +576,7 @@ class blog extends common 'itemsperPage' => $this->getInput('blogOptionItemsperPage', helper::FILTER_INT, true), 'dateFormat' => $this->getInput('blogOptionDateFormat'), 'timeFormat' => $this->getInput('blogOptionTimeFormat'), + 'buttonBack' => $this->getInput('newsOptionButtonBack'), 'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']), ] ]); diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index 0d9ba2ff..ac17c446 100755 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -1,6 +1,6 @@
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?> + getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?> getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) { echo ' -
+
+ getData(['module', $this->getUrl(0), 'config', 'buttonBack'])): ?> + + + + +
+
@@ -18,35 +25,35 @@ getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?> getUser('password') === $this->getInput('ZWII_USER_PASSWORD') and ( // Propriétaire - ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_OWNER - and ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']) === $this->getUser('id') + ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_OWNER + and ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']) === $this->getUser('id') or $this->getUser('group') === self::GROUP_ADMIN) ) or ( - // Groupe - ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_ADMIN - or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_EDITOR) - and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) + // Groupe + ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_ADMIN + or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_EDITOR) + and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) ) or ( // Tout le monde - $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_ALL + $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_ALL and $this->getUser('group') >= $module::$actions['config'] ) ) - ) : ?> + ): ?> Éditer - getData(['module', $this->getUrl(0), 'config', 'feeds'])) : ?> + getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
-getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])) : ?> +getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>

Cet article ne reçoit pas de commentaire.

- +

@@ -67,7 +74,7 @@ if ($module::$nbCommentsApproved > 0) { echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : ''); } else { - echo 'Pas encore de commentaire'; + echo 'Pas encore de commentaire'; } ?>

@@ -79,7 +86,7 @@ 'readonly' => true ]); ?>
- getUser('password') === $this->getInput('ZWII_USER_PASSWORD')) : ?> + getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?> 'Nom', 'readonly' => true, @@ -88,7 +95,7 @@ $this->getUser('id') ]); ?> - +
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength']) ]); ?>
- getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) : ?> + getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?>
- $comment) : ?> + $comment): ?>

diff --git a/module/blog/view/option/option.php b/module/blog/view/option/option.php index a761e381..7cd4b8a5 100755 --- a/module/blog/view/option/option.php +++ b/module/blog/view/option/option.php @@ -50,12 +50,17 @@

-
+
$this->getData(['module', $this->getUrl(0), 'config', 'feeds']), ]); ?>
-
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack']) + ]); ?> +
+
'Texte de l\'étiquette', 'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])