2018-04-02 08:29:19 +02:00
|
|
|
<?php if($module::$news): ?>
|
|
|
|
<div class="row">
|
2021-04-05 08:59:24 +02:00
|
|
|
<?php foreach($module::$news as $newsId => $news): ?>
|
|
|
|
<div class="col<?php echo $module::$nbrCol ;?>" >
|
|
|
|
<h1 class="newsTitle" id="<?php echo $newsId;?>">
|
|
|
|
<?php echo '<a href="'. helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
|
|
|
|
</h1>
|
|
|
|
<div class="newsContent">
|
|
|
|
<?php echo $news['content']; ?>
|
|
|
|
<div class="newsBlur"></div>
|
|
|
|
</div>
|
|
|
|
<div class="newsSignature">
|
|
|
|
<i class="far fa-calendar-alt"></i>
|
|
|
|
<?php echo mb_detect_encoding(strftime('%d %B %Y', $news['publishedOn']), 'UTF-8', true)
|
|
|
|
? strftime('%d %B %Y', $news['publishedOn'])
|
|
|
|
: utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
|
2021-03-21 14:43:44 +01:00
|
|
|
- <?php echo $news['userId']; ?>
|
2021-03-18 14:30:34 +01:00
|
|
|
<!-- Bloc edition -->
|
|
|
|
<?php if (
|
2021-03-21 14:43:44 +01:00
|
|
|
|
2021-03-18 14:30:34 +01: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');?> Editer
|
|
|
|
</a>
|
|
|
|
<?php endif; ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-04-05 08:59:24 +02:00
|
|
|
<?php endforeach; ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
|
|
|
<?php echo $module::$pages; ?>
|
2020-11-17 10:31:08 +01:00
|
|
|
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
|
|
|
<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">
|
2020-11-17 10:31:08 +01:00
|
|
|
<img src='module/news/ressource/feed-icon-16.gif' />
|
2021-04-05 08:59:24 +02:00
|
|
|
<?php
|
2020-11-17 10:31:08 +01:00
|
|
|
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
|
|
|
?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
<?php else: ?>
|
|
|
|
<?php echo template::speech('Aucune news.'); ?>
|
2020-11-15 18:39:03 +01:00
|
|
|
<?php endif; ?>
|