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/assets/edit.html.erb | 17 +++++++++++++++++ app/views/assets/new.html.erb | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) (limited to 'app/views/assets') diff --git a/app/views/assets/edit.html.erb b/app/views/assets/edit.html.erb index 3ef8fea5..0c1dd8fe 100644 --- a/app/views/assets/edit.html.erb +++ b/app/views/assets/edit.html.erb @@ -31,6 +31,23 @@ ) %> +
attach to page
+
+
+ <%= text_field_tag :asset_node_search_term, @attach_node&.title, + :placeholder => "Search for a page…", :autocomplete => "off" %> + +
+ <%= hidden_field_tag :node_id, @attach_node&.id %> + Optional — attaches this asset to that page, all pending versions included. +
+ +
+
+ + Applies only if the page has no headline yet. +
+
Actions
diff --git a/app/views/assets/new.html.erb b/app/views/assets/new.html.erb index 2cf88650..7bded949 100644 --- a/app/views/assets/new.html.erb +++ b/app/views/assets/new.html.erb @@ -26,6 +26,23 @@ ) %>
+
attach to page
+
+
+ <%= text_field_tag :asset_node_search_term, @attach_node&.title, + :placeholder => "Search for a page…", :autocomplete => "off" %> + +
+ <%= hidden_field_tag :node_id, @attach_node&.id %> + Optional — attaches this asset to that page, all pending versions included. +
+ +
+
+ + Applies only if the page has no headline yet. +
+
Actions
-- cgit v1.3