ZwiiCMS/module/news/view/index/index.php

26 lines
914 B
PHP
Raw Normal View History

2018-04-02 08:29:19 +02:00
<?php if($module::$news): ?>
<div class="row">
<div class="col12">
<?php foreach($module::$news as $newsId => $news): ?>
2019-02-22 22:38:06 +01:00
<h1 class="newsTitle">
<?php echo $news['title']; ?>
2020-10-02 17:07:14 +02:00
</h1>
2019-02-22 22:38:06 +01:00
<div class="newsContent">
2018-04-02 08:29:19 +02:00
<?php echo $news['content']; ?>
</div>
2020-05-06 07:19:51 +02:00
<div class="newsSignature">
2020-10-02 17:07:14 +02:00
<i class="far fa-calendar-alt"></i>
2020-11-01 13:38:25 +01:00
<?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'])); ?>
2020-05-06 07:19:51 +02:00
- <?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
</div>
2020-10-02 17:07:14 +02:00
<div class="clearBoth"></div>
2019-02-22 22:38:06 +01:00
<hr />
2018-04-02 08:29:19 +02:00
<?php endforeach; ?>
</div>
</div>
<?php echo $module::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucune news.'); ?>
<?php endif; ?>