summaryrefslogtreecommitdiff
path: root/app/views/revisions/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/revisions/index.html.erb')
-rw-r--r--app/views/revisions/index.html.erb36
1 files changed, 18 insertions, 18 deletions
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb
index 7ea74a6c..6bcf1820 100644
--- a/app/views/revisions/index.html.erb
+++ b/app/views/revisions/index.html.erb
@@ -1,12 +1,12 @@
1<h2>Revisions for Node: <%= @node.unique_name %></h2> 1<h2><%= t(".title", :path => @node.unique_name) %></h2>
2 2
3<p class="node_action_bar standalone_action_bar"> 3<p class="node_action_bar standalone_action_bar">
4 <%= link_to 'Back to node', node_path(@node) %> 4 <%= link_to t(".back_to_node"), node_path(@node) %>
5</p> 5</p>
6 6
7<% if Page.non_default_locales.any? %> 7<% if Page.non_default_locales.any? %>
8 <p class="diff_locale_toggle"> 8 <p class="diff_locale_toggle">
9 Locale: 9 <%= t("revisions.locale_label") %>
10 <% ([I18n.default_locale] + Page.non_default_locales).each_with_index do |locale, i| %> 10 <% ([I18n.default_locale] + Page.non_default_locales).each_with_index do |locale, i| %>
11 <%= " &middot; ".html_safe if i > 0 %> 11 <%= " &middot; ".html_safe if i > 0 %>
12 <% if locale == @locale %> 12 <% if locale == @locale %>
@@ -21,25 +21,25 @@
21<table id="revisions" class="revisions_table"> 21<table id="revisions" class="revisions_table">
22 <thead> 22 <thead>
23 <tr class="header"> 23 <tr class="header">
24 <th>First</th> 24 <th><%= t(".first") %></th>
25 <th>Last</th> 25 <th><%= t(".last") %></th>
26 <th>Rev.</th> 26 <th><%= t("admin.columns.rev") %></th>
27 <th>Title</th> 27 <th><%= t("admin.columns.title") %></th>
28 <th>Editor</th> 28 <th><%= t("admin.columns.editor") %></th>
29 <th>Date</th> 29 <th><%= t("admin.columns.date") %></th>
30 <th></th> 30 <th></th>
31 <th></th> 31 <th></th>
32 </tr> 32 </tr>
33 <tr class="no_hover diff_sticky_bar"> 33 <tr class="no_hover diff_sticky_bar">
34 <td colspan="8"> 34 <td colspan="8">
35 <%= button_to 'Diff revisions', diff_node_revisions_path(@node), 35 <%= button_to t(".diff_revisions"), diff_node_revisions_path(@node),
36 method: :post, 36 method: :post,
37 params: { locale: @locale }, 37 params: { locale: @locale },
38 form: { id: 'diff_form', class: 'button_to computation' }, 38 form: { id: 'diff_form', class: 'button_to computation' },
39 disabled: true %> 39 disabled: true %>
40 <span id="diff_selection_label"></span> 40 <span id="diff_selection_label" data-against="<%= t(".against_word") %>" data-selected="<%= t(".selected_word") %>"></span>
41 <label><%= radio_button_tag :view, 'inline', true %> Inline</label> 41 <label><%= radio_button_tag :view, 'inline', true %> <%= t("revisions.inline") %></label>
42 <label><%= radio_button_tag :view, 'side_by_side', false %> Side by side</label> 42 <label><%= radio_button_tag :view, 'side_by_side', false %> <%= t("revisions.side_by_side") %></label>
43 </td> 43 </td>
44 </tr> 44 </tr>
45 </thead> 45 </thead>
@@ -53,11 +53,11 @@
53 <td class="title"><%= page.translations.find_by(:locale => @locale)&.title || "—" %></td> 53 <td class="title"><%= page.translations.find_by(:locale => @locale)&.title || "—" %></td>
54 <td class="user"><%= page.editor.try(:login) %></td> 54 <td class="user"><%= page.editor.try(:login) %></td>
55 <td class="date"><%= page.updated_at %></td> 55 <td class="date"><%= page.updated_at %></td>
56 <td><%= link_to 'show', node_revision_path(@node, page, :locale => @locale) %></td> 56 <td><%= link_to t(".show_link"), node_revision_path(@node, page, :locale => @locale) %></td>
57 <td> 57 <td>
58 <%= button_to 'restore', restore_node_revision_path(@node, page), 58 <%= button_to t(".restore_link"), restore_node_revision_path(@node, page),
59 method: :put, 59 method: :put,
60 form: { data: { confirm: "Restore this revision?" }, class: 'button_to state_changing' } %> 60 form: { data: { confirm: t(".confirm_restore") }, class: 'button_to state_changing' } %>
61 </td> 61 </td>
62 </tr> 62 </tr>
63 <% end %> 63 <% end %>
@@ -73,9 +73,9 @@
73 73
74 var label = document.getElementById('diff_selection_label'); 74 var label = document.getElementById('diff_selection_label');
75 if (start && end) { 75 if (start && end) {
76 label.textContent = start.value + ' against ' + end.value; 76 label.textContent = start.value + ' ' + label.dataset.against + ' ' + end.value;
77 } else if (start || end) { 77 } else if (start || end) {
78 label.textContent = (start || end).value + ' selected'; 78 label.textContent = (start || end).value + ' ' + label.dataset.selected;
79 } else { 79 } else {
80 label.textContent = ''; 80 label.textContent = '';
81 } 81 }