groupEdit WIP
This commit is contained in:
parent
6641556084
commit
7dce2beb3b
@ -962,7 +962,7 @@ class layout extends common
|
||||
$rightItems = '';
|
||||
if ($this->getUser('group') >= self::GROUP_MODERATOR) {
|
||||
$rightItems .= '<li>' . template::ico('folder', [
|
||||
'help' => 'Gérer les fichiers',
|
||||
'help' => 'Fichiers',
|
||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']),
|
||||
'attr' => 'data-lity'
|
||||
]) . '</li>';
|
||||
@ -973,7 +973,7 @@ class layout extends common
|
||||
'href' => helper::baseUrl() . 'theme'
|
||||
]) . '</li>';
|
||||
$rightItems .= '<li>' . template::ico('puzzle', [
|
||||
'help' => 'Gérer les modules',
|
||||
'help' => 'Modules',
|
||||
'href' => helper::baseUrl() . 'plugin'
|
||||
]) . '</li>';
|
||||
$rightItems .= '<li>' . template::ico('flag', [
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php echo template::formOpen('userEditForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php if ($this->getUser('group') === self::GROUP_ADMIN) : ?>
|
||||
<?php if ($this->getUser('group') === self::GROUP_ADMIN): ?>
|
||||
<?php echo template::button('userEditBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'user',
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
<?php else : ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::button('userEditBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
@ -22,7 +22,8 @@
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Identité'); ?>
|
||||
<h4>
|
||||
<?php echo helper::translate('Identité'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
@ -60,7 +61,8 @@
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Authentification'); ?>
|
||||
<h4>
|
||||
<?php echo helper::translate('Authentification'); ?>
|
||||
</h4>
|
||||
<?php echo template::text('userEditId', [
|
||||
'autocomplete' => 'off',
|
||||
@ -70,7 +72,8 @@
|
||||
'value' => $this->getUrl(2)
|
||||
]); ?>
|
||||
<?php echo template::password('userEditOldPassword', [
|
||||
'autocomplete' => 'new-password', // remplace 'off' pour éviter le pré remplissage auto
|
||||
'autocomplete' => 'new-password',
|
||||
// remplace 'off' pour éviter le pré remplissage auto
|
||||
'label' => 'Ancien mot de passe'
|
||||
]); ?>
|
||||
<?php echo template::password('userEditNewPassword', [
|
||||
@ -87,45 +90,59 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Paramètres'); ?>
|
||||
<h4>
|
||||
<?php echo helper::translate('Paramètres'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('userEditLanguage', $module::$languagesInstalled, [
|
||||
'label' => 'Langues',
|
||||
'selected' => $this->getData(['user', $this->getUser('id'), 'language'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php if ($this->getUser('group') === self::GROUP_ADMIN) : ?>
|
||||
<?php echo template::select('userEditGroup', self::$groupEdits, [
|
||||
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
|
||||
'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''),
|
||||
'label' => 'Groupe',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'group'])
|
||||
<div class="col6">
|
||||
<?php echo template::select('userEditLanguage', $module::$languagesInstalled, [
|
||||
'label' => 'Langues',
|
||||
'selected' => $this->getData(['user', $this->getUser('id'), 'language'])
|
||||
]); ?>
|
||||
<div id="userEditMemberFiles" class="displayNone">
|
||||
<?php echo template::checkbox('userEditFiles', true, 'Partage de fichiers autorisé', [
|
||||
'checked' => $this->getData(['user', $this->getUrl(2), 'files']),
|
||||
'help' => 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers'
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php if ($this->getUser('group') === self::GROUP_ADMIN): ?>
|
||||
<?php echo template::select('userEditGroup', self::$groupEdits, [
|
||||
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
|
||||
'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''),
|
||||
'label' => 'Groupe',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'group'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="userEditLabelAuth">
|
||||
<?php echo helper::translate('Permissions :'); ?>
|
||||
</div>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de pages'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de fichiers'); ?></li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Administration complète du site'); ?></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="userEditMemberFiles" class="displayNone">
|
||||
<?php echo template::checkbox('userEditFiles', true, 'Partage de fichiers autorisé', [
|
||||
'checked' => $this->getData(['user', $this->getUrl(2), 'files']),
|
||||
'help' => 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers'
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="userEditLabelAuth">
|
||||
<?php echo helper::translate('Permissions :'); ?>
|
||||
</div>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MEMBER; ?>"
|
||||
class="userEditGroupDescription displayNone">
|
||||
<li>
|
||||
<?php echo helper::translate('Accès aux pages privées'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MODERATOR; ?>"
|
||||
class="userEditGroupDescription displayNone">
|
||||
<li>
|
||||
<?php echo helper::translate('Accès aux pages privées'); ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php echo helper::translate('Ajout - Édition - Suppression de pages'); ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php echo helper::translate('Ajout - Édition - Suppression de fichiers'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_ADMIN; ?>"
|
||||
class="userEditGroupDescription displayNone">
|
||||
<li>
|
||||
<?php echo helper::translate('Administration complète du site'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php echo template::formOpen('groupEditForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('userEditBack', [
|
||||
<?php echo template::button('groupEditBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'user',
|
||||
'value' => template::ico('left')
|
||||
@ -10,4 +10,117 @@
|
||||
<div class="col2 offset9">
|
||||
<?php echo template::submit('groupEditSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Opérations sur les fichiers'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditDownload', true, 'Téléchargement', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'download'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditEdit', true, 'Edition', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'edit'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditCreate', true, 'Création', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'create'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditRename', true, 'Nommage', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'rename'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditUpload', true, 'Téléversement', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'upload'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditDelete', true, 'Effacement', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'delete'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditPreview', true, 'Prévisualisation', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'preview'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditDuplicate', true, 'Duplication', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'duplicate'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditExtract', true, 'Extraction', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'extract'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditCopycut', true, 'Coupé collé', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'copycut'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditPermission', true, 'Permissions', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'permission'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Opérations sur les dossiers'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditFolderCreate', true, 'Création', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'create'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditFolderDelete', true, 'Effacement', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'delete'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditFolderRename', true, 'Nommage', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'rename'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditFolderCopycut', true, 'Coupé collé', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'copycut'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::checkbox('groupEditFolderPermission', true, 'Permissions', [
|
||||
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'permission'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
Loading…
Reference in New Issue
Block a user