ZwiiCampus/module/news/view/article/article.php

62 lines
2.5 KiB
PHP
Raw Normal View History

<div class="row">
2023-12-19 19:10:49 +01:00
<div class="col12">
<?php echo $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'content']); ?>
</div>
</div>
<div class="row verticalAlignMiddle">
2023-12-20 13:44:47 +01:00
<div class="col6 textAlignLeft">
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])): ?>
2023-12-19 19:10:49 +01:00
<a href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>">
<?php echo template::ico('left') . helper::translate('Retour'); ?>
</a>
2023-12-20 13:44:47 +01:00
<?php endif; ?>
</div>
2023-12-19 19:10:49 +01:00
<div class="col6 newsDate textAlignRight">
2024-10-12 11:02:08 +02:00
<!-- bloc signature -->
<?php echo template::ico('user'); ?>
2024-10-12 11:02:08 +02:00
<?php echo $module::$articleSignature; ?>
<!-- bloc date -->
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
|| $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
): ?>
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
&& $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
): ?>
<?php echo '&nbsp;-&nbsp;'; ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?> <!-- Bloc edition -->
2023-12-19 19:10:49 +01:00
<?php if (
2024-09-06 17:16:04 +02:00
$this->isConnected() === true
2023-12-19 19:10:49 +01:00
and
( // Propriétaire
($this->getUser('group') === self::GROUP_ADMIN)
)
): ?>
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1); ?>">
2024-10-12 11:02:08 +02:00
<?php echo template::ico('pencil', ['margin' => 'left']); ?>
2023-12-20 13:44:47 +01:00
<?php echo helper::translate('Éditer'); ?>
2023-12-19 19:10:49 +01:00
</a>
<?php endif; ?>
<!-- Bloc RSS-->
2023-12-19 19:10:49 +01:00
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
<div id="rssFeed">
2023-12-19 19:10:49 +01:00
<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 '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
?>
</a>
</div>
<?php endif; ?>
</div>
</div>