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 a09225842f493ddb366dd6688acccc503cbcde2f..fd052b23a613ea11b1aecbb01d85fde08258bca2 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 @@ -19,6 +19,6 @@ <%= prepare_text_for_static element.person.summary, 6 %> <% end %> kind: "osuny" - path: "<%= element.person.slug %>" + slug: "<%= element.person.slug %>" url: "<%= element.person.current_permalink_in_website(@website)&.path %>" <% end %> diff --git a/app/views/admin/communication/blocks/templates/pages/_static.html.erb b/app/views/admin/communication/blocks/templates/pages/_static.html.erb index 0a1dc30e16c789b9d75c921023afa833d0573881..1c936ee0a432fd0e7ffe47459a53eaf2a4ee285b 100644 --- a/app/views/admin/communication/blocks/templates/pages/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/pages/_static.html.erb @@ -15,6 +15,7 @@ <%= prepare_text_for_static element.title %> summary: >- <%= prepare_text_for_static element.summary, 6 %> + slug: "<%= element.slug %>" path: "<%= element.path %>" url: "<%= element.current_permalink_in_website(@website)&.path %>" bodyclass: >- diff --git a/app/views/admin/communication/blocks/templates/partners/_static.html.erb b/app/views/admin/communication/blocks/templates/partners/_static.html.erb index 0c153b89c8f88b008bf6da188dc40ad83e0a386f..61dff7dc4928ab80ad42d1473db3fbac4c178c6d 100644 --- a/app/views/admin/communication/blocks/templates/partners/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/partners/_static.html.erb @@ -18,7 +18,7 @@ <%= prepare_text_for_static element.name %> <% if element.organization %> kind: "osuny" - path: "<%= element.organization.slug %>" + slug: "<%= element.organization.slug %>" url: "<%= element.organization.current_permalink_in_website(@website)&.path %>" logo: <% if element.organization.logo.attached? %> diff --git a/app/views/admin/communication/blocks/templates/posts/_static.html.erb b/app/views/admin/communication/blocks/templates/posts/_static.html.erb index d8a9f11138a62c3c30f36cff00a3dea58bd4b9f5..0438db07ae56ef885470ea03831d8f5de9826786 100644 --- a/app/views/admin/communication/blocks/templates/posts/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/posts/_static.html.erb @@ -14,6 +14,7 @@ <%= prepare_text_for_static element.title %> summary: >- <%= prepare_text_for_static element.summary, 6 %> + slug: "<%= element.slug %>" path: "<%= element.path %>" url: "<%= element.current_permalink_in_website(@website)&.path %>" <% if element.best_featured_image.attached? %> @@ -28,6 +29,7 @@ <% element.categories.each do |category| %> - title: >- <%= prepare_text_for_static category.name, 8 %> + slug: "<%= category.slug %>" path: "<%= category.path %>" url: "<%= category.current_permalink_in_website(@website)&.path %>" <% end %> @@ -35,7 +37,7 @@ author: name: >- <%= prepare_text_for_static element.author.name, 7 %> - path: "<%= element.author.slug %>" + slug: "<%= element.author.slug %>" url: "<%= element.author.current_permalink_in_website(@website)&.path %>" <% end %> <% end %> diff --git a/app/views/admin/communication/blocks/templates/programs/_static.html.erb b/app/views/admin/communication/blocks/templates/programs/_static.html.erb index 4f7435b2bd691292393e56ff152595fc70f594a9..cfbdd424f7dc176a8461b66901d78664ec28e584 100644 --- a/app/views/admin/communication/blocks/templates/programs/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/programs/_static.html.erb @@ -2,4 +2,31 @@ <% block.template.elements.each do |element| %> <% next unless element.program %> - path: "<%= element.program.path %>" +<% end %> + elements: +<% block.template.elements.each do |element| %> +<% program = element.program %> +<% next unless program %> + - title: >- + <%= prepare_text_for_static element.program.name %> + summary: >- + <%= prepare_text_for_static element.program.summary, 6 %> + slug: "<%= program.slug %>" + path: "<%= program.path %>" + url: "<%= program.current_permalink_in_website(@website)&.path %>" +<% if program.best_featured_image.attached? %> + image: + id: "<%= program.best_featured_image.blob.id %>" + alt: >- + <%= prepare_text_for_static program.best_featured_image_alt, 7 %> + credit: >- + <%= prepare_html_for_static program.best_featured_image_credit, @website.university %> +<% end %> +<% diploma = program.diploma %> +<% if diploma.present? %> + diploma: + - title: >- + <%= prepare_text_for_static diploma.name %> + slug: "<%= diploma.slug %>" + url: "<%= diploma.current_permalink_in_website(@website)&.path %>"<% end %> <% end %>