forked from ZwiiCMS-Team/ZwiiCMS
news bouton léger d'édition
This commit is contained in:
parent
cca005fb06
commit
00e6005983
@ -2,6 +2,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php foreach($module::$news as $newsId => $news): ?>
|
<?php foreach($module::$news as $newsId => $news): ?>
|
||||||
|
<div class="row ">
|
||||||
|
<div class="col12">
|
||||||
<h1 class="newsTitle" id="<?php echo $newsId;?>">
|
<h1 class="newsTitle" id="<?php echo $newsId;?>">
|
||||||
<?php echo $news['title']; ?>
|
<?php echo $news['title']; ?>
|
||||||
</h1>
|
</h1>
|
||||||
@ -14,9 +16,22 @@
|
|||||||
? strftime('%d %B %Y', $news['publishedOn'])
|
? strftime('%d %B %Y', $news['publishedOn'])
|
||||||
: utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
|
: utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
|
||||||
- <?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
|
- <?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
|
||||||
|
<!-- Bloc edition -->
|
||||||
|
<?php if (
|
||||||
|
|
||||||
|
$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; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearBoth"></div>
|
|
||||||
<hr />
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user