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/assets/edit.html.erb | 18 +++++++++++++++--- app/views/assets/new.html.erb | 16 +++++++++++++++- app/views/assets/show.html.erb | 26 +++++++++++++++++++++++--- 3 files changed, 53 insertions(+), 7 deletions(-) (limited to 'app/views/assets') diff --git a/app/views/assets/edit.html.erb b/app/views/assets/edit.html.erb index 610ae20a..1e4ae8f1 100644 --- a/app/views/assets/edit.html.erb +++ b/app/views/assets/edit.html.erb @@ -4,15 +4,19 @@ <%= form_for(@asset, html: { multipart: true }) do |f| %> <%= form_error_messages(f) %> -
+
<%= f.label :name %>
<%= f.text_field :name %>
+
- <% if @asset.upload.present? %> + <% if @asset.upload.present? %> +
<%= t(".current_file") %>
<%= @asset.upload.url %> (<%= number_to_human_size(@asset.upload.size) %>)
- <% end %> +
+ <% end %> +
<%= f.label :upload, t(".replace_file") %>
@@ -20,13 +24,19 @@

<%= t("assets.form.drop_hint") %>

+
+
<%= f.label :creator %>
<%= f.text_field :creator %>
+
+
<%= f.label :source_url %>
<%= f.text_field :source_url %>
+
+
<%= f.label :license_key %>
<%= f.select :license_key, @@ -35,7 +45,9 @@ @asset.license_key ) %>
+
+
<%= t("admin.columns.actions") %>
diff --git a/app/views/assets/new.html.erb b/app/views/assets/new.html.erb index d3a66524..1260644f 100644 --- a/app/views/assets/new.html.erb +++ b/app/views/assets/new.html.erb @@ -4,10 +4,12 @@ <%= form_for(@asset, :html => { :multipart => true }) do |f| %> <%= form_error_messages(f) %> -
+
<%= f.label :name %>
<%= f.text_field :name %>
+
+
<%= f.label :upload %>
@@ -15,13 +17,19 @@

<%= t("assets.form.drop_hint") %>

+
+
<%= f.label :creator %>
<%= f.text_field :creator %>
+
+
<%= f.label :source_url %>
<%= f.text_field :source_url %>
+
+
<%= f.label :license_key %>
<%= f.select :license_key, @@ -30,7 +38,9 @@ @asset.license_key ) %>
+
+
<%= t("assets.form.attach_to_page") %>
@@ -41,13 +51,17 @@ <%= hidden_field_tag :node_id, @attach_node&.id %> <%= t("assets.form.attach_hint") %>
+
+
<%= t("assets.form.headline_hint") %>
+
+
<%= t("admin.columns.actions") %>
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb index c261e032..5c111c7b 100644 --- a/app/views/assets/show.html.erb +++ b/app/views/assets/show.html.erb @@ -1,7 +1,7 @@

<%= @asset.name %>

-
+
<%= t("admin.columns.actions") %>
@@ -35,12 +35,16 @@
+
- <% if @asset.has_variant?(:medium) %> + <% if @asset.has_variant?(:medium) %> +
<%= t(".thumbnail") %>
<%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %>
- <% end %> +
+ <% end %> +
<%= t(".attached_to") %>
<% nodes = @asset.attached_nodes %> @@ -62,7 +66,9 @@ <%= t(".not_attached") %> <% end %>
+
+
<%= t("assets.form.attach_to_page") %>
<%= form_tag attach_to_node_asset_path(@asset), :class => "asset_attach_form" do %> @@ -78,14 +84,18 @@ <%= t(".attach_hint") %> <% end %>
+
+
<%= t(".new_page") %>
<%= link_to new_node_path(:asset_id => @asset.id), :class => "action_button" do %> <%= icon("file-plus", library: "tabler", "aria-hidden": true) %> <%= t(".new_page_with_attachment") %> <% end %>
+
+
<%= t(".public_path") %>
<% public_path = @asset.upload.url.sub(/\?\d+$/, "") %> @@ -96,10 +106,14 @@ <%= t(".copy_url") %>
+
+
<%= t(".creator") %>
<%= @asset.creator.presence || "—" %>
+
+
<%= t(".source") %>
<% if @asset.source_url.present? %> @@ -108,7 +122,9 @@ — <% end %>
+
+
<%= t(".license") %>
<% if (license = AssetLicense.find(@asset.license_key)) %> @@ -117,10 +133,14 @@ — <% end %>
+
+
<%= t(".content_type") %>
<%= @asset.upload.content_type %>
+
+
<%= t(".size") %>
<%= "#{@asset.upload.size/1024} KB" %>
-- cgit v1.3