From f93969e772a36b54998496092b54972825a07dd8 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 14 Aug 2026 17:02:30 +0200 Subject: Fold revision metadata into a two-line row Title on the first line, date, revision and editor on the second, with the two actions as an icon grid. Four columns become two, so the table needs no mobile card treatment. --- app/views/revisions/index.html.erb | 138 ++++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 63 deletions(-) (limited to 'app') diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index 4f854518..08273749 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb @@ -1,68 +1,80 @@ -

<%= t(".title", :path => @node.unique_name) %>

+
+

<%= t(".title", :path => @node.unique_name) %>

-

- <%= link_to t(".back_to_node"), node_path(@node) %> -

- -<% if Page.non_default_locales.any? %> -

- <%= t("revisions.locale_label") %> - <% ([I18n.default_locale] + Page.non_default_locales).each_with_index do |locale, i| %> - <%= " · ".html_safe if i > 0 %> - <% if locale == @translation_locale %> - <%= locale.to_s.upcase %> - <% else %> - <%= link_to locale.to_s.upcase, node_revisions_path(@node, :translation_locale => locale) %> - <% end %> - <% end %> +

+ <%= link_to t(".back_to_node"), node_path(@node) %>

-<% end %> - -<% pages = (@pages || @node.pages.all).reverse %> - - - - - - - - - - - - - - - - <% pages.each do |page| %> - - - - - - - - + <% end %> +

<% end %> - -
<%= t("admin.columns.rev") %><%= t("admin.columns.title") %><%= t("admin.columns.editor") %><%= t("admin.columns.date") %>
- <%= form_tag diff_node_revisions_path(@node), :method => :post, - :id => "diff_form", :class => "button_to computation" do %> - <%= hidden_field_tag :translation_locale, @translation_locale %> - <%= hidden_field_tag :start_revision, pages[1]&.revision %> - <%= hidden_field_tag :end_revision, pages[0]&.revision %> - <%= submit_tag t(".diff_revisions") %> - - <%= t(".diff_selection_html", - :from => tag.span(:id => "diff_from"), - :to => tag.span(:id => "diff_to")) %> - - - + <% if Page.non_default_locales.any? %> +

+ <%= t("revisions.locale_label") %> + <% ([I18n.default_locale] + Page.non_default_locales).each_with_index do |locale, i| %> + <%= " · ".html_safe if i > 0 %> + <% if locale == @translation_locale %> + <%= locale.to_s.upcase %> + <% else %> + <%= link_to locale.to_s.upcase, node_revisions_path(@node, :translation_locale => locale) %> <% end %> -

<%= page.revision %><%= page.translations.find_by(:locale => @translation_locale)&.title || "—" %><%= page.editor.try(:login) %><%= admin_datetime(page.updated_at) %><%= link_to t(".show_link"), node_revision_path(@node, page, :translation_locale => @translation_locale) %> - <%= button_to t(".restore_link"), restore_node_revision_path(@node, page), - method: :put, - form: { data: { confirm: t(".confirm_restore") }, class: 'button_to state_changing' } %> -
+ + <% pages = (@pages || @node.pages.all).reverse %> + + + + + + + + + <% pages.each do |page| %> + + + + + <% end %> + +
+ <%= form_tag diff_node_revisions_path(@node), :method => :post, + :id => "diff_form", :class => "button_to computation" do %> + <%= hidden_field_tag :translation_locale, @translation_locale %> + <%= hidden_field_tag :start_revision, pages[1]&.revision %> + <%= hidden_field_tag :end_revision, pages[0]&.revision %> + <%= submit_tag t(".diff_revisions") %> + + <%= t(".diff_selection_html", + :from => tag.span(:id => "diff_from"), + :to => tag.span(:id => "diff_to")) %> + + + + <% end %> +
+
+ <%= page.translations.find_by(:locale => @translation_locale)&.title || "—" %> +
+
+ <%= t(".row_meta", :date => admin_datetime(page.updated_at), + :rev => page.revision, + :editor => page.editor.try(:login) || t("admin.common.unknown")) %> +
+
+
+ + <%= link_to node_revision_path(@node, page, :translation_locale => @translation_locale), + "aria-label" => t(".show_link"), title: t(".show_link") do %> + <%= icon("eye", library: "tabler", "aria-hidden": true) %> + <% end %> + + + <%= button_to restore_node_revision_path(@node, page), method: :put, + form: { data: { confirm: t(".confirm_restore") }, + class: 'button_to state_changing' }, + "aria-label" => t(".restore_link"), title: t(".restore_link") do %> + <%= icon("arrow-back-up", library: "tabler", "aria-hidden": true) %> + <% end %> + +
+
+
-- cgit v1.3