diff options
Diffstat (limited to 'app/views/page_translations/edit.html.erb')
| -rw-r--r-- | app/views/page_translations/edit.html.erb | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/app/views/page_translations/edit.html.erb b/app/views/page_translations/edit.html.erb index 20ec1c9a..3a4c8659 100644 --- a/app/views/page_translations/edit.html.erb +++ b/app/views/page_translations/edit.html.erb | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | <%= t(".editing_prefix") %> <strong><%= @locale.to_s.upcase %></strong> <%= t(".translation_of") %> <strong><%= title_for_node(@node) %></strong>. | 2 | <%= t(".editing_prefix") %> <strong><%= @locale.to_s.upcase %></strong> <%= t(".translation_of") %> <strong><%= title_for_node(@node) %></strong>. |
| 3 | </div> | 3 | </div> |
| 4 | 4 | ||
| 5 | <p class="node_action_bar standalone_action_bar"><%= link_to t("page_translations.revision_history_link"), node_revisions_path(@node, :translation_locale => @locale) %></p> | 5 | <p class="node_action_bar"><%= link_to t("page_translations.revision_history_link"), node_revisions_path(@node, :translation_locale => @locale) %></p> |
| 6 | 6 | ||
| 7 | <p class="field_hint"> | 7 | <p class="field_hint"> |
| 8 | <%= t(".metadata_hint_prefix") %> <%= link_to t(".metadata_hint_link"), edit_node_path(@node) %>. | 8 | <%= t(".metadata_hint_prefix") %> <%= link_to t(".metadata_hint_link"), edit_node_path(@node) %>. |
| @@ -27,38 +27,45 @@ | |||
| 27 | </li> | 27 | </li> |
| 28 | <% end %> | 28 | <% end %> |
| 29 | </ul> | 29 | </ul> |
| 30 | |||
| 30 | <%= form_with url: node_translation_path(@node, @locale), method: :patch, local: true, id: "translation_edit_form", | 31 | <%= form_with url: node_translation_path(@node, @locale), method: :patch, local: true, id: "translation_edit_form", |
| 31 | data: { autosave_url: autosave_node_translation_path(@node, @locale), show_url: node_path(@node) } do |f| %> | 32 | data: { autosave_url: autosave_node_translation_path(@node, @locale), show_url: node_path(@node) } do |f| %> |
| 32 | <div id="edit_grid"> | 33 | <div class="layout_row"> |
| 33 | <div id="content"> | 34 | <div class="layout_row_label"><%= Page.human_attribute_name(:title) %></div> |
| 34 | <div class="layout_row_label"><%= Page.human_attribute_name(:title) %></div> | 35 | <div class="layout_row_content"> |
| 35 | <div class="layout_row_content"> | 36 | <%= text_field_tag "page[title]", @translation&.title %> |
| 36 | <%= text_field_tag "page[title]", @translation&.title %> | 37 | </div> |
| 37 | </div> | 38 | </div> |
| 38 | 39 | ||
| 39 | <div class="layout_row_label"><%= Page.human_attribute_name(:abstract) %></div> | 40 | <div class="layout_row"> |
| 40 | <div class="layout_row_content"> | 41 | <div class="layout_row_label"><%= Page.human_attribute_name(:abstract) %></div> |
| 41 | <%= text_area_tag "page[abstract]", @translation&.abstract %> | 42 | <div class="layout_row_content"> |
| 42 | </div> | 43 | <%= text_area_tag "page[abstract]", @translation&.abstract %> |
| 44 | </div> | ||
| 45 | </div> | ||
| 43 | 46 | ||
| 47 | <div id="body_field"> | ||
| 48 | <div class="layout_row"> | ||
| 44 | <div class="layout_row_label"><%= Page.human_attribute_name(:body) %></div> | 49 | <div class="layout_row_label"><%= Page.human_attribute_name(:body) %></div> |
| 45 | <div class="body_toolbar_row"> | 50 | <div class="layout_row_content"> |
| 46 | <button type="button" id="preview_toggle" class="view_toggle" aria-pressed="false" aria-label="<%= t("admin.common.toggle_preview") %>" title="<%= t("admin.common.toggle_preview") %>"> | 51 | <div class="body_toolbar_row"> |
| 47 | <%= icon("layout-sidebar-right", library: "tabler", "aria-hidden": true) %> <span><%= t("nodes.edit.live_preview") %></span> | 52 | <button type="button" id="preview_toggle" class="view_toggle" aria-pressed="false" aria-label="<%= t("admin.common.toggle_preview") %>" title="<%= t("admin.common.toggle_preview") %>"> |
| 48 | </button> | 53 | <%= icon("layout-sidebar-right", library: "tabler", "aria-hidden": true) %> <span><%= t("nodes.edit.live_preview") %></span> |
| 49 | <button type="button" id="preview_force_render" class="view_toggle" style="display:none" aria-label="<%= t("admin.common.force_render") %>" title="<%= t("admin.common.force_render") %>"> | 54 | </button> |
| 50 | <%= icon("refresh", library: "tabler", "aria-hidden": true) %> <span><%= t("nodes.edit.force_refresh") %></span> | 55 | <button type="button" id="preview_force_render" class="view_toggle" style="display:none" aria-label="<%= t("admin.common.force_render") %>" title="<%= t("admin.common.force_render") %>"> |
| 51 | </button> | 56 | <%= icon("refresh", library: "tabler", "aria-hidden": true) %> <span><%= t("nodes.edit.force_refresh") %></span> |
| 52 | </div> | 57 | </button> |
| 58 | </div> | ||
| 53 | 59 | ||
| 54 | <div id="editor_and_preview"> | 60 | <div id="editor_and_preview"> |
| 55 | <div class="preview_content"> | 61 | <div class="preview_content"> |
| 56 | <div class="layout_row_content"> | 62 | <div class="layout_row_content"> |
| 57 | <%= text_area_tag "page[body]", @translation&.body, :class => 'with_editor' %> | 63 | <%= text_area_tag "page[body]", @translation&.body, :class => 'with_editor' %> |
| 64 | </div> | ||
| 65 | </div> | ||
| 66 | <div id="preview_panel" style="display:none"> | ||
| 67 | <iframe id="live_preview_iframe" title="<%= t("nodes.edit.live_preview") %>" data-src="<%= preview_page_path(@page, :locale => @locale) %>"></iframe> | ||
| 58 | </div> | 68 | </div> |
| 59 | </div> | ||
| 60 | <div id="preview_panel" style="display:none"> | ||
| 61 | <iframe id="live_preview_iframe" title="<%= t("nodes.edit.live_preview") %>" data-src="<%= preview_page_path(@page, :locale => @locale) %>"></iframe> | ||
| 62 | </div> | 69 | </div> |
| 63 | </div> | 70 | </div> |
| 64 | </div> | 71 | </div> |
