News 5.3 option du bouton de retour et contrôle des options de mise à jour
This commit is contained in:
parent
b26e7dcb7d
commit
74da56e58d
@ -1,3 +1,5 @@
|
||||
# Version 5.3
|
||||
- Option d'un lien de retour dans la signature
|
||||
# Version 5.2
|
||||
- Termes des commandes de profils
|
||||
# Version 5.1
|
||||
@ -24,5 +26,3 @@
|
||||
- Ecran layout réservé à la configuration et au thème
|
||||
- Bug avec l'initialisation, fichier css déclaré mais absent
|
||||
- Appel de la feuille style si présente
|
||||
|
||||
A faire partie CSS à amléiorer au niveau des options
|
||||
|
@ -16,7 +16,7 @@
|
||||
class news extends common
|
||||
{
|
||||
|
||||
const VERSION = '5.2';
|
||||
const VERSION = '5.3';
|
||||
const REALNAME = 'News';
|
||||
const DATADIRECTORY = self::DATA_DIR . 'news/';
|
||||
|
||||
@ -308,7 +308,8 @@ class news extends common
|
||||
'height' => $this->getInput('newsOptionHeight', helper::FILTER_INT, true),
|
||||
'dateFormat' => $this->getInput('newsOptionDateFormat'),
|
||||
'timeFormat' => $this->getInput('newsOptionTimeFormat'),
|
||||
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData'])
|
||||
'buttonBack' => $this->getInput('newsOptionButtonBack'),
|
||||
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
|
||||
]
|
||||
]);
|
||||
|
||||
@ -593,13 +594,19 @@ class news extends common
|
||||
// Mettre à jour la version
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '3.4']);
|
||||
}
|
||||
// Mise à jour 3.4
|
||||
// Mise à jour 4.4
|
||||
if (version_compare($versionData, '4.4', '<')) {
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'dateFormat', '%d %B %Y']);
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
||||
// Mettre à jour la version
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '4.4']);
|
||||
}
|
||||
// Mise à jour 5.3
|
||||
if (version_compare($versionData, '5.3', '<')) {
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]);
|
||||
// Mettre à jour la version
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '5.3']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
<?php
|
||||
class init extends news {
|
||||
public static $defaultData = [
|
||||
'feeds' => false,
|
||||
'feedsLabel' => '',
|
||||
'feeds' => true,
|
||||
'feedsLabel' => 'RSS',
|
||||
'itemsperPage' => 8,
|
||||
'itemsperCol' => 12,
|
||||
'height' => -1,
|
||||
'versionData' => '3.5',
|
||||
'versionData' => '5.3',
|
||||
'dateFormat' => '%d %B %Y',
|
||||
'timeFormat' =>'%H:%M',
|
||||
'buttonBack' => true
|
||||
];
|
||||
|
||||
public static $defaultTheme = [
|
||||
@ -16,7 +17,8 @@ class init extends news {
|
||||
'borderStyle' => 'none',
|
||||
'borderColor' => 'rgba(33, 34, 35, 1)',
|
||||
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
||||
'borderWidth' => '0'
|
||||
'borderWidth' => '0',
|
||||
'itemsBlur' => '0%'
|
||||
];
|
||||
|
||||
}
|
@ -4,7 +4,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row verticalAlignMiddle">
|
||||
<div class="col12 newsDate">
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])): ?>
|
||||
<div class="col6 textAlignLeft">
|
||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>">
|
||||
<?php echo template::ico('left') . helper::translate('Retour'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="col6 newsDate textAlignRight">
|
||||
<!-- bloc signature et date -->
|
||||
<?php echo template::ico('user'); ?>
|
||||
<?php echo $module::$articleSignature . ' - '; ?>
|
||||
@ -13,7 +20,7 @@
|
||||
<!-- Bloc edition -->
|
||||
<?php if (
|
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
AND
|
||||
and
|
||||
( // Propriétaire
|
||||
($this->getUser('group') === self::GROUP_ADMIN)
|
||||
)
|
||||
@ -25,7 +32,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/news/ressource/feed-icon-16.gif' />
|
||||
<?php
|
||||
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
|
||||
|
@ -46,7 +46,6 @@
|
||||
&& strlen($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'content'])) >= $this->getData(['module', $this->getUrl(0), 'config', 'height'])
|
||||
): ?>
|
||||
<?php echo ' ... <a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '"><span class="newsSuite">lire la suite</span></a>'; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,12 +48,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col3">
|
||||
<?php echo template::checkbox('newsOptionShowFeeds', true, 'Lien du flux RSS', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
|
||||
'help' => 'Flux limité aux articles de la première page.'
|
||||
]); ?>
|
||||
</div>
|
||||
<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('newsOptionFeedslabel', [
|
||||
'label' => 'Etiquette RSS',
|
||||
|
Loading…
Reference in New Issue
Block a user