From 50ca5e40f461290a2db7452b95f80dd3188dba1d Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 24 Jul 2026 18:04:56 +0200 Subject: Rename layout classes to what they actually do --- app/views/assets/edit.html.erb | 46 +++++----- app/views/assets/new.html.erb | 40 ++++----- app/views/assets/show.html.erb | 44 +++++----- app/views/events/edit.html.erb | 46 +++++----- app/views/events/new.html.erb | 50 +++++------ app/views/events/show.html.erb | 50 +++++------ app/views/menu_items/edit.html.erb | 22 ++--- app/views/menu_items/new.html.erb | 18 ++-- app/views/nodes/edit.html.erb | 42 ++++----- app/views/nodes/new.html.erb | 24 +++--- app/views/nodes/show.html.erb | 138 +++++++++++++++--------------- app/views/otp_challenges/new.html.erb | 6 +- app/views/otp_enrollments/show.html.erb | 10 +-- app/views/page_translations/edit.html.erb | 14 +-- app/views/page_translations/show.html.erb | 24 +++--- app/views/revisions/show.html.erb | 42 ++++----- app/views/sessions/new.html.erb | 10 +-- app/views/users/edit.html.erb | 34 ++++---- app/views/users/new.html.erb | 26 +++--- app/views/users/show.html.erb | 22 ++--- 20 files changed, 354 insertions(+), 354 deletions(-) (limited to 'app/views') diff --git a/app/views/assets/edit.html.erb b/app/views/assets/edit.html.erb index d0a39aa3..46f8ed9f 100644 --- a/app/views/assets/edit.html.erb +++ b/app/views/assets/edit.html.erb @@ -1,34 +1,34 @@ -
+

Editing asset

<%= form_for(@asset, html: { multipart: true }) do |f| %> <%= form_error_messages(f) %>
-
<%= f.label :name %>
-
<%= f.text_field :name %>
+
<%= f.label :name %>
+
<%= f.text_field :name %>
<% if @asset.upload.present? %> -
Current File
-
<%= @asset.upload.url %> (<%= number_to_human_size(@asset.upload.size) %>)
+
Current File
+
<%= @asset.upload.url %> (<%= number_to_human_size(@asset.upload.size) %>)
<% end %> -
<%= f.label :upload, "Replace file" %>
-
+
<%= f.label :upload, "Replace file" %>
+
<%= f.file_field :upload %>

…or drop a file here.

-
<%= f.label :creator %>
-
<%= f.text_field :creator %>
+
<%= f.label :creator %>
+
<%= f.text_field :creator %>
-
<%= f.label :source_url, "Source URL" %>
-
<%= f.text_field :source_url %>
+
<%= f.label :source_url, "Source URL" %>
+
<%= f.text_field :source_url %>
-
<%= f.label :license_key, "License" %>
-
+
<%= f.label :license_key, "License" %>
+
<%= f.select :license_key, options_for_select( [["— none —", ""]] + AssetLicense.keys.map { |key| [t("asset_licenses.#{key}"), key] }, @@ -36,8 +36,8 @@ ) %>
-
attach to page
-
+
attach to page
+
<%= text_field_tag :asset_node_search_term, @attach_node&.title, :placeholder => "Search for a page…", :autocomplete => "off" %> @@ -47,18 +47,18 @@ Optional — attaches this asset to that page, all pending versions included.
-
-
+
+
Applies only if the page has no headline yet.
-
Actions
-
-
-
<%= f.submit 'Update' %>
-
<%= link_to 'Show', @asset %>
-
<%= link_to 'Back', assets_path %>
+
Actions
+
+
+
<%= f.submit 'Update' %>
+
<%= link_to 'Show', @asset %>
+
<%= link_to 'Back', assets_path %>
diff --git a/app/views/assets/new.html.erb b/app/views/assets/new.html.erb index 8a7a6094..7bb8a9ce 100644 --- a/app/views/assets/new.html.erb +++ b/app/views/assets/new.html.erb @@ -1,29 +1,29 @@ -
+

New asset

<%= form_for(@asset, :html => { :multipart => true }) do |f| %> <%= form_error_messages(f) %>
-
<%= f.label :name %>
-
<%= f.text_field :name %>
+
<%= f.label :name %>
+
<%= f.text_field :name %>
-
<%= f.label :upload, "File" %>
-
+
<%= f.label :upload, "File" %>
+
<%= f.file_field :upload %>

…or drop a file here.

