From 862edbf4d5fdb9a88f84bfa1d51ab8cc83896094 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 13 Aug 2026 01:11:29 +0200 Subject: Give every admin page one horizontal gutter by many views inside. The inner ones are gone nodes#edit's becomes #body_field, which is what #edit_grid places in its full-width row. Rows now reach into the label band themselves rather than depending on a page wrapper to do it. The label column plus its gap equals the escape, so a row's content starts at the gutter on every page; #edit_grid's rows are exempt because the grid already steps back. share one left edge. #new_node's -118px was compensating for that 10px and left the page 7px out once it went. standalone_action_bar was overridden everywhere it appeared. page_translations#edit no longer uses #edit_grid: it has no metadata column, so the two-column template pushed its abstract into the empty half. nodes#edit's lower action bar was inside #edit_grid, so it was a grid item inheriting the escape and sat 125px left of the form above it. --- app/views/menu_items/_title_fields.html.erb | 16 ++++++++------- app/views/menu_items/edit.html.erb | 30 +++++++++++++++++------------ app/views/menu_items/new.html.erb | 27 +++++++++++++++++--------- 3 files changed, 45 insertions(+), 28 deletions(-) (limited to 'app/views/menu_items') diff --git a/app/views/menu_items/_title_fields.html.erb b/app/views/menu_items/_title_fields.html.erb index 81ec4ad6..daf449cf 100644 --- a/app/views/menu_items/_title_fields.html.erb +++ b/app/views/menu_items/_title_fields.html.erb @@ -1,10 +1,12 @@ <% (I18n.available_locales - [:root]).each do |locale| %> -
- <%= MenuItem.human_attribute_name(:title) %> <%= locale.to_s.upcase %> -
-
- <%= text_field_tag "menu_item[titles][#{locale}]", - menu_item.translations.find_by(:locale => locale)&.title, - :placeholder => (locale == I18n.default_locale ? nil : t(".falls_back")) %> +
+
+ <%= MenuItem.human_attribute_name(:title) %> <%= locale.to_s.upcase %> +
+
+ <%= text_field_tag "menu_item[titles][#{locale}]", + menu_item.translations.find_by(:locale => locale)&.title, + :placeholder => (locale == I18n.default_locale ? nil : t(".falls_back")) %> +
<% end %> diff --git a/app/views/menu_items/edit.html.erb b/app/views/menu_items/edit.html.erb index 2bd65575..92e358d6 100644 --- a/app/views/menu_items/edit.html.erb +++ b/app/views/menu_items/edit.html.erb @@ -2,23 +2,29 @@
<%= form_for @menu_item do |f| %> -
-
<%= t("admin.common.search") %>
-
- <%= text_field_tag :menu_search_term %> - +
+
<%= t("admin.common.search") %>
+
+ <%= text_field_tag :menu_search_term %> + +
-
<%= MenuItem.human_attribute_name(:node_id) %>
-
<%= f.text_field :node_id %>
+
+
<%= MenuItem.human_attribute_name(:node_id) %>
+
<%= f.text_field :node_id %>
+
-
<%= MenuItem.human_attribute_name(:path) %>
-
<%= f.text_field :path %>
+
+
<%= MenuItem.human_attribute_name(:path) %>
+
<%= f.text_field :path %>
+
<%= render "title_fields", :menu_item => @menu_item %> -
-
<%= f.submit t("admin.common.update") %>
+
+
+
<%= f.submit t("admin.common.update") %>
+
<% end %> -
diff --git a/app/views/menu_items/new.html.erb b/app/views/menu_items/new.html.erb index 08872ec0..047a5a25 100644 --- a/app/views/menu_items/new.html.erb +++ b/app/views/menu_items/new.html.erb @@ -1,19 +1,28 @@

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

<%= form_for @menu_item do |f| %> -
<%= t("admin.common.search") %>
-
- <%= text_field_tag :menu_search_term %> - +
+
<%= t("admin.common.search") %>
+
+ <%= text_field_tag :menu_search_term %> + +
-
<%= MenuItem.human_attribute_name(:node_id) %>
-
<%= f.text_field :node_id %>
+
+
<%= MenuItem.human_attribute_name(:node_id) %>
+
<%= f.text_field :node_id %>
+
-
<%= MenuItem.human_attribute_name(:path) %>
-
<%= f.text_field :path %>
+
+
<%= MenuItem.human_attribute_name(:path) %>
+
<%= f.text_field :path %>
+
<%= render "title_fields", :menu_item => @menu_item %> -
<%= f.submit t("admin.common.create") %>
+
+
+
<%= f.submit t("admin.common.create") %>
+
<% end %> -- cgit v1.3