From 7dce2beb3b83d477dc846a7bcccac2ee8f57f39a Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 10 Mar 2023 16:49:49 +0100 Subject: [PATCH] groupEdit WIP --- core/class/layout.class.php | 4 +- core/module/user/view/edit/edit.php | 97 +++++++++------ core/module/user/view/groupEdit/groupEdit.php | 117 +++++++++++++++++- 3 files changed, 174 insertions(+), 44 deletions(-) diff --git a/core/class/layout.class.php b/core/class/layout.class.php index a3ee334c..8da0c7c2 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -962,7 +962,7 @@ class layout extends common $rightItems = ''; if ($this->getUser('group') >= self::GROUP_MODERATOR) { $rightItems .= '
  • ' . 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' ]) . '
  • '; @@ -973,7 +973,7 @@ class layout extends common 'href' => helper::baseUrl() . 'theme' ]) . ''; $rightItems .= '
  • ' . template::ico('puzzle', [ - 'help' => 'Gérer les modules', + 'help' => 'Modules', 'href' => helper::baseUrl() . 'plugin' ]) . '
  • '; $rightItems .= '
  • ' . template::ico('flag', [ diff --git a/core/module/user/view/edit/edit.php b/core/module/user/view/edit/edit.php index 3846d0c6..16137d22 100644 --- a/core/module/user/view/edit/edit.php +++ b/core/module/user/view/edit/edit.php @@ -1,13 +1,13 @@
    - getUser('group') === self::GROUP_ADMIN) : ?> + getUser('group') === self::GROUP_ADMIN): ?> 'buttonGrey', 'href' => helper::baseUrl() . 'user', 'value' => template::ico('left') ]); ?> - + 'buttonGrey', 'href' => helper::baseUrl(false), @@ -22,7 +22,8 @@
    -

    +

    +

    @@ -60,7 +61,8 @@
    -

    +

    +

    'off', @@ -70,7 +72,8 @@ 'value' => $this->getUrl(2) ]); ?> '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' ]); ?>
    -

    +

    +

    -
    - 'Langues', - 'selected' => $this->getData(['user', $this->getUser('id'), 'language']) - ]); ?> -
    -
    - getUser('group') === self::GROUP_ADMIN) : ?> - ($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']) +
    + 'Langues', + 'selected' => $this->getData(['user', $this->getUser('id'), 'language']) ]); ?> -
    - $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' +
    +
    + getUser('group') === self::GROUP_ADMIN): ?> + ($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']) ]); ?> -
    -
    - -
    -
      -
    • -
    -
      -
    • -
    • -
    • -
    -
      -
    • -
    - -
    +
    + $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' + ]); ?> +
    +
    + +
    +
      +
    • + +
    • +
    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +
      +
    • + +
    • +
    + +
    diff --git a/core/module/user/view/groupEdit/groupEdit.php b/core/module/user/view/groupEdit/groupEdit.php index 6a9fa8c5..fcb4e1f6 100644 --- a/core/module/user/view/groupEdit/groupEdit.php +++ b/core/module/user/view/groupEdit/groupEdit.php @@ -1,7 +1,7 @@
    - 'buttonGrey', 'href' => helper::baseUrl() . 'user', 'value' => template::ico('left') @@ -10,4 +10,117 @@
    -
    \ No newline at end of file +
    +
    +
    +
    +

    + +

    +
    +
    +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'download']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'edit']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'create']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'rename']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'upload']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'delete']) + ]); ?> +
    +
    +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'preview']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'duplicate']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'extract']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'copycut']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'permission']) + ]); ?> +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    + +

    +
    +
    +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'create']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'delete']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'rename']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'copycut']) + ]); ?> +
    +
    + $this->getData(['group', $this->getUrl(2), 'file', 'permission']) + ]); ?> +
    +
    +
    +
    +
    +
    +
    + \ No newline at end of file