From b638b2e45ae88716822fbcb06765aba54b6d3e75 Mon Sep 17 00:00:00 2001 From: Eric Leroy-Terquem Date: Tue, 11 Jun 2024 16:52:14 +0200 Subject: [PATCH] feat(gallery): gallery in demande page only for instructeurs --- .../shared/champs/piece_justificative/_show.html.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/shared/champs/piece_justificative/_show.html.haml b/app/views/shared/champs/piece_justificative/_show.html.haml index abb301872..12d1bca87 100644 --- a/app/views/shared/champs/piece_justificative/_show.html.haml +++ b/app/views/shared/champs/piece_justificative/_show.html.haml @@ -1,9 +1,5 @@ .fr-downloads-group - - if !feature_enabled?(:gallery_demande) - %ul - - champ.piece_justificative_file.attachments.each do |attachment| - %li= render Attachment::ShowComponent.new(attachment:, new_tab: true) - - else + - if instructeur_signed_in? && feature_enabled?(:gallery_demande) .gallery-items-list - champ.piece_justificative_file.attachments.with_all_variant_records.each do |attachment| .gallery-item @@ -25,3 +21,7 @@ .thumbnail = image_tag('apercu-indisponible.png') = render Attachment::ShowComponent.new(attachment:, new_tab: true, truncate: true) + - else + %ul + - champ.piece_justificative_file.attachments.each do |attachment| + %li= render Attachment::ShowComponent.new(attachment:, new_tab: true)