From 88ebeaac7fcf140cbab489e841bf9c197f84c4ea Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 14 Jul 2026 02:17:04 +0200 Subject: Make revisions locale aware --- app/views/revisions/show.html.erb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'app/views/revisions/show.html.erb') diff --git a/app/views/revisions/show.html.erb b/app/views/revisions/show.html.erb index 92d959b4..74fb51fb 100644 --- a/app/views/revisions/show.html.erb +++ b/app/views/revisions/show.html.erb @@ -1,12 +1,13 @@ +<% translation = @page.translations.find_by(:locale => @locale) %>
-

Revision <%= @page.revision %>: <%= @page.title %>

+

Revision <%= @page.revision %>: <%= translation&.title %> (<%= @locale.to_s.upcase %>)

Actions
- <%= link_to 'Show all revisions', node_revisions_path(@node) %> + <%= link_to 'Show all revisions', node_revisions_path(@node, :locale => @locale) %>
@@ -27,12 +28,12 @@
<%= @page.published_at %>
Title
-
<%= @page.title %>
+
<%= translation&.title %>
Abstract
-
<%= @page.abstract %>
+
<%= translation&.abstract %>
Body
-
<%= raw @page.body %>
+
<%= raw translation&.body %>
-- cgit v1.3