summaryrefslogtreecommitdiff
path: root/app/views/nodes/show.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/nodes/show.html.erb')
-rw-r--r--app/views/nodes/show.html.erb148
1 files changed, 73 insertions, 75 deletions
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb
index e37f5034..a337b555 100644
--- a/app/views/nodes/show.html.erb
+++ b/app/views/nodes/show.html.erb
@@ -2,24 +2,24 @@
2<div id="admin_layout" class="show_node"> 2<div id="admin_layout" class="show_node">
3 <h1><%= title_for_node(@node) %> <small>(<%= I18n.default_locale.to_s.upcase %>)</small></h1> 3 <h1><%= title_for_node(@node) %> <small>(<%= I18n.default_locale.to_s.upcase %>)</small></h1>
4 <div id="content"> 4 <div id="content">
5 <div class="layout_row_label">Status</div> 5 <div class="layout_row_label"><%= t(".status") %></div>
6 <div class="layout_row_content info_group node_status"> 6 <div class="layout_row_content info_group node_status">
7 <div class="info_group_items"> 7 <div class="info_group_items">
8 <div class="info_item"> 8 <div class="info_item">
9 <span class="info_label">Head</span> 9 <span class="info_label"><%= t(".head") %></span>
10 <%= @node.head ? "#{@node.head.title} (rev #{@node.head.revision}, #{@node.head.updated_at})" : "none — never published" %> 10 <%= @node.head ? t(".head_line", :title => @node.head.title, :rev => @node.head.revision, :time => @node.head.updated_at) : t(".never_published") %>
11 </div> 11 </div>
12 <div class="info_item"> 12 <div class="info_item">
13 <span class="info_label">Draft</span> 13 <span class="info_label"><%= t(".draft") %></span>
14 <%= @node.draft ? "#{@node.draft.title} (rev #{@node.draft.revision}, saved #{@node.draft.updated_at})" : "none" %> 14 <%= @node.draft ? t(".draft_line", :title => @node.draft.title, :rev => @node.draft.revision, :time => @node.draft.updated_at) : t(".none") %>
15 </div> 15 </div>
16 <div class="info_item"> 16 <div class="info_item">
17 <span class="info_label">Autosave</span> 17 <span class="info_label"><%= t(".autosave") %></span>
18 <%= @node.autosave ? "#{@node.autosave.title} (unsaved, #{@node.autosave.updated_at})" : "none" %> 18 <%= @node.autosave ? t(".autosave_line", :title => @node.autosave.title, :time => @node.autosave.updated_at) : t(".none") %>
19 </div> 19 </div>
20 </div> 20 </div>
21 21
22 <% edit_label = @node.autosave ? "Continue Editing" : (@node.draft ? "Edit Draft" : "Edit") %> 22 <% edit_label = @node.autosave ? t(".continue_editing") : (@node.draft ? t(".edit_draft") : t(".lock_edit")) %>
23 <div class="info_group_items"> 23 <div class="info_group_items">
24 <div class="info_item"> 24 <div class="info_item">
25 <% if locked_by_other %> 25 <% if locked_by_other %>
@@ -27,17 +27,17 @@
27 <% else %> 27 <% else %>
28 <%= link_to edit_node_path(@node), class: "action_button" do %> 28 <%= link_to edit_node_path(@node), class: "action_button" do %>
29 <%= icon("edit", library: "tabler", "aria-hidden": true) %> 29 <%= icon("edit", library: "tabler", "aria-hidden": true) %>
30 <%= @node.autosave ? "Continue Editing" : (@node.draft ? "Edit Draft" : "Lock + Edit") %> 30 <%= edit_label %>
31 <% end %> 31 <% end %>
32 <% if !@node.draft && !@node.autosave %> 32 <% if !@node.draft && !@node.autosave %>
33 <span class="field_hint">Nothing pending — this will start a fresh draft.</span> 33 <span class="field_hint"><%= t(".fresh_draft_hint") %></span>
34 <% end %> 34 <% end %>
35 <% end %> 35 <% end %>
36 </div> 36 </div>
37 37
38 <% @node.available_layer_pairs.each do |pair| %> 38 <% @node.available_layer_pairs.each do |pair| %>
39 <div class="info_item"> 39 <div class="info_item">
40 <%= button_to "Diff #{pair.first.to_s.capitalize} vs. #{pair.last.to_s.capitalize}", 40 <%= button_to t(".diff_layers", :from => t(".layer_#{pair.first}"), :to => t(".layer_#{pair.last}")),
41 diff_node_revisions_path(@node), 41 diff_node_revisions_path(@node),
42 method: :get, 42 method: :get,
43 params: { start_revision: pair.first, end_revision: pair.last }, 43 params: { start_revision: pair.first, end_revision: pair.last },
@@ -48,26 +48,26 @@
48 <% unless locked_by_other %> 48 <% unless locked_by_other %>
49 <% if @node.draft && !@node.autosave && !@node.in_trash? && !@node.trash_node? %> 49 <% if @node.draft && !@node.autosave && !@node.in_trash? && !@node.trash_node? %>
50 <div class="info_item"> 50 <div class="info_item">
51 <%= button_to 'Publish', publish_node_path(@node), method: :put, 51 <%= button_to t(".publish"), publish_node_path(@node), method: :put,
52 form: { data: { confirm: "Publish this draft?" }, class: 'button_to state_changing' } %> 52 form: { data: { confirm: t(".confirm_publish") }, class: 'button_to state_changing' } %>
53 </div> 53 </div>
54 <% end %> 54 <% end %>
55 <% if @node.autosave || (@node.draft && @node.head) %> 55 <% if @node.autosave || (@node.draft && @node.head) %>
56 <div class="info_item"> 56 <div class="info_item">
57 <%= button_to revert_node_path(@node), method: :put, 57 <%= button_to revert_node_path(@node), method: :put,
58 params: { return_to: request.path }, 58 params: { return_to: request.path },
59 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } do %> 59 form: { data: { confirm: t("admin.common.confirm_irreversible") }, class: 'button_to destructive' } do %>
60 <%= icon("trash", library: "tabler", "aria-hidden": true) %> 60 <%= icon("trash", library: "tabler", "aria-hidden": true) %>
61 <%= @node.draft && !@node.autosave ? "Destroy Draft" : "Discard Autosave" %> 61 <%= @node.draft && !@node.autosave ? t(".destroy_draft") : t(".discard_autosave") %>
62 <% end %> 62 <% end %>
63 </div> 63 </div>
64 <% end %> 64 <% end %>
65 <% unless @node.trash_node? || @node.in_trash? || @node.root? %> 65 <% unless @node.trash_node? || @node.in_trash? || @node.root? %>
66 <div class="info_item"> 66 <div class="info_item">
67 <%= button_to trash_node_path(@node), method: :put, 67 <%= button_to trash_node_path(@node), method: :put,
68 form: { data: { confirm: "Move this page and everything beneath it to the Trash? All published content in it will go offline." }, class: 'button_to destructive' } do %> 68 form: { data: { confirm: t(".confirm_trash") }, class: 'button_to destructive' } do %>
69 <%= icon("trash", library: "tabler", "aria-hidden": true) %> 69 <%= icon("trash", library: "tabler", "aria-hidden": true) %>
70 Move to Trash 70 <%= t(".move_to_trash") %>
71 <% end %> 71 <% end %>
72 </div> 72 </div>
73 <% end %> 73 <% end %>
@@ -75,79 +75,77 @@
75 </div> 75 </div>
76 76
77 <% if locked_by_other %> 77 <% if locked_by_other %>
78 <span class="field_hint">Locked — see People below to unlock before editing, publishing, or discarding.</span> 78 <span class="field_hint"><%= t(".locked_hint") %></span>
79 <% end %> 79 <% end %>
80 </div> 80 </div>
81 81
82 <% if @node.in_trash? %> 82 <% if @node.in_trash? %>
83 <div class="layout_row_label">Trash</div> 83 <div class="layout_row_label"><%= t(".trash") %></div>
84 <div class="layout_row_content info_group"> 84 <div class="layout_row_content info_group">
85 <div class="info_group_items"> 85 <div class="info_group_items">
86 <% if (entry = @node.last_trash_entry) && entry.metadata.dig("path", "from") %> 86 <% if (entry = @node.last_trash_entry) && entry.metadata.dig("path", "from") %>
87 <div class="info_item"> 87 <div class="info_item">
88 <span class="info_label">Was at</span> 88 <span class="info_label"><%= t(".was_at") %></span>
89 <%= entry.metadata.dig("path", "from") %> 89 <%= entry.metadata.dig("path", "from") %>
90 </div> 90 </div>
91 <% end %> 91 <% end %>
92 <div class="info_item"> 92 <div class="info_item">
93 <span class="info_label">Restore to</span> 93 <span class="info_label"><%= t(".restore_to") %></span>
94 <% suggestion = @node.suggested_restore_parent %> 94 <% suggestion = @node.suggested_restore_parent %>
95 <%= form_tag restore_from_trash_node_path(@node), :method => :put, :class => "aligned_action_row" do %> 95 <%= form_tag restore_from_trash_node_path(@node), :method => :put, :class => "aligned_action_row" do %>
96 <div class="restore_picker"> 96 <div class="restore_picker">
97 <%= text_field_tag :restore_search_term, 97 <%= text_field_tag :restore_search_term,
98 suggestion && (suggestion.head&.title || suggestion.draft&.title || suggestion.slug), 98 suggestion && (suggestion.head&.title || suggestion.draft&.title || suggestion.slug),
99 :placeholder => "Search for a new parent…" %> 99 :placeholder => t(".restore_placeholder") %>
100 <div id="restore_search_results" class="search_results"></div> 100 <div id="restore_search_results" class="search_results"></div>
101 </div> 101 </div>
102 <%= hidden_field_tag :parent_id, suggestion&.id %> 102 <%= hidden_field_tag :parent_id, suggestion&.id %>
103 <%= submit_tag "Restore here", :class => "action_button action_button_no_margin_top" %> 103 <%= submit_tag t(".restore_here"), :class => "action_button action_button_no_margin_top" %>
104 <% end %> 104 <% end %>
105 <span class="field_hint">Restored pages come back unpublished. Republish each page deliberately.</span> 105 <span class="field_hint"><%= t(".restore_hint") %></span>
106 </div> 106 </div>
107 </div> 107 </div>
108 <div class="info_group_items"> 108 <div class="info_group_items">
109 <div class="info_item"> 109 <div class="info_item">
110 <% doomed_below = @node.descendants.count %> 110 <% doomed_below = @node.descendants.count %>
111 <%= button_to node_path(@node), method: :delete, 111 <%= button_to node_path(@node), method: :delete,
112 form: { data: { confirm: doomed_below > 0 ? 112 form: { data: { confirm: t(".confirm_delete", :count => doomed_below) },
113 "Delete this page and the #{doomed_below} pages beneath it permanently? This cannot be undone." :
114 "Delete this page permanently? This cannot be undone." },
115 class: 'button_to destructive' } do %> 113 class: 'button_to destructive' } do %>
116 <%= icon("trash-x", library: "tabler", "aria-hidden": true) %> 114 <%= icon("trash-x", library: "tabler", "aria-hidden": true) %>
117 Delete permanently<%= " (including #{doomed_below} beneath)" if doomed_below > 0 %> 115 <%= t(".delete_permanently") %><%= " " + t(".including_beneath", :count => doomed_below) if doomed_below > 0 %>
118 <% end %> 116 <% end %>
119 </div> 117 </div>
120 </div> 118 </div>
121 </div> 119 </div>
122 <% end %> 120 <% end %>
123 121
124 <div class="layout_row_label">Translations</div> 122 <div class="layout_row_label"><%= t(".translations") %></div>
125 <div class="layout_row_content info_group"> 123 <div class="layout_row_content info_group">
126 <div class="info_group_items"> 124 <div class="info_group_items">
127 <% @translations.each do |t| %> 125 <% @translations.each do |translation| %>
128 <div class="info_item"> 126 <div class="info_item">
129 <span class="info_label"><%= t[:locale].to_s.upcase %></span> 127 <span class="info_label"><%= translation[:locale].to_s.upcase %></span>
130 <div class="aligned_action_row"> 128 <div class="aligned_action_row">
131 <% if t[:exists] %> 129 <% if translation[:exists] %>
132 <%= link_to t[:title], node_translation_path(@node, t[:locale]) %> — updated <%= t[:updated_at] %> 130 <%= link_to translation[:title], node_translation_path(@node, translation[:locale]) %> <%= t(".updated", :time => translation[:updated_at]) %>
133 <% if t[:outdated] %> 131 <% if translation[:outdated] %>
134 <span class="warning">may be outdated</span> 132 <span class="warning"><%= t(".may_be_outdated") %></span>
135 <% end %> 133 <% end %>
136 <% else %> 134 <% else %>
137 <span class="field_hint">Not yet translated.</span> 135 <span class="field_hint"><%= t(".not_yet_translated") %></span>
138 <% end %> 136 <% end %>
139 <% if locked_by_other %> 137 <% if locked_by_other %>
140 <span class="disabled_action"><%= t[:exists] ? "Lock + Edit" : "Create translation + Lock" %></span> 138 <span class="disabled_action"><%= translation[:exists] ? t(".lock_edit") : t(".create_translation") %></span>
141 <% else %> 139 <% else %>
142 <%= link_to edit_node_translation_path(@node, t[:locale]), class: "action_button" do %> 140 <%= link_to edit_node_translation_path(@node, translation[:locale]), class: "action_button" do %>
143 <%= icon(t[:exists] ? "edit" : "language", library: "tabler", "aria-hidden": true) %> 141 <%= icon(translation[:exists] ? "edit" : "language", library: "tabler", "aria-hidden": true) %>
144 <%= t[:exists] ? "Lock + Edit" : "Create translation + Lock" %> 142 <%= translation[:exists] ? t(".lock_edit") : t(".create_translation") %>
145 <% end %> 143 <% end %>
146 <% if t[:exists] %> 144 <% if translation[:exists] %>
147 <%= button_to node_translation_path(@node, t[:locale]), method: :delete, 145 <%= button_to node_translation_path(@node, translation[:locale]), method: :delete,
148 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } do %> 146 form: { data: { confirm: t("admin.common.confirm_irreversible") }, class: 'button_to destructive' } do %>
149 <%= icon("trash", library: "tabler", "aria-hidden": true) %> 147 <%= icon("trash", library: "tabler", "aria-hidden": true) %>
150 Destroy Translation 148 <%= t(".destroy_translation") %>
151 <% end %> 149 <% end %>
152 <% end %> 150 <% end %>
153 <% end %> 151 <% end %>
@@ -157,20 +155,20 @@
157 </div> 155 </div>
158 </div> 156 </div>
159 157
160 <div class="layout_row_label">People</div> 158 <div class="layout_row_label"><%= t(".people") %></div>
161 <div class="layout_row_content info_group"> 159 <div class="layout_row_content info_group">
162 <div class="info_group_items"> 160 <div class="info_group_items">
163 <div class="info_item"> 161 <div class="info_item">
164 <span class="info_label">Author</span> 162 <span class="info_label"><%= t(".author") %></span>
165 <%= @page.user.try(:login) %> 163 <%= @page.user.try(:login) %>
166 </div> 164 </div>
167 <div class="info_item"> 165 <div class="info_item">
168 <span class="info_label">Editor</span> 166 <span class="info_label"><%= t(".editor") %></span>
169 <%= @page.editor.try(:login) %> 167 <%= @page.editor.try(:login) %>
170 </div> 168 </div>
171 <% if @node.locked? %> 169 <% if @node.locked? %>
172 <div class="info_item"> 170 <div class="info_item">
173 <span class="info_label">Locked by</span> 171 <span class="info_label"><%= t("admin.columns.locked_by") %></span>
174 <span class="warning"><%= @node.lock_owner.login %></span> 172 <span class="warning"><%= @node.lock_owner.login %></span>
175 <%= unlock_link %> 173 <%= unlock_link %>
176 </div> 174 </div>
@@ -178,54 +176,54 @@
178 </div> 176 </div>
179 </div> 177 </div>
180 178
181 <div class="layout_row_label">Dates</div> 179 <div class="layout_row_label"><%= t(".dates") %></div>
182 <div class="layout_row_content info_group"> 180 <div class="layout_row_content info_group">
183 <div class="info_group_items"> 181 <div class="info_group_items">
184 <div class="info_item"> 182 <div class="info_item">
185 <span class="info_label">Last updated</span> 183 <span class="info_label"><%= t(".last_updated") %></span>
186 <%= @page.updated_at %> 184 <%= @page.updated_at %>
187 </div> 185 </div>
188 <% if @page.published_at.present? %> 186 <% if @page.published_at.present? %>
189 <div class="info_item"> 187 <div class="info_item">
190 <span class="info_label"><%= @page.public? ? 'Published at' : 'Will publish at' %></span> 188 <span class="info_label"><%= @page.public? ? t(".published_at") : t(".will_publish_at") %></span>
191 <%= @page.published_at %> 189 <%= @page.published_at %>
192 </div> 190 </div>
193 <% end %> 191 <% end %>
194 </div> 192 </div>
195 </div> 193 </div>
196 194
197 <div class="layout_row_label">Links</div> 195 <div class="layout_row_label"><%= t(".links") %></div>
198 <div class="layout_row_content info_group"> 196 <div class="layout_row_content info_group">
199 <div class="info_group_items"> 197 <div class="info_group_items">
200 <div class="info_item"> 198 <div class="info_item">
201 <span class="info_label">Public</span> 199 <span class="info_label"><%= t(".public") %></span>
202 <%= link_to @page.public_link, content_url(@node.unique_path) %> 200 <%= link_to @page.public_link, content_url(@node.unique_path) %>
203 </div> 201 </div>
204 <% if @node.draft %> 202 <% if @node.draft %>
205 <div class="info_item"> 203 <div class="info_item">
206 <span class="info_label">Admin Preview</span> 204 <span class="info_label"><%= t(".admin_preview") %></span>
207 <%= link_to preview_page_path(@node.draft), preview_page_path(@node.draft) %> 205 <%= link_to preview_page_path(@node.draft), preview_page_path(@node.draft) %>
208 </div> 206 </div>
209 <div class="info_item"> 207 <div class="info_item">
210 <span class="info_label">Public Preview</span> 208 <span class="info_label"><%= t(".public_preview") %></span>
211 <% if @node.draft.preview_token.present? %> 209 <% if @node.draft.preview_token.present? %>
212 <div class="aligned_action_row"> 210 <div class="aligned_action_row">
213 <%= link_to shared_preview_path(token: @node.draft.preview_token), shared_preview_url(token: @node.draft.preview_token), target: "_blank", rel: "noopener" %> 211 <%= link_to shared_preview_path(token: @node.draft.preview_token), shared_preview_url(token: @node.draft.preview_token), target: "_blank", rel: "noopener" %>
214 <%= button_to 'Revoke', revoke_shared_preview_node_path(@node), method: :put, form: { data: { confirm: "Revoke this preview link? Anyone currently using it will immediately lose access." }, class: 'button_to state_changing' } %> 212 <%= button_to t(".revoke"), revoke_shared_preview_node_path(@node), method: :put, form: { data: { confirm: t(".confirm_revoke") }, class: 'button_to state_changing' } %>
215 </div> 213 </div>
216 <% else %> 214 <% else %>
217 <%= button_to 'Create public preview link', generate_shared_preview_node_path(@node), method: :put, form: { class: 'button_to state_changing' } %> 215 <%= button_to t(".create_preview_link"), generate_shared_preview_node_path(@node), method: :put, form: { class: 'button_to state_changing' } %>
218 <% end %> 216 <% end %>
219 </div> 217 </div>
220 <% end %> 218 <% end %>
221 </div> 219 </div>
222 </div> 220 </div>
223 221
224 <div class="layout_row_label">History</div> 222 <div class="layout_row_label"><%= t(".history") %></div>
225 <div class="layout_row_content info_group"> 223 <div class="layout_row_content info_group">
226 <details> 224 <details>
227 <summary> 225 <summary>
228 <%= pluralize(@node.pages.count, 'published revision', 'published revisions') %> 226 <%= t(".published_revisions", :count => @node.pages.count) %>
229 </summary> 227 </summary>
230 <ul> 228 <ul>
231 <% @node.pages.order(:revision).each do |page| %> 229 <% @node.pages.order(:revision).each do |page| %>
@@ -236,11 +234,11 @@
236 <% end %> 234 <% end %>
237 </ul> 235 </ul>
238 </details> 236 </details>
239 <p class="revisions_full_history_link"><%= link_to 'Revision history (diff / restore)', node_revisions_path(@node) %> | <%= link_to t("node_actions.heading"), admin_log_path(:node_id => @node.id) %></p> 237 <p class="revisions_full_history_link"><%= link_to t(".revision_history"), node_revisions_path(@node) %> | <%= link_to t("node_actions.heading"), admin_log_path(:node_id => @node.id) %></p>
240 </div> 238 </div>
241 239
242 240
243 <div class="layout_row_label">Tags</div> 241 <div class="layout_row_label"><%= t(".tags") %></div>
244 <div class="layout_row_content info_group"> 242 <div class="layout_row_content info_group">
245 <% if @page.tag_list.any? %> 243 <% if @page.tag_list.any? %>
246 <ul class="tag_pill_list"> 244 <ul class="tag_pill_list">
@@ -249,11 +247,11 @@
249 <% end %> 247 <% end %>
250 </ul> 248 </ul>
251 <% else %> 249 <% else %>
252 <span class="field_hint">No tags.</span> 250 <span class="field_hint"><%= t(".no_tags") %></span>
253 <% end %> 251 <% end %>
254 </div> 252 </div>
255 253
256 <div class="layout_row_label">Attachments</div> 254 <div class="layout_row_label"><%= t(".attachments") %></div>
257 <div class="layout_row_content info_group"> 255 <div class="layout_row_content info_group">
258 <% if @page.assets.any? %> 256 <% if @page.assets.any? %>
259 <% headline_asset_id = @page.headline_asset&.id %> 257 <% headline_asset_id = @page.headline_asset&.id %>
@@ -262,7 +260,7 @@
262 <li class="<%= "is_headline" if asset.id == headline_asset_id %>"> 260 <li class="<%= "is_headline" if asset.id == headline_asset_id %>">
263 <%= link_to image_tag(asset.upload.url(:thumb)), asset_path(asset) %> 261 <%= link_to image_tag(asset.upload.url(:thumb)), asset_path(asset) %>
264 <% if asset.id == headline_asset_id %> 262 <% if asset.id == headline_asset_id %>
265 <span class="headline_indicator" title="This page's headline image"> 263 <span class="headline_indicator" title="<%= t('.headline_title')%>">
266 <%= icon("star", library: "tabler", "aria-hidden": true) %> 264 <%= icon("star", library: "tabler", "aria-hidden": true) %>
267 </span> 265 </span>
268 <% end %> 266 <% end %>
@@ -272,38 +270,38 @@
272 <% end %> 270 <% end %>
273 <p class="add_attachments"> 271 <p class="add_attachments">
274 <%= link_to new_asset_path(:node_id => @node.id), class: 'action_button' do %> 272 <%= link_to new_asset_path(:node_id => @node.id), class: 'action_button' do %>
275 <%= icon("paperclip", library: "tabler", "aria-hidden": true) %> Upload new attachment 273 <%= icon("paperclip", library: "tabler", "aria-hidden": true) %> <%= t(".upload_attachment") %>
276 <% end %> 274 <% end %>
277 <span class="field_hint">To add or remove existing attachments, edit this node instead.</span> 275 <span class="field_hint"><%= t(".attachments_hint") %></span>
278 </p> 276 </p>
279 </div> 277 </div>
280 278
281 <div class="layout_row_label">Events</div> 279 <div class="layout_row_label"><%= t(".events") %></div>
282 <div class="layout_row_content info_group"> 280 <div class="layout_row_content info_group">
283 <ul> 281 <ul>
284 <% @node.events.order(:start_time).each do |event| %> 282 <% @node.events.order(:start_time).each do |event| %>
285 <li> 283 <li>
286 <%= event_schedule_text(event) %> 284 <%= event_schedule_text(event) %>
287 [<%= link_to 'show', event_path(event, return_to: request.path) %> 285 [<%= link_to t(".show_link"), event_path(event, return_to: request.path) %>
288 | <%= link_to 'edit', edit_event_path(event, return_to: request.path) %>] 286 | <%= link_to t(".edit_link"), edit_event_path(event, return_to: request.path) %>]
289 </li> 287 </li>
290 <% end %> 288 <% end %>
291 </ul> 289 </ul>
292 <% mapping = default_event_tag_mapping(@page) %> 290 <% mapping = default_event_tag_mapping(@page) %>
293 <p class="add_events"> 291 <p class="add_events">
294 <%= link_to new_event_path(node_id: @node.id, tag_list: mapping&.last, auto_tag_source: mapping&.first, return_to: request.path), class: 'action_button' do %> 292 <%= link_to new_event_path(node_id: @node.id, tag_list: mapping&.last, auto_tag_source: mapping&.first, return_to: request.path), class: 'action_button' do %>
295 <%= icon("calendar-plus", library: "tabler", "aria-hidden": true) %> Add event 293 <%= icon("calendar-plus", library: "tabler", "aria-hidden": true) %> <%= t(".add_event") %>
296 <% end %> 294 <% end %>
297 </p> 295 </p>
298 </div> 296 </div>
299 297
300 <% matches = matching_node_kinds(@node) %> 298 <% matches = matching_node_kinds(@node) %>
301 <% if @node.children.any? || matches.any? %> 299 <% if @node.children.any? || matches.any? %>
302 <div class="layout_row_label">Children</div> 300 <div class="layout_row_label"><%= t(".children") %></div>
303 <div class="layout_row_content info_group"> 301 <div class="layout_row_content info_group">
304 <% if @node.children.any? %> 302 <% if @node.children.any? %>
305 <details> 303 <details>
306 <summary><%= pluralize(@node.children.count, 'child', 'children') %></summary> 304 <summary><%= t(".children_count", :count => @node.children.count) %></summary>
307 <ul> 305 <ul>
308 <% @node.children.order(:slug).each do |child| %> 306 <% @node.children.order(:slug).each do |child| %>
309 <li><%= link_to (child.head&.title || child.draft&.title || child.slug), node_path(child) %></li> 307 <li><%= link_to (child.head&.title || child.draft&.title || child.slug), node_path(child) %></li>
@@ -317,7 +315,7 @@
317 <% link_params = { kind: kind } %> 315 <% link_params = { kind: kind } %>
318 <% link_params[:parent_id] = @node.id if kind == "generic" %> 316 <% link_params[:parent_id] = @node.id if kind == "generic" %>
319 <%= link_to new_node_path(link_params), class: 'action_button' do %> 317 <%= link_to new_node_path(link_params), class: 'action_button' do %>
320 <%= icon("text-plus", library: "tabler", "aria-hidden": true) %> Add child type <%= resolve_kind_text(config[:label]) %> 318 <%= icon("text-plus", library: "tabler", "aria-hidden": true) %> <%= t(".add_child", :kind => resolve_kind_text(config[:label])) %>
321 <% end %> 319 <% end %>
322 <% end %> 320 <% end %>
323 </p> 321 </p>
@@ -325,10 +323,10 @@
325 </div> 323 </div>
326 <% end %> 324 <% end %>
327 325
328 <div class="layout_row_label">Abstract (<%= I18n.default_locale.to_s.upcase %>)</div> 326 <div class="layout_row_label"><%= t(".abstract_locale", :lang => I18n.default_locale.to_s.upcase) %></div>
329 <div class="layout_row_content"><%= sanitize(@page.abstract) %></div> 327 <div class="layout_row_content"><%= sanitize(@page.abstract) %></div>
330 328
331 <div class="layout_row_label">Body (<%= I18n.default_locale.to_s.upcase %>)</div> 329 <div class="layout_row_label"><%= t(".body_locale", :lang => I18n.default_locale.to_s.upcase) %></div>
332 <div class="layout_row_content"><%= sanitize(@page.body) %></div> 330 <div class="layout_row_content"><%= sanitize(@page.body) %></div>
333 331
334 </div> 332 </div>