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/nodes/new.html.erb | 109 ++++++++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 49 deletions(-) (limited to 'app/views/nodes/new.html.erb') diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index 883909a6..dd7a6051 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb @@ -9,69 +9,80 @@ <%= form_tag nodes_path do %>
-
<%= t(".type") %>
-
- <% CccConventions::NODE_KINDS.each do |kind, config| %> - <% prefix = resolve_kind_text(config[:path_prefix]) %> -

- <%= radio_button_tag :kind, kind, kind == @selected_kind, - data: { path_prefix: prefix } %> - <%= resolve_kind_text(config[:label]) %> - <% if config[:hint] %> - <%= resolve_kind_text(config[:hint]) %> - <% end %> - <% unless current_user.may_change_live_at?(prefix) %> - <%= t(".restricted_kind") %> - <% end %> -

- <% end %> +
+
<%= t(".type") %>
+
+ <% CccConventions::NODE_KINDS.each do |kind, config| %> + <% prefix = resolve_kind_text(config[:path_prefix]) %> +

+ <%= radio_button_tag :kind, kind, kind == @selected_kind, + data: { path_prefix: prefix } %> + <%= resolve_kind_text(config[:label]) %> + <% if config[:hint] %> + <%= resolve_kind_text(config[:hint]) %> + <% end %> + <% unless current_user.may_change_live_at?(prefix) %> + <%= t(".restricted_kind") %> + <% end %> +

+ <% end %> +
-
<%= t("admin.columns.title") %>
-
- <%= text_field_tag :title, nil, required: true %> - <%= t(".slug_hint") %> +
+
<%= t("admin.columns.title") %>
+
+ <%= text_field_tag :title, nil, required: true %> + <%= t(".slug_hint") %> +
"> -
<%= t(".parent") %>
-
- <%= text_field_tag :parent_search_term, @parent&.title %> - <%= hidden_field_tag :parent_id, @parent&.id, data: { unique_name: @parent&.computed_unique_name } %> -
+
+
<%= t(".parent") %>
+
+ <%= text_field_tag :parent_search_term, @parent&.title %> + <%= hidden_field_tag :parent_id, @parent&.id, data: { unique_name: @parent&.computed_unique_name } %> +
+
-
<%= t(".resulting_path") %>
-
- - +
+
<%= t(".resulting_path") %>
+
+ + - <%= t(".path_hint") %> + <%= t(".path_hint") %> +
<% if @attach_asset %> -
<%= t(".attachment") %>
-
-
    -
  • - <% if @attach_asset.has_variant?(:thumb) %> - <%= image_tag @attach_asset.upload.url(:thumb) %> - <% end %> - <%= link_to @attach_asset.name, asset_path(@attach_asset), - :target => "_blank", :rel => "noopener" %> -
  • -
- <%= t(".attach_hint") %> - - <%= hidden_field_tag :asset_id, @attach_asset.id %> +
+
<%= t(".attachment") %>
+
+
    +
  • + <% if @attach_asset.has_variant?(:thumb) %> + <%= image_tag @attach_asset.upload.url(:thumb) %> + <% end %> + <%= link_to @attach_asset.name, asset_path(@attach_asset), + :target => "_blank", :rel => "noopener" %> +
  • +
+ <%= t(".attach_hint") %> + + <%= hidden_field_tag :asset_id, @attach_asset.id %> +
<% end %> -
-
<%= submit_tag t("admin.common.create") %>
- +
+
+
<%= submit_tag t("admin.common.create") %>
+
<% end %> -- cgit v1.3