7.4 bouton de retour

This commit is contained in:
Fred Tempez 2023-12-20 13:00:50 +01:00
parent e79ef549d6
commit 953ba662e8
3 changed files with 41 additions and 26 deletions

View File

@ -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,10 +174,12 @@ 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']),
]
]);

View File

@ -10,7 +10,14 @@
</div>
</div>
<div class="row verticalAlignMiddle">
<div class="col12 blogDate">
<div class="col6 textAlignLeft">
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])): ?>
<a href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>">
<?php echo template::ico('left') . helper::translate('Retour'); ?>
</a>
<?php endif; ?>
</div>
<div class="col6 newsDate textAlignRight">
<!-- bloc signature et date -->
<?php echo template::ico('user'); ?>
<?php echo $module::$articleSignature; ?>
@ -18,7 +25,6 @@
<?php echo helper::dateUTF8($module::$dateFormat, $this->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); ?>
<!-- Bloc edition -->
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and
( // Propriétaire
@ -46,7 +52,8 @@
<!-- Bloc RSS-->
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>"
target="_blank">
<img src='module/blog/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';

View File

@ -50,12 +50,17 @@
</div>
</div>
<div class="row">
<div class="col8">
<div class="col3">
<?php echo template::checkbox('blogOptionShowFeeds', true, 'Lien du flux RSS', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
]); ?>
</div>
<div class="col4">
<div class="col3">
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('blogOptionFeedslabel', [
'label' => 'Texte de l\'étiquette',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])