diff options
Diffstat (limited to 'app/views/custom/partials')
| -rw-r--r-- | app/views/custom/partials/_chapter.html.erb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/views/custom/partials/_chapter.html.erb b/app/views/custom/partials/_chapter.html.erb new file mode 100644 index 0000000..47f3950 --- /dev/null +++ b/app/views/custom/partials/_chapter.html.erb | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | <div class="article_partial chapter_partial" lang="<%= page.effective_lang %>"> | ||
| 2 | <div class="chapter_partial_layout"> | ||
| 3 | <% if page.assets.images.any? %> | ||
| 4 | <%= link_to_path image_tag(page.assets.images.first.upload.url(:thumb), :alt => ""), page.node.unique_name, class: "chapter_thumbnail" %> | ||
| 5 | <% end %> | ||
| 6 | <div class="chapter_partial_content"> | ||
| 7 | <h2 class="headline"><%= link_to_path page.title, page.node.unique_name %></h2> | ||
| 8 | <% if page.abstract.present? %> | ||
| 9 | <div class="chapter_location"><%= page.abstract %></div> | ||
| 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> | ||
| 24 | </div> | ||
| 25 | </div> | ||
| 26 | </div> | ||
