[9.2.22] Position des boutons edition dans blog

This commit is contained in:
fredtempez 2020-02-22 12:42:12 +01:00
parent ebd1daeea4
commit 6df2f5c998
1 changed files with 32 additions and 33 deletions

View File

@ -15,7 +15,38 @@
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']), 'lastname']); ?>
<!-- </h4> -->
</p>
<?php if($this->getUser('group') >= self::GROUP_ADMIN): ?>
<div class="row">
<div class="col3">
<?php echo template::button('blogBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col3 offset6">
<?php echo template::button('blogEdit', [
'class' => 'buttonBlue',
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
'value' => 'Editer'
]); ?>
</div>
</div>
<?php else: ?>
<div class="row">
<div class="col2">
<?php echo template::button('blogBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col10">
</div>
</div>
<?php endif; ?>
<div class="clearBoth"></div>
<h3 id="comment">
<?php $commentsNb = count($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment'])); ?>
@ -102,36 +133,4 @@
<?php endforeach; ?>
</div>
</div>
<?php if($this->getUser('group') >= self::GROUP_ADMIN): ?>
<div class="row">
<div class="col3">
<?php echo template::button('blogBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col3 offset6">
<?php echo template::button('blogEdit', [
'class' => 'buttonBlue',
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
'value' => 'Editer'
]); ?>
</div>
</div>
<?php else: ?>
<div class="row">
<div class="col2">
<?php echo template::button('blogBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col10">
</div>
</div>
<?php endif; ?>
<?php echo $module::$pages; ?>