diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 21 | ||||
| -rw-r--r-- | app/views/page_translations/edit.html.erb | 24 |
2 files changed, 39 insertions, 6 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index e0e51d8..9506995 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -116,10 +116,27 @@ | |||
| 116 | <div class="node_content"><%= d.text_area :abstract %></div> | 116 | <div class="node_content"><%= d.text_area :abstract %></div> |
| 117 | 117 | ||
| 118 | <div class="node_description">Body</div> | 118 | <div class="node_description">Body</div> |
| 119 | <div class="node_content"><%= d.text_area :body, :class => 'with_editor' %></div> | 119 | <div class="body_toolbar_row"> |
| 120 | <button type="button" id="preview_toggle" class="view_toggle" aria-pressed="false" aria-label="Toggle live preview" title="Toggle live preview"> | ||
| 121 | <%= icon("layout-sidebar-right", library: "tabler", "aria-hidden": true) %> <span>Live preview</span> | ||
| 122 | </button> | ||
| 123 | <button type="button" id="preview_force_render" class="view_toggle" style="display:none" aria-label="Force preview render" title="Force preview render"> | ||
| 124 | <%= icon("refresh", library: "tabler", "aria-hidden": true) %> <span>Force refresh</span> | ||
| 125 | </button> | ||
| 126 | </div> | ||
| 127 | |||
| 128 | <div id="editor_and_preview"> | ||
| 129 | <div class="preview_content"> | ||
| 130 | <div class="node_content"><%= d.text_area :body, :class => 'with_editor' %></div> | ||
| 131 | </div> | ||
| 132 | <div id="preview_panel" style="display:none"> | ||
| 133 | <iframe id="live_preview_iframe" title="Live preview" data-src="<%= preview_page_path(@page, :locale => I18n.default_locale) %>"></iframe> | ||
| 134 | </div> | ||
| 135 | </div> | ||
| 136 | </div> | ||
| 120 | <% end %> | 137 | <% end %> |
| 121 | 138 | ||
| 122 | <div class="node_action_bar node_action_bar_save"> | 139 | <div class="node_action_bar"> |
| 123 | <%= f.submit 'Save Draft' %> | 140 | <%= f.submit 'Save Draft' %> |
| 124 | <%= f.submit 'Save + Unlock + Exit' %> | 141 | <%= f.submit 'Save + Unlock + Exit' %> |
| 125 | </div> | 142 | </div> |
diff --git a/app/views/page_translations/edit.html.erb b/app/views/page_translations/edit.html.erb index 981fb74..0f64d40 100644 --- a/app/views/page_translations/edit.html.erb +++ b/app/views/page_translations/edit.html.erb | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | </div> | 20 | </div> |
| 21 | 21 | ||
| 22 | <div id="page_editor"> | 22 | <div id="page_editor"> |
| 23 | <%= form_with url: node_translation_path(@node, @locale), method: :patch, local: true, id: "translation_edit_form", | 23 | <%= form_with url: node_translation_path(@node, @locale), method: :patch, local: true, id: "translation_edit_form", |
| 24 | data: { autosave_url: autosave_node_translation_path(@node, @locale), show_url: node_path(@node) } do |f| %> | 24 | data: { autosave_url: autosave_node_translation_path(@node, @locale), show_url: node_path(@node) } do |f| %> |
| 25 | <div id="content"> | 25 | <div id="content"> |
| 26 | <div class="node_description">Title</div> | 26 | <div class="node_description">Title</div> |
| 27 | <div class="node_content"> | 27 | <div class="node_content"> |
| @@ -34,8 +34,24 @@ | |||
| 34 | </div> | 34 | </div> |
| 35 | 35 | ||
| 36 | <div class="node_description">Body</div> | 36 | <div class="node_description">Body</div> |
| 37 | <div class="node_content"> | 37 | <div class="body_toolbar_row"> |
| 38 | <%= text_area_tag "page[body]", @translation&.body, :class => 'with_editor' %> | 38 | <button type="button" id="preview_toggle" class="view_toggle" aria-pressed="false" aria-label="Toggle live preview" title="Toggle live preview"> |
| 39 | <%= icon("layout-sidebar-right", library: "tabler", "aria-hidden": true) %> <span>Live preview</span> | ||
| 40 | </button> | ||
| 41 | <button type="button" id="preview_force_render" class="view_toggle" style="display:none" aria-label="Force preview render" title="Force preview render"> | ||
| 42 | <%= icon("refresh", library: "tabler", "aria-hidden": true) %> <span>Force refresh</span> | ||
| 43 | </button> | ||
| 44 | </div> | ||
| 45 | |||
| 46 | <div id="editor_and_preview"> | ||
| 47 | <div class="preview_content"> | ||
| 48 | <div class="node_content"> | ||
| 49 | <%= text_area_tag "page[body]", @translation&.body, :class => 'with_editor' %> | ||
| 50 | </div> | ||
| 51 | </div> | ||
| 52 | <div id="preview_panel" style="display:none"> | ||
| 53 | <iframe id="live_preview_iframe" title="Live preview" data-src="<%= preview_page_path(@page, :locale => @locale) %>"></iframe> | ||
| 54 | </div> | ||
| 39 | </div> | 55 | </div> |
| 40 | </div> | 56 | </div> |
| 41 | <% end %> | 57 | <% end %> |
