Skip to content
Snippets Groups Projects
Commit 35075411 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

block people

parent e61c2823
No related branches found
No related tags found
No related merge requests found
......@@ -8,17 +8,22 @@
<%= block_component_static block, :role, template: element, depth: 5 %>
<% end %>
elements:
<% block.template.elements.each do |element| %>
<% next unless element.person %>
<% block.template.elements.each do |element|
person = element.person
next unless person
%>
- title: >-
<%= prepare_text_for_static element.person.to_s %>
<%= prepare_text_for_static person.to_s %>
summary: >-
<% if element.role.present? %>
<%= prepare_text_for_static element.role, 6 %>
<% else %>
<%= prepare_text_for_static element.person.summary, 6 %>
<%= prepare_text_for_static person.summary, 6 %>
<% end %>
kind: "osuny"
slug: "<%= element.person.slug %>"
url: "<%= element.person.current_permalink_in_website(@website)&.path %>"
slug: "<%= person.slug %>"
url: "<%= person.current_permalink_in_website(@website)&.path %>"
<% if person.best_picture.attached? %>
picture: "<%= person.best_picture.blob.id %>"
<% end %>
<% end %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment