2022-10-09 10:35:56 +02:00
|
|
|
<?php if ($module::$news) : ?>
|
2022-03-17 12:55:04 +01:00
|
|
|
<article>
|
|
|
|
<div class="row">
|
2022-10-09 10:35:56 +02:00
|
|
|
<?php foreach ($module::$news as $newsId => $news) : ?>
|
|
|
|
<div class="newsFrame col<?php echo $module::$nbrCol; ?>">
|
|
|
|
<h2 class="newsTitle" id="<?php echo $newsId; ?>">
|
|
|
|
<?php echo '<a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
|
2022-03-17 12:55:04 +01:00
|
|
|
</h2>
|
|
|
|
<div class="newsSignature">
|
2022-10-09 10:35:56 +02:00
|
|
|
<?php echo template::ico('user'); ?>
|
|
|
|
<?php echo $news['userId']; ?>
|
2022-03-17 12:55:04 +01:00
|
|
|
<?php echo template::ico('calendar-empty'); ?>
|
2022-10-09 10:35:56 +02:00
|
|
|
<?php echo helper::dateUTF8('%d %B %Y', $news['publishedOn']) . ' - ' . helper::dateUTF8('%H:%M', $news['publishedOn']); ?>
|
|
|
|
<!-- Bloc edition -->
|
|
|
|
<?php if (
|
2021-03-21 14:43:44 +01:00
|
|
|
|
2022-10-09 10:35:56 +02:00
|
|
|
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
|
|
|
and
|
|
|
|
( // Propriétaire
|
|
|
|
($this->getUser('group') === self::GROUP_ADMIN)
|
|
|
|
)
|
|
|
|
) : ?>
|
|
|
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsId . '/' . $_SESSION['csrf']; ?>">
|
|
|
|
<?php echo template::ico('pencil'); ?> Éditer
|
|
|
|
</a>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="newsContent">
|
|
|
|
<?php echo $news['content']; ?>
|
|
|
|
<?php if (
|
|
|
|
$this->getData(['module', $this->getUrl(0), 'config', 'height']) !== -1
|
|
|
|
&& 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; ?>
|
2022-03-17 12:55:04 +01:00
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
2022-03-17 12:55:04 +01:00
|
|
|
</article>
|
2018-04-02 08:29:19 +02:00
|
|
|
<?php echo $module::$pages; ?>
|
2022-10-09 10:35:56 +02:00
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])) : ?>
|
2020-11-17 10:31:08 +01:00
|
|
|
<div id="rssFeed">
|
2021-04-02 15:24:30 +02:00
|
|
|
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
|
2022-10-09 10:35:56 +02:00
|
|
|
<img src='module/news/ressource/feed-icon-16.gif' />
|
2021-05-15 13:49:04 +02:00
|
|
|
<?php
|
2022-10-09 10:35:56 +02:00
|
|
|
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
|
2020-11-17 10:31:08 +01:00
|
|
|
?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2022-10-09 10:35:56 +02:00
|
|
|
<?php else : ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
<?php echo template::speech('Aucune news.'); ?>
|
2022-10-09 10:35:56 +02:00
|
|
|
<?php endif; ?>
|