From f4ddfff03ca9f25d50f39a1971877362d85eb9cb Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 7 Aug 2026 06:15:14 +0200 Subject: Move the pending address from the node onto the draft --- app/views/nodes/edit.html.erb | 12 ++++++------ app/views/nodes/show.html.erb | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index c153c241..ae206578 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -96,20 +96,20 @@
<%= t(".slug") %>
- <%= f.text_field( - :staged_slug, :value => @node.staged_slug || @node.slug + <%= d.text_field( + :slug, :value => @page.slug || @node.slug ) %>
<%= t(".parent") %>
- <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %> + <%= text_field_tag :move_to_search_term, (Node.find_by(:id => @page.parent_node_id) || @node.parent)&.title %>

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

- <%= f.hidden_field( - :staged_parent_id, - :value => @node.staged_parent_id || @node.parent_id + <%= d.hidden_field( + :parent_node_id, + :value => @page.parent_node_id || @node.parent_id ) %>
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index 105e37ea..3b2d28d9 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb @@ -105,7 +105,7 @@ <% end %>
<%= t(".restore_to") %> - <% suggestion = @node.suggested_restore_parent %> + <% suggestion = @node.draft&.parent_node || @node.suggested_restore_parent %> <%= form_tag restore_from_trash_node_path(@node), :method => :put, :class => "aligned_action_row" do %>
<%= text_field_tag :restore_search_term, -- cgit v1.3