From 558ea7764757cfe324bdba72fc5279fa78efd1ea Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 22 Jul 2026 20:03:50 +0200 Subject: Implement controller and view side of the attach logic --- app/views/nodes/show.html.erb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'app/views/nodes/show.html.erb') diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index adf79dd8..b981e4b0 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb @@ -253,10 +253,10 @@ <% end %> - <% if @page.assets.any? %> - <% headline_asset_id = @page.headline_asset&.id %> -
Images
-
+
Attachments
+
+ <% if @page.assets.any? %> + <% headline_asset_id = @page.headline_asset&.id %>
    <% @page.assets.each do |asset| %>
  • "> @@ -269,8 +269,14 @@
  • <% end %>
-
- <% end %> + <% end %> +

+ <%= link_to new_asset_path(:node_id => @node.id), class: 'action_button' do %> + <%= icon("paperclip", library: "tabler", "aria-hidden": true) %> Upload new attachment + <% end %> + To add or remove existing attachments, edit this node instead. +

+
Events
-- cgit v1.3