summaryrefslogtreecommitdiff
path: root/app/views/page_translations/edit.html.erb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-13 23:33:11 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-13 23:33:11 +0200
commit8eab68f2c5a3c126e2fec2ecdfa7ace87ce0937b (patch)
treef446ebc26a7707c7b64a937aa51a155df146c80a /app/views/page_translations/edit.html.erb
parent42714c697273a7117c6b355fab26c8c35e336ad1 (diff)
parentcdf5d9941ca866d437612d2f863eac6eb0b3db12 (diff)
Merge branch 'erdgeist-revive-events'
Diffstat (limited to 'app/views/page_translations/edit.html.erb')
-rw-r--r--app/views/page_translations/edit.html.erb40
1 files changed, 40 insertions, 0 deletions
diff --git a/app/views/page_translations/edit.html.erb b/app/views/page_translations/edit.html.erb
new file mode 100644
index 00000000..89b594e8
--- /dev/null
+++ b/app/views/page_translations/edit.html.erb
@@ -0,0 +1,40 @@
1<div class="translation_banner">
2 Editing the <strong><%= @locale.to_s.upcase %></strong> translation of <strong><%= title_for_node(@node) %></strong>.
3</div>
4
5<p class="field_hint">
6 Metadata such as images, tags, template, and author belong to the page
7 as a whole, not to a single translation — change those from the
8 <%= link_to 'default-locale editor', edit_node_path(@node) %>.
9</p>
10
11<div class="node_action_bar">
12 <%= button_to 'Unlock + Back', unlock_node_path(@node), method: :put,
13 form: { class: 'button_to state_changing' },
14 disabled: @node.autosave.present? %>
15 <%= submit_tag "Save #{@locale.to_s.upcase} translation", form: "translation_edit_form" %>
16 <%= submit_tag "Save + Unlock + Exit", form: "translation_edit_form" %>
17 <%= link_to "Preview ↗", preview_page_path(@page, :locale => @locale), target: "_blank", rel: "noopener", class: "preview_link" %>
18</div>
19
20<div id="page_editor">
21 <%= form_with url: node_translation_path(@node, @locale), method: :patch, local: true, id: "translation_edit_form",
22 data: { autosave_url: autosave_node_translation_path(@node, @locale), show_url: node_path(@node) } do |f| %>
23 <div id="content">
24 <div class="node_description">Title</div>
25 <div class="node_content">
26 <%= text_field_tag "page[title]", @translation&.title %>
27 </div>
28
29 <div class="node_description">Abstract</div>
30 <div class="node_content">
31 <%= text_area_tag "page[abstract]", @translation&.abstract %>
32 </div>
33
34 <div class="node_description">Body</div>
35 <div class="node_content">
36 <%= text_area_tag "page[body]", @translation&.body, :class => 'with_editor' %>
37 </div>
38 </div>
39 <% end %>
40</div>