diff --git a/app/views/admin/communication/website/blocks/_static.html.erb b/app/views/admin/communication/website/blocks/_static.html.erb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..48cbe043658cf81c9efdc34076c301ccbc8bbccd 100644 --- a/app/views/admin/communication/website/blocks/_static.html.erb +++ b/app/views/admin/communication/website/blocks/_static.html.erb @@ -0,0 +1,7 @@ +<% if about.blocks.any? %> +blocks: +<% about.blocks.each do |block| %> + - template: <%= block.template %> + data: +<%= render "admin/communication/website/blocks/templates/#{block.template}/static", block: block %><% end %> +<% end %> diff --git a/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb b/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1d3d08e8428a44685698a4bec507e915b6e5c8bc 100644 --- a/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb +++ b/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb @@ -0,0 +1,4 @@ + - title: Leadership + persons: + - amah-edoh + - liliane-umubyeyi diff --git a/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb b/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ac50540f4f24e523b48f4fd7655ca045aeb29a84 100644 --- a/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb +++ b/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb @@ -0,0 +1,3 @@ + - name: Partner 1 + url: https://partner1.com + logo: "e09f3794-44e5-4b51-be02-0e384616e791" diff --git a/app/views/admin/communication/website/pages/static.html.erb b/app/views/admin/communication/website/pages/static.html.erb index cc7f289eec0cf977cc1efa86c2ea189e895f4740..27e72b066c8a6992453ae5f5e3166960dc07c4ec 100644 --- a/app/views/admin/communication/website/pages/static.html.erb +++ b/app/views/admin/communication/website/pages/static.html.erb @@ -12,5 +12,6 @@ category: "<%= @page.related_category.path %>/" <% end %> description: > <%= prepare_text_for_static @page.description %> +<%= render 'admin/communication/website/blocks/static', about: @page %> --- <%= prepare_html_for_static @page.text, @page.university %> diff --git a/docs/communication/websites/blocks.md b/docs/communication/websites/blocks.md index b71d384d8c4cec3af82c0b7b64a88a2c77f592c1..b31e672a8e773953d32be70eb8583969642bc3de 100644 --- a/docs/communication/websites/blocks.md +++ b/docs/communication/websites/blocks.md @@ -56,7 +56,7 @@ views/admin/communication/website/blocks/_static.html.erb qui donne ce type de résultat ``` blocks: - - kind: partners + - template: partners data: - name: Partner 1 url: https://partner1.com @@ -66,3 +66,9 @@ Les générateurs de chaque type suivent l'organisation : ``` views/admin/communication/website/blocks/templates/partners/_static.html.erb ``` +Attention, il faut 6 espaces pour respecter l'indentation du front-matter : +``` + - name: Partner 1 + url: https://partner1.com + logo: "e09f3794-44e5-4b51-be02-0e384616e791" +```