2023-03-06 15:23:25 +01:00
|
|
|
<?php if ($module::$news): ?>
|
|
|
|
<link rel="stylesheet" type="text/css" href="<?php echo helper::baseUrl(false) . $this->getData(['module', $this->getUrl(0), 'theme', 'style']);?> "/>
|
|
|
|
<?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">
|
|
|
|
<img src='module/news/ressource/feed-icon-16.gif' />
|
|
|
|
<?php
|
|
|
|
echo $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) ? '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>' : '';
|
|
|
|
?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2022-03-17 12:55:04 +01:00
|
|
|
<article>
|
|
|
|
<div class="row">
|
2021-03-21 14:43:44 +01:00
|
|
|
|
2023-03-06 15:23:25 +01:00
|
|
|
<?php foreach ($module::$news as $newsId => $news): ?>
|
|
|
|
<div class="col<?php echo $module::$nbrCol; ?>">
|
|
|
|
<div class="newsFrame">
|
|
|
|
<h2 class="newsTitle" id="<?php echo $newsId; ?>">
|
|
|
|
<?php echo '<a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
|
|
|
|
</h2>
|
|
|
|
<div class="newsSignature">
|
|
|
|
<?php echo template::ico('user'); ?>
|
2023-12-20 12:47:39 +01:00
|
|
|
<?php echo $news['userId'] . ' - '; ?>
|
2023-03-06 15:23:25 +01:00
|
|
|
<?php echo template::ico('calendar-empty'); ?>
|
2024-01-26 16:34:01 +01:00
|
|
|
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn'], self::$i18nUI) . ' ' . helper::dateUTF8($module::$timeFormat, $news['publishedOn'], self::$i18nUI); ?>
|
2023-03-06 15:23:25 +01:00
|
|
|
<!-- Bloc edition -->
|
|
|
|
<?php if (
|
2024-09-06 17:32:29 +02:00
|
|
|
$this->isConnected() === true
|
2023-03-06 15:23:25 +01:00
|
|
|
and
|
|
|
|
( // Propriétaire
|
|
|
|
($this->getUser('group') === self::GROUP_ADMIN)
|
|
|
|
)
|
|
|
|
): ?>
|
2023-12-20 13:43:32 +01:00
|
|
|
-
|
2023-03-06 15:23:25 +01:00
|
|
|
<a
|
2023-06-19 19:46:00 +02:00
|
|
|
href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsId; ?>">
|
2023-03-06 15:23:25 +01:00
|
|
|
<?php echo template::ico('pencil'); ?> Éditer
|
|
|
|
</a>
|
|
|
|
<?php endif; ?>
|
|
|
|
</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; ?>
|
|
|
|
</div>
|
2022-10-09 10:35:56 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-17 12:55:04 +01:00
|
|
|
<?php endforeach; ?>
|
2023-03-06 15:23:25 +01:00
|
|
|
|
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; ?>
|
2023-03-06 15:23:25 +01:00
|
|
|
<?php else: ?>
|
2023-01-17 14:21:36 +01:00
|
|
|
<?php echo template::speech('Aucune news'); ?>
|
2022-10-09 10:35:56 +02:00
|
|
|
<?php endif; ?>
|