diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-14 01:22:11 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-14 01:22:11 +0200 |
| commit | 19b865108c26cf18c26697fee080844de94fb522 (patch) | |
| tree | 33af772574dacaa43d5ab0f79a2abc64a7bd9fa5 /app | |
| parent | 45d422f6582ac2ebf455a8c8168738db54a76582 (diff) | |
Scope admin form conventions with a class
.admin_layout replaces the #admin_layout. All css rules and
javascript queries were changed along and rules simplified
where the opportunity arose.
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/assets/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/assets/new.html.erb | 2 | ||||
| -rw-r--r-- | app/views/assets/show.html.erb | 2 | ||||
| -rw-r--r-- | app/views/elevations/new.html.erb | 2 | ||||
| -rw-r--r-- | app/views/events/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/events/new.html.erb | 2 | ||||
| -rw-r--r-- | app/views/events/show.html.erb | 2 | ||||
| -rw-r--r-- | app/views/nodes/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/nodes/show.html.erb | 2 | ||||
| -rw-r--r-- | app/views/otp_challenges/new.html.erb | 2 | ||||
| -rw-r--r-- | app/views/otp_enrollments/show.html.erb | 2 | ||||
| -rw-r--r-- | app/views/page_translations/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/revisions/show.html.erb | 2 | ||||
| -rw-r--r-- | app/views/users/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/users/new.html.erb | 2 | ||||
| -rw-r--r-- | app/views/users/show.html.erb | 2 |
16 files changed, 16 insertions, 16 deletions
diff --git a/app/views/assets/edit.html.erb b/app/views/assets/edit.html.erb index 1e4ae8f1..39490c03 100644 --- a/app/views/assets/edit.html.erb +++ b/app/views/assets/edit.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <div id="admin_layout"> | 1 | <div class="admin_layout"> |
| 2 | <h1><%= t(".title") %></h1> | 2 | <h1><%= t(".title") %></h1> |
| 3 | 3 | ||
| 4 | <%= form_for(@asset, html: { multipart: true }) do |f| %> | 4 | <%= form_for(@asset, html: { multipart: true }) do |f| %> |
diff --git a/app/views/assets/new.html.erb b/app/views/assets/new.html.erb index 1260644f..36f5ab88 100644 --- a/app/views/assets/new.html.erb +++ b/app/views/assets/new.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <div id="admin_layout"> | 1 | <div class="admin_layout"> |
| 2 | <h1><%= t(".title") %></h1> | 2 | <h1><%= t(".title") %></h1> |
| 3 | 3 | ||
| 4 | <%= form_for(@asset, :html => { :multipart => true }) do |f| %> | 4 | <%= form_for(@asset, :html => { :multipart => true }) do |f| %> |
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb index 5c111c7b..ee990bdb 100644 --- a/app/views/assets/show.html.erb +++ b/app/views/assets/show.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <div id="admin_layout"> | 1 | <div class="admin_layout"> |
| 2 | <h1><%= @asset.name %></h1> | 2 | <h1><%= @asset.name %></h1> |
| 3 | 3 | ||
| 4 | <div class="layout_row"> | 4 | <div class="layout_row"> |
diff --git a/app/views/elevations/new.html.erb b/app/views/elevations/new.html.erb index 084fb9e4..8dd64e78 100644 --- a/app/views/elevations/new.html.erb +++ b/app/views/elevations/new.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <h1><%= t(".title") %></h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <div id="admin_layout"> | 3 | <div class="admin_layout"> |
| 4 | <% if current_user.otp_enrolled? %> | 4 | <% if current_user.otp_enrolled? %> |
| 5 | <p class="field_hint"> | 5 | <p class="field_hint"> |
| 6 | <%= t(".hint", :minutes => AuthenticatedSystem::ELEVATION_MAX_AGE.in_minutes.to_i) %> | 6 | <%= t(".hint", :minutes => AuthenticatedSystem::ELEVATION_MAX_AGE.in_minutes.to_i) %> |
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index 7c855760..55e0d4ba 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | <%= hidden_field_tag :return_to, @return_to %> | 12 | <%= hidden_field_tag :return_to, @return_to %> |
| 13 | <%= form_error_messages(f) %> | 13 | <%= form_error_messages(f) %> |
| 14 | 14 | ||
| 15 | <div id="admin_layout"> | 15 | <div class="admin_layout"> |
| 16 | <div class="layout_row"> | 16 | <div class="layout_row"> |
| 17 | <div class="layout_row_label"><%= Event.human_attribute_name(:node) %> </div> | 17 | <div class="layout_row_label"><%= Event.human_attribute_name(:node) %> </div> |
| 18 | <div class="layout_row_content"> | 18 | <div class="layout_row_content"> |
diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index 5cc47b69..e5aea87b 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | <%= form_for(@event) do |f| %> | 5 | <%= form_for(@event) do |f| %> |
| 6 | <%= form_error_messages(f) %> | 6 | <%= form_error_messages(f) %> |
| 7 | 7 | ||
| 8 | <div id="admin_layout"> | 8 | <div class="admin_layout"> |
| 9 | <div class="layout_row"> | 9 | <div class="layout_row"> |
| 10 | <div class="layout_row_label"><%= Event.human_attribute_name(:node) %></div> | 10 | <div class="layout_row_label"><%= Event.human_attribute_name(:node) %></div> |
| 11 | <div class="layout_row_content"> | 11 | <div class="layout_row_content"> |
diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index 2f3d315d..0d91f850 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <div id="admin_layout" class="show_node"> | 1 | <div class="admin_layout show_node"> |
| 2 | <h1><%= @event.node ? t(".title_for_node", :path => @event.node.unique_name) : t(".title") %></h1> | 2 | <h1><%= @event.node ? t(".title_for_node", :path => @event.node.unique_name) : t(".title") %></h1> |
| 3 | 3 | ||
| 4 | <div class="layout_row"> | 4 | <div class="layout_row"> |
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index d19fdd95..269e0e49 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <h1><%= title_for_node(@node) %></h1> | 1 | <h1><%= title_for_node(@node) %></h1> |
| 2 | 2 | ||
| 3 | <div id="admin_layout"> | 3 | <div class="admin_layout"> |
| 4 | <div class="node_action_bar"> | 4 | <div class="node_action_bar"> |
| 5 | <%= button_to t(".unlock_back"), unlock_node_path(@node), method: :put, | 5 | <%= button_to t(".unlock_back"), unlock_node_path(@node), method: :put, |
| 6 | form: { class: 'button_to state_changing' }, | 6 | form: { class: 'button_to state_changing' }, |
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index af55d699..cf1d79c1 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <% locked_by_other = @node.locked? && @node.lock_owner != current_user %> | 1 | <% locked_by_other = @node.locked? && @node.lock_owner != current_user %> |
| 2 | <% may_change_live = current_user.may_change_live?(@node) %> | 2 | <% may_change_live = current_user.may_change_live?(@node) %> |
| 3 | <div id="admin_layout" class="show_node"> | 3 | <div class="admin_layout show_node"> |
| 4 | <h1><%= title_for_node(@node) %> <small>(<%= I18n.default_locale.to_s.upcase %>)</small></h1> | 4 | <h1><%= title_for_node(@node) %> <small>(<%= I18n.default_locale.to_s.upcase %>)</small></h1> |
| 5 | 5 | ||
| 6 | <div class="layout_row"> | 6 | <div class="layout_row"> |
diff --git a/app/views/otp_challenges/new.html.erb b/app/views/otp_challenges/new.html.erb index 798fc024..8247b262 100644 --- a/app/views/otp_challenges/new.html.erb +++ b/app/views/otp_challenges/new.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <h1><%= t(".title") %></h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <div id="admin_layout"> | 3 | <div class="admin_layout"> |
| 4 | <div class="layout_row"> | 4 | <div class="layout_row"> |
| 5 | <div class="layout_row_label"> <%= t(".code") %> </div> | 5 | <div class="layout_row_label"> <%= t(".code") %> </div> |
| 6 | <div class="layout_row_content"> | 6 | <div class="layout_row_content"> |
diff --git a/app/views/otp_enrollments/show.html.erb b/app/views/otp_enrollments/show.html.erb index 03405d5f..16addb5b 100644 --- a/app/views/otp_enrollments/show.html.erb +++ b/app/views/otp_enrollments/show.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <h1><%= t(".title") %></h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <div id="admin_layout"> | 3 | <div class="admin_layout"> |
| 4 | <div class="layout_row"> | 4 | <div class="layout_row"> |
| 5 | <div class="layout_row_label"><%= t(".scan") %></div> | 5 | <div class="layout_row_label"><%= t(".scan") %></div> |
| 6 | <div class="layout_row_content"> | 6 | <div class="layout_row_content"> |
diff --git a/app/views/page_translations/edit.html.erb b/app/views/page_translations/edit.html.erb index 3a4c8659..0172a501 100644 --- a/app/views/page_translations/edit.html.erb +++ b/app/views/page_translations/edit.html.erb | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | <%= link_to t("nodes.edit.preview"), preview_page_path(@page, :locale => @locale), target: "_blank", rel: "noopener", class: "preview_link" %> | 17 | <%= link_to t("nodes.edit.preview"), preview_page_path(@page, :locale => @locale), target: "_blank", rel: "noopener", class: "preview_link" %> |
| 18 | </div> | 18 | </div> |
| 19 | 19 | ||
| 20 | <div id="admin_layout"> | 20 | <div class="admin_layout"> |
| 21 | <ul id="related_asset_list" style="display:none"> | 21 | <ul id="related_asset_list" style="display:none"> |
| 22 | <% @page.related_assets.includes(:asset).each do |related| %> | 22 | <% @page.related_assets.includes(:asset).each do |related| %> |
| 23 | <li data-large-url="<%= related.asset.upload.url(:large) %>" | 23 | <li data-large-url="<%= related.asset.upload.url(:large) %>" |
diff --git a/app/views/revisions/show.html.erb b/app/views/revisions/show.html.erb index a898b7e6..a2f276bc 100644 --- a/app/views/revisions/show.html.erb +++ b/app/views/revisions/show.html.erb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | <% translation = @page.translations.find_by(:locale => @translation_locale) %> | 1 | <% translation = @page.translations.find_by(:locale => @translation_locale) %> |
| 2 | <div id="admin_layout" class="show_node"> | 2 | <div class="admin_layout show_node"> |
| 3 | <h1><%= t(".title", :rev => @page.revision) %>: <%= translation&.title %> <small>(<%= @translation_locale.to_s.upcase %>)</small></h1> | 3 | <h1><%= t(".title", :rev => @page.revision) %>: <%= translation&.title %> <small>(<%= @translation_locale.to_s.upcase %>)</small></h1> |
| 4 | 4 | ||
| 5 | <div class="layout_row"> | 5 | <div class="layout_row"> |
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 8a5900ce..2cf5a07c 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <div id="admin_layout"> | 1 | <div class="admin_layout"> |
| 2 | <h1><%= @user == current_user ? t(".my_account") : t(".edit_user", :login => @user.login) %></h1> | 2 | <h1><%= @user == current_user ? t(".my_account") : t(".edit_user", :login => @user.login) %></h1> |
| 3 | 3 | ||
| 4 | <% if @user.errors.any? %> | 4 | <% if @user.errors.any? %> |
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 13a238b5..a770b9a7 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | </div> | 6 | </div> |
| 7 | <% end %> | 7 | <% end %> |
| 8 | 8 | ||
| 9 | <div id="admin_layout"> | 9 | <div class="admin_layout"> |
| 10 | <%= form_for @user do |f| %> | 10 | <%= form_for @user do |f| %> |
| 11 | <div class="layout_row"> | 11 | <div class="layout_row"> |
| 12 | <div class="layout_row_label"><%= t("users.labels.login") %></div> | 12 | <div class="layout_row_label"><%= t("users.labels.login") %></div> |
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 9879e171..48c37ffb 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <div id="admin_layout"> | 1 | <div class="admin_layout"> |
| 2 | <h1><%= @user.login %></h1> | 2 | <h1><%= @user.login %></h1> |
| 3 | 3 | ||
| 4 | <div class="layout_row"> | 4 | <div class="layout_row"> |
