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
|
# Version 5.2
|
||||||
- Termes des commandes de profils
|
- Termes des commandes de profils
|
||||||
# Version 5.1
|
# Version 5.1
|
||||||
@ -23,6 +25,4 @@
|
|||||||
- Config : le nombre d'objet est fixe, constante dans news.php
|
- Config : le nombre d'objet est fixe, constante dans news.php
|
||||||
- Ecran layout réservé à la configuration et au thème
|
- Ecran layout réservé à la configuration et au thème
|
||||||
- Bug avec l'initialisation, fichier css déclaré mais absent
|
- Bug avec l'initialisation, fichier css déclaré mais absent
|
||||||
- Appel de la feuille style si présente
|
- 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
|
class news extends common
|
||||||
{
|
{
|
||||||
|
|
||||||
const VERSION = '5.2';
|
const VERSION = '5.3';
|
||||||
const REALNAME = 'News';
|
const REALNAME = 'News';
|
||||||
const DATADIRECTORY = self::DATA_DIR . 'news/';
|
const DATADIRECTORY = self::DATA_DIR . 'news/';
|
||||||
|
|
||||||
@ -308,7 +308,8 @@ class news extends common
|
|||||||
'height' => $this->getInput('newsOptionHeight', helper::FILTER_INT, true),
|
'height' => $this->getInput('newsOptionHeight', helper::FILTER_INT, true),
|
||||||
'dateFormat' => $this->getInput('newsOptionDateFormat'),
|
'dateFormat' => $this->getInput('newsOptionDateFormat'),
|
||||||
'timeFormat' => $this->getInput('newsOptionTimeFormat'),
|
'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
|
// Mettre à jour la version
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '3.4']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '3.4']);
|
||||||
}
|
}
|
||||||
// Mise à jour 3.4
|
// Mise à jour 4.4
|
||||||
if (version_compare($versionData, '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', 'dateFormat', '%d %B %Y']);
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
||||||
// Mettre à jour la version
|
// Mettre à jour la version
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '4.4']);
|
$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
|
<?php
|
||||||
class init extends news {
|
class init extends news {
|
||||||
public static $defaultData = [
|
public static $defaultData = [
|
||||||
'feeds' => false,
|
'feeds' => true,
|
||||||
'feedsLabel' => '',
|
'feedsLabel' => 'RSS',
|
||||||
'itemsperPage' => 8,
|
'itemsperPage' => 8,
|
||||||
'itemsperCol' => 12,
|
'itemsperCol' => 12,
|
||||||
'height' => -1,
|
'height' => -1,
|
||||||
'versionData' => '3.5',
|
'versionData' => '5.3',
|
||||||
'dateFormat' => '%d %B %Y',
|
'dateFormat' => '%d %B %Y',
|
||||||
'timeFormat' =>'%H:%M',
|
'timeFormat' =>'%H:%M',
|
||||||
|
'buttonBack' => true
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $defaultTheme = [
|
public static $defaultTheme = [
|
||||||
@ -16,7 +17,8 @@ class init extends news {
|
|||||||
'borderStyle' => 'none',
|
'borderStyle' => 'none',
|
||||||
'borderColor' => 'rgba(33, 34, 35, 1)',
|
'borderColor' => 'rgba(33, 34, 35, 1)',
|
||||||
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
||||||
'borderWidth' => '0'
|
'borderWidth' => '0',
|
||||||
|
'itemsBlur' => '0%'
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
@ -1,34 +1,42 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php echo $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
|
<?php echo $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'content']); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row verticalAlignMiddle">
|
<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 -->
|
<!-- bloc signature et date -->
|
||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $module::$articleSignature . ' - ';?>
|
<?php echo $module::$articleSignature . ' - '; ?>
|
||||||
<?php echo template::ico('calendar-empty'); ?>
|
<?php echo template::ico('calendar-empty'); ?>
|
||||||
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?>
|
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?>
|
||||||
<!-- Bloc edition -->
|
<!-- Bloc edition -->
|
||||||
<?php if (
|
<?php if (
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
AND
|
and
|
||||||
( // Propriétaire
|
( // Propriétaire
|
||||||
( $this->getUser('group') === self::GROUP_ADMIN )
|
($this->getUser('group') === self::GROUP_ADMIN)
|
||||||
)
|
)
|
||||||
): ?>
|
): ?>
|
||||||
<a href ="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1);?>">
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1); ?>">
|
||||||
<?php echo template::ico('pencil');?> Éditer
|
<?php echo template::ico('pencil'); ?> Éditer
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Bloc RSS-->
|
<!-- Bloc RSS-->
|
||||||
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
|
||||||
<div id="rssFeed">
|
<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'; ?>"
|
||||||
<img src='module/news/ressource/feed-icon-16.gif' />
|
target="_blank">
|
||||||
<?php
|
<img src='module/news/ressource/feed-icon-16.gif' />
|
||||||
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
<?php
|
||||||
|
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
&& strlen($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'content'])) >= $this->getData(['module', $this->getUrl(0), 'config', 'height'])
|
&& 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 echo ' ... <a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '"><span class="newsSuite">lire la suite</span></a>'; ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,12 +48,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col3">
|
||||||
<?php echo template::checkbox('newsOptionShowFeeds', true, 'Lien du flux RSS', [
|
<?php echo template::checkbox('newsOptionShowFeeds', true, 'Lien du flux RSS', [
|
||||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
|
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
|
||||||
'help' => 'Flux limité aux articles de la première page.'
|
'help' => 'Flux limité aux articles de la première page.'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</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">
|
<div class="col6">
|
||||||
<?php echo template::text('newsOptionFeedslabel', [
|
<?php echo template::text('newsOptionFeedslabel', [
|
||||||
'label' => 'Etiquette RSS',
|
'label' => 'Etiquette RSS',
|
||||||
|
Loading…
Reference in New Issue
Block a user