1.6.0 Gestion des droits éditeurs okay

This commit is contained in:
Fred Tempez 2024-02-13 18:05:08 +01:00
parent ee4fc93afe
commit caf193611d

View File

@ -8,44 +8,17 @@
</div> </div>
</div> </div>
<div class="row textAlignCenter"> <div class="row textAlignCenter">
<?php if ($module->permissionControl('users', $this->getUrl(2))): ?>
<div class="col2 offset1">
<?php echo template::button('categoryUser' . $this->getUrl(2), [
'href' => helper::baseUrl() . 'course/users/' . $this->getUrl(2),
'value' => 'Participants',
'ico' => 'users'
]); ?>
</div>
<?php endif; ?>
<?php if ($module->permissionControl('edit', $this->getUrl(2))): ?>
<div class="col2">
<?php echo template::button('courseManageEdit' . $this->getUrl(2), [
'href' => helper::baseUrl() . 'course/edit/' . $this->getUrl(2),
'value' => 'Éditer',
'ico' => 'pencil'
]); ?>
</div>
<?php endif; ?>
<?php if ($module->permissionControl('backup', $this->getUrl(2))): ?>
<div class="col2">
<?php echo template::button('courseManageDownload' . $this->getUrl(2), [
'href' => helper::baseUrl() . 'course/backup/' . $this->getUrl(2),
'value' => 'Sauvegarder',
'ico' => 'download-cloud'
]); ?>
</div>
<?php endif; ?>
<?php if ($module->permissionControl('clone', $this->getUrl(2))): ?>
<div class="col2"> <div class="col2">
<?php if ($this->getUser('permission', 'course', 'clone') === true): ?>
<?php echo template::button('courseManageDuplicate' . $this->getUrl(2), [ <?php echo template::button('courseManageDuplicate' . $this->getUrl(2), [
'href' => helper::baseUrl() . 'course/clone/' . $this->getUrl(2), 'href' => helper::baseUrl() . 'course/clone/' . $this->getUrl(2),
'value' => 'Cloner', 'value' => 'Cloner',
'ico' => 'clone' 'ico' => 'clone'
]); ?> ]); ?>
</div>
<?php endif; ?> <?php endif; ?>
<?php if ($module->permissionControl('delete', $this->getUrl(2))): ?> </div>
<div class="col2 "> <div class="col2 ">
<?php if ($this->getUser('permission', 'course', 'delete') === true): ?>
<?php echo template::button('courseManageDelete' . $this->getUrl(2), [ <?php echo template::button('courseManageDelete' . $this->getUrl(2), [
'class' => 'courseDelete buttonRed', 'class' => 'courseDelete buttonRed',
'href' => helper::baseUrl() . 'course/delete/' . $this->getUrl(2), 'href' => helper::baseUrl() . 'course/delete/' . $this->getUrl(2),
@ -54,6 +27,34 @@
]); ?> ]); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div>
<div class="col2 offset1">
<?php if ($this->getUser('permission', 'course', 'users') === true): ?>
<?php echo template::button('categoryUser' . $this->getUrl(2), [
'href' => helper::baseUrl() . 'course/users/' . $this->getUrl(2),
'value' => 'Participants',
'ico' => 'users'
]); ?>
<?php endif; ?>
</div>
<div class="col2">
<?php if ($this->getUser('permission', 'course', 'edit') === true): ?>
<?php echo template::button('courseManageEdit' . $this->getUrl(2), [
'href' => helper::baseUrl() . 'course/edit/' . $this->getUrl(2),
'value' => 'Éditer',
'ico' => 'pencil'
]); ?>
<?php endif; ?>
</div>
<div class="col2">
<?php if ($this->getUser('permission', 'course', 'backup') === true): ?>
<?php echo template::button('courseManageDownload' . $this->getUrl(2), [
'href' => helper::baseUrl() . 'course/backup/' . $this->getUrl(2),
'value' => 'Sauvegarder',
'ico' => 'download-cloud'
]); ?>
<?php endif; ?>
</div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">