-
<%= f.label :creator %>
-
<%= f.text_field :creator %>
+
<%= f.label :creator %>
+
<%= f.text_field :creator %>
-
<%= f.label :source_url, "Source URL" %>
-
<%= f.text_field :source_url %>
+
<%= f.label :source_url, "Source URL" %>
+
<%= f.text_field :source_url %>
-
<%= f.label :license_key, "License" %>
-
+
<%= f.label :license_key, "License" %>
+
<%= f.select :license_key, options_for_select( [["— none —", ""]] + AssetLicense.keys.map { |key| [t("asset_licenses.#{key}"), key] }, @@ -31,8 +31,8 @@ ) %>
-
attach to page
-
+
attach to page
+
<%= text_field_tag :asset_node_search_term, @attach_node&.title, :placeholder => "Search for a page…", :autocomplete => "off" %> @@ -42,17 +42,17 @@ Optional — attaches this asset to that page, all pending versions included.
-
-
+
+
Applies only if the page has no headline yet.
-
Actions
-
-
-
<%= f.submit 'Create' %>
-
<%= link_to 'Back', assets_path %>
+
Actions
+
+
+
<%= f.submit 'Create' %>
+
<%= link_to 'Back', assets_path %>
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb index 122b44e4..4ec77dff 100644 --- a/app/views/assets/show.html.erb +++ b/app/views/assets/show.html.erb @@ -1,16 +1,16 @@ -
+

<%= @asset.name %>

-
Actions
-
-
-
+
Actions
+
+
+
<%= link_to edit_asset_path(@asset), class: 'action_button' do %> <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit <% end %>
-
+
<%= link_to 'Back', assets_path %>
<%= link_to admin_log_path(:asset_id => @asset.id), :class => "action_button" do %> @@ -20,12 +20,12 @@
<% if @asset.has_variant?(:medium) %> -
Thumbnail
-
<%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %>
+
Thumbnail
+
<%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %>
<% end %> -
Attached to
-
+
Attached to
+
<% nodes = @asset.attached_nodes %> <% if nodes.any? %>
    @@ -49,8 +49,8 @@ <% end %>
-
Public Path
-
+
Public Path
+
<% public_path = @asset.upload.url.sub(/\?\d+$/, "") %> <%= link_to public_path, public_path, target: "_blank", rel: "noopener" %>
-
Creator
-
<%= @asset.creator.presence || "—" %>
+
Creator
+
<%= @asset.creator.presence || "—" %>
-
Source
-
+
Source
+
<% if @asset.source_url.present? %> <%= link_to @asset.source_url, @asset.source_url %> <% else %> @@ -72,8 +72,8 @@ <% end %>
-
License
-
+
License
+
<% if (license = AssetLicense.find(@asset.license_key)) %> <%= t("asset_licenses.#{license.key}") %> <% else %> @@ -81,10 +81,10 @@ <% end %>
-
Content Type
-
<%= @asset.upload.content_type %>
+
Content Type
+
<%= @asset.upload.content_type %>
-
Size
-
<%= "#{@asset.upload.size/1024} KB" %>
+
Size
+
<%= "#{@asset.upload.size/1024} KB" %>
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index 4532ff29..5d7f613e 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb @@ -12,10 +12,10 @@ <%= hidden_field_tag :return_to, @return_to %> <%= form_error_messages(f) %> -
+
-
Node
-
+
Node
+
<% if @event.node %> <%= link_to @event.node.title, node_path(@event.node) %>
@@ -32,40 +32,40 @@ <%= f.hidden_field :node_id %>
-
Start time
-
<%= f.datetime_select :start_time %>
+
Start time
+
<%= f.datetime_select :start_time %>
-
End time
-
<%= f.datetime_select :end_time %>
+
End time
+
<%= f.datetime_select :end_time %>
-
Recurrence
-
+
Recurrence
+
<%= render "rrule_builder", f: f %>
-
Title
-
+
Title
+
<%= f.text_field :title %> Optional — if left blank, the associated node's title is used.
-
Tags
-
<%= f.text_field :tag_list %>
+
Tags
+
<%= f.text_field :tag_list %>
-
Allday
-
<%= f.check_box :allday %>
+
Allday
+
<%= f.check_box :allday %>
-
Url
-
<%= f.text_field :url %>
+
Url
+
<%= f.text_field :url %>
-
Latitude
-
<%= f.text_field :latitude %>
+
Latitude
+
<%= f.text_field :latitude %>
-
Longitude
-
<%= f.text_field :longitude %>
+
Longitude
+
<%= f.text_field :longitude %>
-
-
<%= f.submit 'Update' %>
+
+
<%= f.submit 'Update' %>
<% end %> diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index 028fce73..6472f207 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb @@ -5,51 +5,51 @@ <%= form_for(@event) do |f| %> <%= form_error_messages(f) %> -
+
-
Node
-
+
Node
+
<%= text_field_tag :event_node_search_term %>
<%= f.hidden_field :node_id %> Optional — search and pick a node to associate this event with a page.
-
Start time
-
<%= f.datetime_select :start_time %>
+
Start time
+
<%= f.datetime_select :start_time %>
-
End time
-
<%= f.datetime_select :end_time %>
+
End time
+
<%= f.datetime_select :end_time %>
-
Recurrence
-
<%= render "rrule_builder", f: f %>
+
Recurrence
+
<%= render "rrule_builder", f: f %>
-
Title
-
+
Title
+
<%= f.text_field :title %> Optional — if left blank, the associated node's title is used.
-
Tags
-
<%= f.text_field :tag_list %>
+
Tags
+
<%= f.text_field :tag_list %>
-
Allday
-
<%= f.check_box :allday %>
+
Allday
+
<%= f.check_box :allday %>
-
Url
-
<%= f.text_field :url %>
+
Url
+
<%= f.text_field :url %>
-
Latitude
-
<%= f.text_field :latitude %>
+
Latitude
+
<%= f.text_field :latitude %>
-
Longitude
-
<%= f.text_field :longitude %>
+
Longitude
+
<%= f.text_field :longitude %>
-
-
<%= hidden_field_tag :return_to, params[:return_to] %>
+
+
<%= hidden_field_tag :return_to, params[:return_to] %>
-
-
<%= f.submit 'Create' %>
+
+
<%= f.submit 'Create' %>
<% end %> diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index ac084c92..0bf14e8b 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb @@ -1,21 +1,21 @@ -
+

