gallery pour editeur

This commit is contained in:
Deltacms 2022-11-09 18:45:36 +01:00
parent 0727a52f6f
commit 7b6aa131a7
3 changed files with 10 additions and 8 deletions

View File

@ -76,8 +76,8 @@ class gallery extends common {
// Mettre à jour la version
$this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.0' ]);
}
if (version_compare($versionData, '4.1', '<') ) {
$this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.1' ]);
if (version_compare($versionData, '4.2', '<') ) {
$this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.2' ]);
}
}
@ -267,7 +267,8 @@ class gallery extends common {
template::button('galleryConfigDelete' . $galleryId, [
'class' => 'galleryConfigDelete buttonRed',
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $galleryId . '/' . $_SESSION['csrf'],
'value' => template::ico('cancel')
'value' => template::ico('cancel'),
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
])
];
// Tableau des id des galleries pour le drag and drop

View File

@ -13,10 +13,10 @@ echo template::formOpen('galleryConfigForm'); ?>
'value' => $text['gallery_view']['config'][0]
]); ?>
</div>
<div class="col2 offset8">
<div class="col2 offset8 <?php if($this->getUser('group') < self::GROUP_MODERATOR) echo 'displayNone'; ?> ">
<?php echo template::button('galleryConfigBack', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/theme/' . $_SESSION['csrf'],
'value' => template::ico('brush','right') . $text['gallery_view']['config'][1]
'value' => template::ico('brush','right') . $text['gallery_view']['config'][1],
]); ?>
</div>
</div>

View File

@ -27,17 +27,18 @@ echo template::formOpen('galleryEditForm'); ?>
<div class="col5">
<?php echo template::text('galleryEditName', [
'label' => $text['gallery_view']['edit'][3],
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name'])
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']),
'readonly' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
]); ?>
</div>
<div class="col4">
<div class="col4 <?php if($this->getUser('group') < self::GROUP_MODERATOR) echo 'displayNone'; ?> ">
<?php echo template::hidden('galleryEditDirectoryOld', [
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']),
'noDirty' => true // Désactivé à cause des modifications en ajax
]); ?>
<?php echo template::select('galleryEditDirectory', [], [
'label' => $text['gallery_view']['edit'][4],
'noDirty' => true // Désactivé à cause des modifications en ajax
'noDirty' => true, // Désactivé à cause des modifications en ajax
]); ?>
</div>
<div class="col3">