From 987c8224c7f1bafb84d5e284ff0093921b92f1a0 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 21 Jul 2026 22:25:08 +0200 Subject: Widen nodes#show to all attachments --- app/views/content/_headline_image.html.erb | 6 +++--- app/views/nodes/show.html.erb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/content/_headline_image.html.erb b/app/views/content/_headline_image.html.erb index e7b821b..13a4ac7 100644 --- a/app/views/content/_headline_image.html.erb +++ b/app/views/content/_headline_image.html.erb @@ -7,7 +7,7 @@ :class => "glightbox", :data => { :gallery => "page-#{@page.node.id}", :glightbox => glightbox_data(@headline_asset, @headline_asset.name), - :"credit-selector" => (@headline_asset.has_credit? ? "#credit_for_asset_#{@headline_asset.id}" : nil) } + :"credit-selector" => (@headline_asset.show_credit? ? "#credit_for_asset_#{@headline_asset.id}" : nil) } ) %> <% if gallery_images.size > 1 %>
<%= "#{gallery_images.size} #{t(:images)}" %>
@@ -18,7 +18,7 @@ :class => "glightbox right", :data => { :gallery => "page-#{@page.node.id}", :glightbox => glightbox_data(gallery_images.first, gallery_images.first.name), - :"credit-selector" => (gallery_images.first.has_credit? ? "#credit_for_asset_#{gallery_images.first.id}" : nil) } %> + :"credit-selector" => (gallery_images.first.show_credit? ? "#credit_for_asset_#{gallery_images.first.id}" : nil) } %> <% end %> <% gallery_images.each do |image| %> @@ -27,5 +27,5 @@ <%= link_to "", image.upload.url, :class => "glightbox", :style => "display: none", :data => { :gallery => "page-#{@page.node.id}", :glightbox => glightbox_data(image, image.name), - :"credit-selector" => (image.has_credit? ? "#credit_for_asset_#{image.id}" : nil) } %> + :"credit-selector" => (image.show_credit? ? "#credit_for_asset_#{image.id}" : nil) } %> <% end %> diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index f2b4b15..adf79dd 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb @@ -253,12 +253,12 @@ <% end %> - <% if @page.assets.images.any? %> + <% if @page.assets.any? %> <% headline_asset_id = @page.headline_asset&.id %>
Images