From c2d531872daa202f12e62b6655686c62635c0859 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 10 Jun 2023 16:58:05 +0200 Subject: [PATCH] Profil gallery --- core/module/install/ressource/defaultdata.php | 3 -- core/module/user/user.php | 22 ++++++++-- core/module/user/view/profilAdd/profilAdd.php | 31 +++++++++++++ .../user/view/profilEdit/profilEdit.php | 43 +++++++++++++++++++ 4 files changed, 93 insertions(+), 6 deletions(-) diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 7e7744bd..bcad52f9 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -372,9 +372,6 @@ class init extends common 'add' => false, 'option' => false, 'theme' => false, - 'dirs' => false, - 'sortGalleries' => false, - 'sortPictures' => false, ], 'news' => [ 'add' => false, diff --git a/core/module/user/user.php b/core/module/user/user.php index d3faf9ca..8e18df7a 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -598,6 +598,14 @@ class user extends common 'config' => $this->getInput('profilEditNewsConfig', helper::FILTER_BOOLEAN), 'option' => $this->getInput('profilEditNewsOption', helper::FILTER_BOOLEAN), ], + 'gallery' => [ + 'add' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN), + 'config' => $this->getInput('profilEditGalleryConfig', helper::FILTER_BOOLEAN), + 'option' => $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN), + 'theme' => $this->getInput('profilEditGalleryConfig', helper::FILTER_BOOLEAN), + ], ] ]); @@ -666,7 +674,7 @@ class user extends common 'page' => [ 'add' => $this->getInput('profilAddPageAdd', helper::FILTER_BOOLEAN), 'edit' => $this->getInput('profilAddPageEdit', helper::FILTER_BOOLEAN), - 'delete' => $this->getInput('profilAddPageDElete', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilAddPageDelete', helper::FILTER_BOOLEAN), 'duplicate' => $this->getInput('profilAddPageDuplicate', helper::FILTER_BOOLEAN), 'module' => $this->getInput('profilAddPageModule', helper::FILTER_BOOLEAN), 'cssEditor' => $this->getInput('profilAddPagecssEditor', helper::FILTER_BOOLEAN), @@ -675,7 +683,7 @@ class user extends common 'blog' => [ 'add' => $this->getInput('profilAddBlogAdd', helper::FILTER_BOOLEAN), 'edit' => $this->getInput('profilAddBlogEdit', helper::FILTER_BOOLEAN), - 'delete' => $this->getInput('profilAddBlogDElete', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilAddBlogDelete', helper::FILTER_BOOLEAN), 'config' => $this->getInput('profilAddBlogConfig', helper::FILTER_BOOLEAN), 'option' => $this->getInput('profilAddBlogOption', helper::FILTER_BOOLEAN), 'comment' => $this->getInput('profilAddBlogComment', helper::FILTER_BOOLEAN), @@ -686,10 +694,18 @@ class user extends common 'news' => [ 'add' => $this->getInput('profilAddNewsAdd', helper::FILTER_BOOLEAN), 'edit' => $this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN), - 'delete' => $this->getInput('profilAddNewsDElete', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilAddNewsDelete', helper::FILTER_BOOLEAN), 'config' => $this->getInput('profilAddNewsConfig', helper::FILTER_BOOLEAN), 'option' => $this->getInput('profilAddNewsOption', helper::FILTER_BOOLEAN), ], + 'gallery' => [ + 'add' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN), + 'config' => $this->getInput('profilAddGalleryConfig', helper::FILTER_BOOLEAN), + 'option' => $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN), + 'theme' => $this->getInput('profilAddGalleryConfig', helper::FILTER_BOOLEAN), + ], ] ]); // Valeurs en sortie diff --git a/core/module/user/view/profilAdd/profilAdd.php b/core/module/user/view/profilAdd/profilAdd.php index 0eb59356..210926b1 100644 --- a/core/module/user/view/profilAdd/profilAdd.php +++ b/core/module/user/view/profilAdd/profilAdd.php @@ -151,6 +151,37 @@ +
+
+
+

+ +

+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+
diff --git a/core/module/user/view/profilEdit/profilEdit.php b/core/module/user/view/profilEdit/profilEdit.php index 0230f30c..32ee8439 100644 --- a/core/module/user/view/profilEdit/profilEdit.php +++ b/core/module/user/view/profilEdit/profilEdit.php @@ -201,6 +201,49 @@
+
+
+
+

+ +

+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'add']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'edit']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'delete']) + ]); ?> +
+
+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'config']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'option']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'theme']) + ]); ?> +
+
+
+
+