summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/custom/page_templates/public/chapter_detail.html.erb1
-rw-r--r--app/views/custom/partials/_chapter.html.erb37
-rw-r--r--app/views/nodes/edit.html.erb21
-rw-r--r--app/views/page_translations/edit.html.erb24
4 files changed, 62 insertions, 21 deletions
diff --git a/app/views/custom/page_templates/public/chapter_detail.html.erb b/app/views/custom/page_templates/public/chapter_detail.html.erb
index f47353c..c4c2598 100644
--- a/app/views/custom/page_templates/public/chapter_detail.html.erb
+++ b/app/views/custom/page_templates/public/chapter_detail.html.erb
@@ -1,5 +1,6 @@
1<div class="article" lang="<%= @page.effective_lang %>"> 1<div class="article" lang="<%= @page.effective_lang %>">
2 <h2 class="headline"><%= @page.title %></h2> 2 <h2 class="headline"><%= @page.title %></h2>
3 <%= headline_image %>
3 <% if @page.node.external_url.present? %> 4 <% if @page.node.external_url.present? %>
4 <div class="chapter_url"><%= link_to @page.node.external_url, @page.node.external_url, target: '_blank', rel: 'noopener' %></div> 5 <div class="chapter_url"><%= link_to @page.node.external_url, @page.node.external_url, target: '_blank', rel: 'noopener' %></div>
5 <% end %> 6 <% end %>
diff --git a/app/views/custom/partials/_chapter.html.erb b/app/views/custom/partials/_chapter.html.erb
index 805559b..47f3950 100644
--- a/app/views/custom/partials/_chapter.html.erb
+++ b/app/views/custom/partials/_chapter.html.erb
@@ -1,19 +1,26 @@
1<div class="article_partial chapter_partial" lang="<%= page.effective_lang %>"> 1<div class="article_partial chapter_partial" lang="<%= page.effective_lang %>">
2 <h2 class="headline"><%= link_to_path page.title, page.node.unique_name %></h2> 2 <div class="chapter_partial_layout">
3 <% if page.abstract.present? %> 3 <% if page.assets.images.any? %>
4 <div class="chapter_location"><%= page.abstract %></div> 4 <%= link_to_path image_tag(page.assets.images.first.upload.url(:thumb), :alt => ""), page.node.unique_name, class: "chapter_thumbnail" %>
5 <% end %> 5 <% end %>
6 <% if page.node.external_url.present? %> 6 <div class="chapter_partial_content">
7 <div class="chapter_url"><%= link_to page.node.external_url, page.node.external_url, target: '_blank', rel: 'noopener' %></div> 7 <h2 class="headline"><%= link_to_path page.title, page.node.unique_name %></h2>
8 <% end %> 8 <% if page.abstract.present? %>
9 <% open_days = page.node.events.tagged_with('open-day').order(:start_time) %> 9 <div class="chapter_location"><%= page.abstract %></div>
10 <% if open_days.any? %>
11 <div class="chapter_open_days">
12 <span class="open_days_label"><%= t(:open_days_label) %>: </span>
13 <% open_days.each do |event| %>
14 <span class="event_schedule"><%= event_schedule_text(event) %></span>
15 <% end %> 10 <% end %>
11 <% if page.node.external_url.present? %>
12 <div class="chapter_url"><%= link_to page.node.external_url, page.node.external_url, target: '_blank', rel: 'noopener' %></div>
13 <% end %>
14 <% open_days = page.node.events.tagged_with('open-day').order(:start_time) %>
15 <% if open_days.any? %>
16 <div class="chapter_open_days">
17 <span class="open_days_label"><%= t(:open_days_label) %>: </span>
18 <% open_days.each do |event| %>
19 <span class="event_schedule"><%= event_schedule_text(event) %></span>
20 <% end %>
21 </div>
22 <% end %>
23 <p class="excerpt"><%= sanitize page.body %></p>
16 </div> 24 </div>
17 <% end %> 25 </div>
18 <p class="excerpt"><%= sanitize page.body %></p>
19</div> 26</div>
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 %>