From 847983bf007fe771a7366c709a5f32c5e26e61b1 Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Wed, 6 Apr 2022 12:45:33 +0200 Subject: [PATCH] related to #1609 visit gallery button takes in account the privacy --- admin/albums.php | 1 + admin/themes/default/js/albums.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/admin/albums.php b/admin/albums.php index ba7473a77..99d474b09 100644 --- a/admin/albums.php +++ b/admin/albums.php @@ -189,6 +189,7 @@ SELECT $orderedCat['id'] = $cat['cat']['id']; $orderedCat['nb_images'] = isset($nb_photos_in[$cat['cat']['id']]) ? $nb_photos_in[$cat['cat']['id']] : 0; $orderedCat['last_updates'] = $cat['cat']['lastmodified']; + $orderedCat['has_access'] = cat_admin_access($cat['cat']['id']); if (isset($cat['children'])) { //Does not update when moving a node diff --git a/admin/themes/default/js/albums.js b/admin/themes/default/js/albums.js index d7ad5ded6..8f5c9d7da 100644 --- a/admin/themes/default/js/albums.js +++ b/admin/themes/default/js/albums.js @@ -96,6 +96,10 @@ $(document).ready(() => { } else { cont.find(".last-update").hide(); } + + if (!node.has_access) { + cont.find(".move-cat-see").addClass("notClickable"); + } } var url_split = window.location.href.split("#");