From 811bb04649365b0faaa00b1e0810bb101a4d19b1 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 26 Jun 2026 13:40:55 +0200 Subject: Stage 5 click-testing fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix link_to :method → button_to for all PUT/DELETE actions - Add button_to CSS reset to admin.css for visual consistency - Fix admin layout: replace broken jquery/jquery_ujs pipeline refs with admin_bundle via sprockets; add sprockets-rails, jquery-ui-rails gems - Add app/assets/javascripts/admin_bundle.js pipeline manifest - Fix event_information helper: use safe_join to avoid double-escaping - Fix nodes_helper: to_s(:db) → to_fs(:db) for event times - Fix revisions view: eliminate nested forms; diff button uses vanilla JS to collect radio button values before POST - Fix config/environments/development.rb and test.rb: cache_classes → enable_reloading - Add routing_filter_rails71_patch.rb version guard - Move LockedByAnotherUser to own file for Zeitwerk autoloading - Fix Globalize fallbacks via config.i18n.fallbacks in application.rb --- app/views/revisions/index.html.erb | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'app/views/revisions') diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index e038ed28..b875a4fa 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb @@ -4,7 +4,6 @@

Revisions for Node: <%= @node.unique_name %>

-<%= form_tag diff_node_revisions_path(@node) do %> @@ -14,6 +13,7 @@ + <% (@pages || @node.pages.all).reverse.each do |page| %> @@ -23,22 +23,36 @@ + - <% end %> - +
FirstEditor Date
<%= page.title %> <%= page.editor.try(:login) %> <%= page.updated_at %><%= link_to 'show', node_revision_path(@node, page) %> - <%= link_to 'show', node_revision_path(@node, page) %> - - <%= link_to( - 'restore', - restore_node_revision_path(@node, page), - :method => :put, - :data => { :confirm => "Restore this revision?" } - ) %> + <%= button_to 'restore', restore_node_revision_path(@node, page), + method: :put, + form: { data: { confirm: "Restore this revision?" } } %>
<%= submit_tag 'Diff revisions' %> + <%= button_to 'Diff revisions', diff_node_revisions_path(@node), + method: :post, + form: { id: 'diff_form' } %> +
-<% end %> + -- cgit v1.3