From a8cf725312d245d8d1f1df0fff22718975ce249e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 20 Aug 2026 12:50:30 +0200 Subject: Add redirect ui in in nodes#edit and apply some minor cleanup Also give search inputs a magnifier and a clear control: input_group wraps a field with an icon and, where clearing is meaningful, a button that empties it and any hidden companion named by data-clears. Clean up some inconistency between field hints presented as p and as span. Remove stray console.log. --- app/views/nodes/edit.html.erb | 53 +++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 14 deletions(-) (limited to 'app/views') diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 927cc648..f629985e 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -80,7 +80,7 @@ <% end %> -

<%= t(".headline_hint") %>

+ <%= t(".headline_hint") %> <%= text_field_tag nil, nil, id: "related_asset_search_term", placeholder: t(".attach_search_placeholder"), autocomplete: "off" %> @@ -118,7 +118,7 @@
<%= t(".parent") %>
<%= text_field_tag :move_to_search_term, (Node.find_by(:id => @page.parent_node_id) || @node.parent)&.title %> -

<%= t(".parent_hint") %>

+ <%= t(".parent_hint") %>
<%= d.hidden_field( :parent_node_id, @@ -128,6 +128,43 @@
+
+
<%= t(".author") %>
+
+ <%= d.select :user_id, user_list, + :selected => @page.user_id || @node.draft&.user_id || @node.head&.user_id %> +
+
+ +
+
<%= t(".publish_at") %>
+
<%= d.datetime_select :published_at, :value => @page.published_at %>
+
+ +
+
<%= t(".redirect") %>
+
+ + <%= t(".redirect_hint") %> + +
"> +
+ <%= icon("search", library: "tabler", "aria-hidden": true) %> + <%= text_field_tag :redirect_search_term, + Node.find_by(:id => @page.redirect_node_id)&.title, + :placeholder => "—", :class => "clearable_input" %> +
+ + <%= d.hidden_field :redirect_node_id %> +
+
+
+
+
<%= t(".external_url") %>
@@ -143,11 +180,6 @@
-
-
<%= t(".publish_at") %>
-
<%= d.datetime_select :published_at, :value => @page.published_at %>
-
-
<%= t(".template") %>
@@ -156,13 +188,6 @@
-
-
<%= t(".author") %>
-
- <%= d.select :user_id, user_list, - :selected => @page.user_id || @node.draft&.user_id || @node.head&.user_id %> -
-
-- cgit v1.3