<%= @event.node ? "Event for node #{@event.node.unique_name}" : "Event" %>

-
Actions
-
-
+
Actions
+
+
<% if @event.node %> -
+
<%= link_to 'Node', node_path(@event.node) %>
<% end %> -
+
<%= link_to edit_event_path(@event, return_to: request.path), class: 'action_button' do %> <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit <% end %>
-
+
<%= button_to event_path(@event), method: :delete, form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } do %> <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy <% end %> @@ -23,33 +23,33 @@
-
Start time
-
<%=h @event.start_time %>
+
Start time
+
<%=h @event.start_time %>
-
End time
-
<%=h @event.end_time %>
+
End time
+
<%=h @event.end_time %>
-
Rrule
-
<%=h @event.rrule %>
+
Rrule
+
<%=h @event.rrule %>
<% if (human = @event.humanize_rrule(I18n.locale)) %> -
Recurrence
-
<%= human %>
+
Recurrence
+
<%= human %>
<% end %> -
Tags
-
<%=h @event.tag_list %>
+
Tags
+
<%=h @event.tag_list %>
-
Allday
-
<%=h @event.allday %>
+
Allday
+
<%=h @event.allday %>
-
Url
-
<%=h @event.url %>
+
Url
+
<%=h @event.url %>
-
Latitude
-
<%=h @event.latitude %>
+
Latitude
+
<%=h @event.latitude %>
-
Longitude
-
<%=h @event.longitude %>
+
Longitude
+
<%=h @event.longitude %>
diff --git a/app/views/menu_items/edit.html.erb b/app/views/menu_items/edit.html.erb index 44e5a791..89854c93 100644 --- a/app/views/menu_items/edit.html.erb +++ b/app/views/menu_items/edit.html.erb @@ -1,25 +1,25 @@

Edit Menu Item

-
+
<%= form_for @menu_item do |f| %>
-
Search
-
+
Search
+
<%= text_field_tag :menu_search_term %>
-
Node Id
-
<%= f.text_field :node_id %>
+
Node Id
+
<%= f.text_field :node_id %>
-
Path
-
<%= f.text_field :path %>
+
Path
+
<%= f.text_field :path %>
-
Title
-
<%= f.text_field :title %>
+
Title
+
<%= f.text_field :title %>
-
-
<%= f.submit 'Update' %>
+
+
<%= f.submit 'Update' %>
<% end %>
diff --git a/app/views/menu_items/new.html.erb b/app/views/menu_items/new.html.erb index 89572939..408ba7bd 100644 --- a/app/views/menu_items/new.html.erb +++ b/app/views/menu_items/new.html.erb @@ -1,20 +1,20 @@

Add Menu Item

<%= form_for @menu_item do |f| %> -
Search
-
+
Search
+
<%= text_field_tag :menu_search_term %>
-
Node Id
-
<%= f.text_field :node_id %>
+
Node Id
+
<%= f.text_field :node_id %>
-
Path
-
<%= f.text_field :path %>
+
Path
+
<%= f.text_field :path %>
-
Title
-
<%= f.text_field :title %>
+
Title
+
<%= f.text_field :title %>
-
<%= f.submit 'Create' %>
+
<%= f.submit 'Create' %>
<% end %> diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 55397d42..4d58e62c 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -25,7 +25,7 @@ <%= link_to "Preview ↗", preview_page_path(@page), target: "_blank", rel: "noopener", class: "preview_link" %>
-
+
<%= form_for(@node, html: { data: { autosave_url: autosave_node_path(@node), show_url: node_path(@node) } }) do |f| %> <% if @node.errors.any? %>
@@ -37,14 +37,14 @@
-
Title
-
<%= d.text_field :title %>
+
Title
+
<%= d.text_field :title %>
-
Abstract
-
<%= d.text_area :abstract %>
+
Abstract
+
<%= d.text_area :abstract %>
-
Attachments
-
+
Attachments
+