diff --git a/app/views/admin/communication/blocks/templates/organization_chart/_static.html.erb b/app/views/admin/communication/blocks/templates/organization_chart/_static.html.erb index c4d4f4ac299611b7c05345d8799593230a93eae6..a09225842f493ddb366dd6688acccc503cbcde2f 100644 --- a/app/views/admin/communication/blocks/templates/organization_chart/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/organization_chart/_static.html.erb @@ -6,4 +6,19 @@ <% next unless element.person %> - slug: "<%= element.person.slug %>" <%= block_component_static block, :role, template: element, depth: 5 %> +<% end %> + elements: +<% block.template.elements.each do |element| %> +<% next unless element.person %> + - title: >- + <%= prepare_text_for_static element.person.to_s %> + summary: >- +<% if element.role.present? %> + <%= prepare_text_for_static element.role, 6 %> +<% else %> + <%= prepare_text_for_static element.person.summary, 6 %> +<% end %> + kind: "osuny" + path: "<%= element.person.slug %>" + url: "<%= element.person.current_permalink_in_website(@website)&.path %>" <% end %>