From 0e21ffc9fc75ff24e1d87428aed845679484a816 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 14:11:22 +0100 Subject: [PATCH 01/11] remove old style list --- .../blocks/components/_static.html.erb | 20 ------------------- .../agenda_category/_static.html.erb | 2 +- .../blocks/components/array/_static.html.erb | 4 ---- .../blocks/components/code/_static.html.erb | 5 ----- .../blocks/components/event/_static.html.erb | 2 +- .../components/exhibition/_static.html.erb | 2 +- .../blocks/components/file/_static.html.erb | 4 ---- .../blocks/components/image/_static.html.erb | 4 ---- .../blocks/components/job/_static.html.erb | 2 +- .../components/job_category/_static.html.erb | 2 +- .../components/location/_static.html.erb | 2 +- .../components/organization/_static.html.erb | 2 +- .../organization_category/_static.html.erb | 2 +- .../components/page_category/_static.html.erb | 2 +- .../blocks/components/person/_static.html.erb | 2 +- .../person_category/_static.html.erb | 2 +- .../blocks/components/post/_static.html.erb | 2 +- .../components/post_category/_static.html.erb | 2 +- .../components/program/_static.html.erb | 2 +- .../components/project/_static.html.erb | 2 +- .../project_category/_static.html.erb | 2 +- .../components/rich_text/_static.html.erb | 9 +-------- .../blocks/components/string/_static.html.erb | 9 +-------- .../blocks/components/text/_static.html.erb | 9 +-------- .../templates/call_to_action/_static.html.erb | 3 ++- .../blocks/templates/contact/_static.html.erb | 3 ++- .../templates/definitions/_static.html.erb | 3 ++- .../templates/features/_static.html.erb | 3 ++- .../blocks/templates/files/_static.html.erb | 8 +++++--- .../blocks/templates/gallery/_static.html.erb | 8 +++++--- .../blocks/templates/links/_static.html.erb | 3 ++- .../templates/organizations/_static.html.erb | 3 ++- .../templates/testimonials/_static.html.erb | 3 ++- .../templates/timeline/_static.html.erb | 3 ++- 34 files changed, 45 insertions(+), 91 deletions(-) diff --git a/app/views/admin/communication/blocks/components/_static.html.erb b/app/views/admin/communication/blocks/components/_static.html.erb index 5a7c7faa85..f29a2ec0b4 100644 --- a/app/views/admin/communication/blocks/components/_static.html.erb +++ b/app/views/admin/communication/blocks/components/_static.html.erb @@ -3,25 +3,6 @@ template ||= block.template component = template.public_send "#{property}_component" value = template.public_send property depth ||= 3 -# --- -# List -# --- -# -# No list for an image -# image: -# id: "6481e276-23c7-43bb-84aa-87820706ef27" -# file: "6481e276-23c7-43bb-84aa-87820706ef27" -# List for an image (removes the property name) -# - id: "1372a56a-8859-45b9-a7db-d6f9c0e1f38f" -# file: "1372a56a-8859-45b9-a7db-d6f9c0e1f38f -# -# No list for a string -# title: >- -# def 1 -# List for a string -# - title: >- -# def 1 -list ||= false indentation = ' ' * depth partial = "admin/communication/blocks/components/#{component.kind}/static" @@ -29,7 +10,6 @@ local_assigns[:template] = template local_assigns[:component] = component local_assigns[:value] = value local_assigns[:depth] = depth -local_assigns[:list] = list local_assigns[:indentation] = indentation %> <%= render partial, **local_assigns -%> diff --git a/app/views/admin/communication/blocks/components/agenda_category/_static.html.erb b/app/views/admin/communication/blocks/components/agenda_category/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/agenda_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/agenda_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/array/_static.html.erb b/app/views/admin/communication/blocks/components/array/_static.html.erb index 6e5f3323c5..22eddad36e 100644 --- a/app/views/admin/communication/blocks/components/array/_static.html.erb +++ b/app/views/admin/communication/blocks/components/array/_static.html.erb @@ -1,8 +1,4 @@ <% array = value&.compact_blank %> -<% if list %> -<%= indentation %>- <%= raw array %> -<% else %> <%= indentation %><%= property %>: <%= raw array %> -<% end %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/code/_static.html.erb b/app/views/admin/communication/blocks/components/code/_static.html.erb index b9a0186044..c865701db2 100644 --- a/app/views/admin/communication/blocks/components/code/_static.html.erb +++ b/app/views/admin/communication/blocks/components/code/_static.html.erb @@ -1,7 +1,2 @@ -<% if list %> -<%= indentation %>- <%= property %>: >- -<%= indentation %> <%= prepare_code_for_static value, depth: depth + 2 %> -<% else %> <%= indentation %><%= property %>: >- <%= indentation %> <%= prepare_code_for_static value, depth: depth + 1 %> -<% end %> diff --git a/app/views/admin/communication/blocks/components/event/_static.html.erb b/app/views/admin/communication/blocks/components/event/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/event/_static.html.erb +++ b/app/views/admin/communication/blocks/components/event/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/exhibition/_static.html.erb b/app/views/admin/communication/blocks/components/exhibition/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/exhibition/_static.html.erb +++ b/app/views/admin/communication/blocks/components/exhibition/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/file/_static.html.erb b/app/views/admin/communication/blocks/components/file/_static.html.erb index e851ab5350..8a5faf3d8c 100644 --- a/app/views/admin/communication/blocks/components/file/_static.html.erb +++ b/app/views/admin/communication/blocks/components/file/_static.html.erb @@ -2,10 +2,6 @@ blob = component.blob return unless blob %> -<% if list %> -<%= indentation %>- id: "<%= blob.id %>" -<% else %> <%= indentation %><%= property %>: <%= indentation %> id: "<%= blob.id %>" -<% end %> <%= indentation %> file: "<%= blob.id %>" diff --git a/app/views/admin/communication/blocks/components/image/_static.html.erb b/app/views/admin/communication/blocks/components/image/_static.html.erb index e851ab5350..8a5faf3d8c 100644 --- a/app/views/admin/communication/blocks/components/image/_static.html.erb +++ b/app/views/admin/communication/blocks/components/image/_static.html.erb @@ -2,10 +2,6 @@ blob = component.blob return unless blob %> -<% if list %> -<%= indentation %>- id: "<%= blob.id %>" -<% else %> <%= indentation %><%= property %>: <%= indentation %> id: "<%= blob.id %>" -<% end %> <%= indentation %> file: "<%= blob.id %>" diff --git a/app/views/admin/communication/blocks/components/job/_static.html.erb b/app/views/admin/communication/blocks/components/job/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/job/_static.html.erb +++ b/app/views/admin/communication/blocks/components/job/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/job_category/_static.html.erb b/app/views/admin/communication/blocks/components/job_category/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/job_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/job_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/location/_static.html.erb b/app/views/admin/communication/blocks/components/location/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/location/_static.html.erb +++ b/app/views/admin/communication/blocks/components/location/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/organization/_static.html.erb b/app/views/admin/communication/blocks/components/organization/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/organization/_static.html.erb +++ b/app/views/admin/communication/blocks/components/organization/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/organization_category/_static.html.erb b/app/views/admin/communication/blocks/components/organization_category/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/organization_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/organization_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/page_category/_static.html.erb b/app/views/admin/communication/blocks/components/page_category/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/page_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/page_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/person/_static.html.erb b/app/views/admin/communication/blocks/components/person/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/person/_static.html.erb +++ b/app/views/admin/communication/blocks/components/person/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/person_category/_static.html.erb b/app/views/admin/communication/blocks/components/person_category/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/person_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/person_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/post/_static.html.erb b/app/views/admin/communication/blocks/components/post/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/post/_static.html.erb +++ b/app/views/admin/communication/blocks/components/post/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/post_category/_static.html.erb b/app/views/admin/communication/blocks/components/post_category/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/post_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/post_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/program/_static.html.erb b/app/views/admin/communication/blocks/components/program/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/program/_static.html.erb +++ b/app/views/admin/communication/blocks/components/program/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/project/_static.html.erb b/app/views/admin/communication/blocks/components/project/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/project/_static.html.erb +++ b/app/views/admin/communication/blocks/components/project/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/project_category/_static.html.erb b/app/views/admin/communication/blocks/components/project_category/_static.html.erb index a871dde97f..e7e1732f24 100644 --- a/app/views/admin/communication/blocks/components/project_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/project_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= '- ' if list %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> diff --git a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb index 036d39c9e7..d9c193c326 100644 --- a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb +++ b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb @@ -1,8 +1 @@ -<% -if list && value.present? -%><%= indentation %>- <%= property %>: >- -<%= indentation %> <%= prepare_html_for_static value %><% -else -%><%= osuny_static_html property, value, depth: depth+1 %><% -end -%> \ No newline at end of file +<%= osuny_static_html property, value, depth: depth+1 %> diff --git a/app/views/admin/communication/blocks/components/string/_static.html.erb b/app/views/admin/communication/blocks/components/string/_static.html.erb index 64ee8c9cf4..78941f4f17 100644 --- a/app/views/admin/communication/blocks/components/string/_static.html.erb +++ b/app/views/admin/communication/blocks/components/string/_static.html.erb @@ -1,8 +1 @@ -<% -if list && value.present? -%><%= indentation %>- <%= property %>: >- -<%= indentation %> <%= prepare_text_for_static value, depth: depth + 2 %><% -else -%><%= osuny_static_text property, value, depth: depth+1 %><% -end -%> \ No newline at end of file +<%= osuny_static_text property, value, depth: depth+1 %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/text/_static.html.erb b/app/views/admin/communication/blocks/components/text/_static.html.erb index 8149a14b8f..3bb70d7d31 100644 --- a/app/views/admin/communication/blocks/components/text/_static.html.erb +++ b/app/views/admin/communication/blocks/components/text/_static.html.erb @@ -1,8 +1 @@ -<% -if list && value.present? -%><%= indentation %>- <%= property %>: >- -<%= indentation %> <%= prepare_text_for_static value, depth: depth + 2 %><% -else -%><%= osuny_static_text property, value, depth: depth+1 %><% -end -%> \ No newline at end of file +<%= osuny_static_text property, value, depth: depth+1 %> diff --git a/app/views/admin/communication/blocks/templates/call_to_action/_static.html.erb b/app/views/admin/communication/blocks/templates/call_to_action/_static.html.erb index 422fbd84e5..8b4f3988d3 100644 --- a/app/views/admin/communication/blocks/templates/call_to_action/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/call_to_action/_static.html.erb @@ -10,7 +10,8 @@ block.template.elements.each do |element| next if element.title.blank? %> -<%= block_component_static block, :title, template: element, list: true, depth: 4 %> + - +<%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :url, template: element, depth: 5 %> <%= block_component_static block, :target_blank, template: element, depth: 5 %> <% end %> diff --git a/app/views/admin/communication/blocks/templates/contact/_static.html.erb b/app/views/admin/communication/blocks/templates/contact/_static.html.erb index b0721be1a2..8115596a87 100644 --- a/app/views/admin/communication/blocks/templates/contact/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/contact/_static.html.erb @@ -4,7 +4,8 @@ <%= render 'admin/application/contact_details/static', about: block.template, l10n: block.template, depth: 3 %> timetable: <% block.template.elements.each do |element| %> -<%= block_component_static block, :title, template: element, list: true, depth: 4 %> + - +<%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :time_slot_morning, template: element, depth: 5 %> <%= block_component_static block, :time_slot_afternoon, template: element, depth: 5 %> <% end %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/definitions/_static.html.erb b/app/views/admin/communication/blocks/templates/definitions/_static.html.erb index d9955774e4..eb571434d4 100644 --- a/app/views/admin/communication/blocks/templates/definitions/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/definitions/_static.html.erb @@ -1,6 +1,7 @@ <%= block_component_static block, :description %> elements: <% block.template.elements.each do |element| %> -<%= block_component_static block, :title, template: element, list: true, depth: 4 %> + - +<%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :description, template: element, depth: 5 %> <% end %> diff --git a/app/views/admin/communication/blocks/templates/features/_static.html.erb b/app/views/admin/communication/blocks/templates/features/_static.html.erb index 265d924f2a..e109bf1ccb 100644 --- a/app/views/admin/communication/blocks/templates/features/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/features/_static.html.erb @@ -1,7 +1,8 @@ <%= block_component_static block, :description %> elements: <% block.template.elements.each do |element| %> -<%= block_component_static block, :title, template: element, list: true, depth: 4 %> + - +<%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :description, template: element, depth: 5 %> <%= block_component_static block, :image, template: element, depth: 5 %> <%= block_component_static block, :alt, template: element, depth: 5 %> diff --git a/app/views/admin/communication/blocks/templates/files/_static.html.erb b/app/views/admin/communication/blocks/templates/files/_static.html.erb index d1a21ba38b..c35e6eabd4 100644 --- a/app/views/admin/communication/blocks/templates/files/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/files/_static.html.erb @@ -1,8 +1,10 @@ <%= block_component_static block, :description %> files: -<% block.template.elements.each do |element| %> -<% next unless element.blob %> -<%= block_component_static block, :file, template: element, depth: 4, list: true %> +<% +block.template.elements.each do |element| + next unless element.blob %> + - +<%= block_component_static block, :file, template: element, depth: 5 %> <%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :image, template: element, depth: 5 %> <% end %> diff --git a/app/views/admin/communication/blocks/templates/gallery/_static.html.erb b/app/views/admin/communication/blocks/templates/gallery/_static.html.erb index 1805165739..97e9855c8b 100644 --- a/app/views/admin/communication/blocks/templates/gallery/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/gallery/_static.html.erb @@ -1,9 +1,11 @@ <%= block_component_static block, :description %> <%= block_component_static block, :layout %> images: -<% block.template.elements.each do |element| %> -<% next unless element.blob %> -<%= block_component_static block, :image, template: element, depth: 4, list: true %> +<% +block.template.elements.each do |element| + next unless element.blob %> + - +<%= block_component_static block, :image, template: element, depth: 5 %> <%= block_component_static block, :alt, template: element, depth: 5 %> <%= block_component_static block, :credit, template: element, depth: 5 %> <%= block_component_static block, :text, template: element, depth: 5 %> diff --git a/app/views/admin/communication/blocks/templates/links/_static.html.erb b/app/views/admin/communication/blocks/templates/links/_static.html.erb index d0310152c0..bb818afa3c 100644 --- a/app/views/admin/communication/blocks/templates/links/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/links/_static.html.erb @@ -3,7 +3,8 @@ <%= block_options_static block %> links: <% block.template.elements.each do |element| %> -<%= block_component_static block, :title, template: element, depth: 4, list: true %> + - +<%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :description, template: element, depth: 5 %> <%= block_component_static block, :url, template: element, depth: 5 %> external: <%= element.url_external?(@website) %> diff --git a/app/views/admin/communication/blocks/templates/organizations/_static.html.erb b/app/views/admin/communication/blocks/templates/organizations/_static.html.erb index 1b247cd15e..d703787fe1 100644 --- a/app/views/admin/communication/blocks/templates/organizations/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/organizations/_static.html.erb @@ -30,7 +30,8 @@ else next if element.best_name.blank? quantity += 1 %> -<%= block_component_static block, :name, template: element, depth: 4, list: true %> + - +<%= block_component_static block, :name, template: element, depth: 5 %> <%= block_component_static block, :url, template: element, depth: 5 %> logo: "<%= element.logo_component.blob&.id %>" external: true diff --git a/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb b/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb index 60b86e85a2..babfb9b188 100644 --- a/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb @@ -1,7 +1,8 @@ <%= block_component_static block, :layout %> testimonials: <% block.template.elements.each do |element| %> -<%= block_component_static block, :text, template: element, depth: 4, list: true %> + - +<%= block_component_static block, :text, template: element, depth: 5 %> <%= block_component_static block, :author, template: element, depth: 5 %> <%= block_component_static block, :job, template: element, depth: 5 %> <%= block_component_static block, :photo, template: element, depth: 5 if element.photo %> diff --git a/app/views/admin/communication/blocks/templates/timeline/_static.html.erb b/app/views/admin/communication/blocks/templates/timeline/_static.html.erb index fec45a77f5..f8cde1269f 100644 --- a/app/views/admin/communication/blocks/templates/timeline/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/timeline/_static.html.erb @@ -1,6 +1,7 @@ <%= block_component_static block, :layout %> events: <% block.template.elements.each do |element| %> -<%= block_component_static block, :title, template: element, depth: 4, list: true %> + - +<%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :text, template: element, depth: 5 %> <% end %> From 31acfef75cece949b92dc153afc1da5a7b197073 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 14:41:37 +0100 Subject: [PATCH 02/11] Arborescence -> Pages --- .../communication/websites/pages/application_controller.rb | 2 +- .../admin/communication/websites/pages_controller.rb | 2 +- app/views/admin/communication/websites/pages/index.html.erb | 2 +- config/locales/communication/en.yml | 2 -- config/locales/communication/fr.yml | 2 -- .../navigation/admin/communication/website/pages_navigation.rb | 2 +- config/navigation/admin/communication/website_navigation.rb | 2 +- 7 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/controllers/admin/communication/websites/pages/application_controller.rb b/app/controllers/admin/communication/websites/pages/application_controller.rb index 0e9ee780eb..ec21959581 100644 --- a/app/controllers/admin/communication/websites/pages/application_controller.rb +++ b/app/controllers/admin/communication/websites/pages/application_controller.rb @@ -4,7 +4,7 @@ class Admin::Communication::Websites::Pages::ApplicationController < Admin::Comm def breadcrumb super - add_breadcrumb t('admin.communication.website.subnav.structure'), + add_breadcrumb Communication::Website::Page.model_name.human(count: 2), admin_communication_website_pages_path end end diff --git a/app/controllers/admin/communication/websites/pages_controller.rb b/app/controllers/admin/communication/websites/pages_controller.rb index 1b6d9fe881..82dc179e04 100644 --- a/app/controllers/admin/communication/websites/pages_controller.rb +++ b/app/controllers/admin/communication/websites/pages_controller.rb @@ -160,7 +160,7 @@ def load_object def breadcrumb super - add_breadcrumb t('admin.communication.website.subnav.structure'), + add_breadcrumb Communication::Website::Page.model_name.human(count: 2), admin_communication_website_pages_path end diff --git a/app/views/admin/communication/websites/pages/index.html.erb b/app/views/admin/communication/websites/pages/index.html.erb index 5c2b6d0fbb..d6ddfa9939 100644 --- a/app/views/admin/communication/websites/pages/index.html.erb +++ b/app/views/admin/communication/websites/pages/index.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, t('admin.communication.website.subnav.structure') %> +<% content_for :title, Communication::Website::Page.model_name.human(count: 2) %> <% content_for :title_right do %> <%= create_link Communication::Website::Page %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 08b722056c..18a2d4b292 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -636,8 +636,6 @@ en: previous_paths: Redirects (old paths) title: Manage redirects see_showcase: See showcase - subnav: - structure: Structure synchronize: button: Synchronize running: Synchronization launched, please be patient... diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index aaf9c974bf..6139e2c23d 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -638,8 +638,6 @@ fr: previous_paths: Redirections (anciens chemins) title: Gérer les redirections see_showcase: Voir le showcase - subnav: - structure: Arborescence synchronize: button: Synchroniser running: La synchronisation est lancée, un peu de patience... diff --git a/config/navigation/admin/communication/website/pages_navigation.rb b/config/navigation/admin/communication/website/pages_navigation.rb index 9bbfa169cb..8b8d26686c 100644 --- a/config/navigation/admin/communication/website/pages_navigation.rb +++ b/config/navigation/admin/communication/website/pages_navigation.rb @@ -5,7 +5,7 @@ navigation.items do |primary| primary.item :feature_nav_pages, - t('admin.communication.website.subnav.structure'), + Communication::Website::Page.model_name.human(count: 2), admin_communication_website_pages_path(website_id: @website.id), highlights_on: lambda { controller_name == "pages" && action_name == "index" diff --git a/config/navigation/admin/communication/website_navigation.rb b/config/navigation/admin/communication/website_navigation.rb index b8e9918677..d2d565e95c 100644 --- a/config/navigation/admin/communication/website_navigation.rb +++ b/config/navigation/admin/communication/website_navigation.rb @@ -38,7 +38,7 @@ admin_communication_website_jobboard_root_path(website_id: @website.id).in?(request.path) } if @website.feature_jobboard primary.item :subnav_pages, - t('admin.communication.website.subnav.structure'), + Communication::Website::Page.model_name.human(count: 2), admin_communication_website_pages_path(website_id: @website.id) if can?(:read, Communication::Website::Page) primary.item :subnav_menus, Communication::Website::Menu.model_name.human(count: 2), From cbb2542a78772da89032bc27df6d029e45458d9c Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 15:00:26 +0100 Subject: [PATCH 03/11] br --- .../communication/blocks/components/array/_static.html.erb | 3 +-- .../communication/blocks/components/code/_static.html.erb | 2 +- .../communication/blocks/components/event/_static.html.erb | 2 +- .../blocks/components/exhibition/_static.html.erb | 2 +- .../communication/blocks/components/file/_static.html.erb | 5 ++--- .../communication/blocks/components/image/_static.html.erb | 3 +-- .../communication/blocks/components/job/_static.html.erb | 2 +- .../blocks/components/job_category/_static.html.erb | 2 +- .../blocks/components/location/_static.html.erb | 2 +- .../blocks/components/organization/_static.html.erb | 2 +- .../blocks/components/organization_category/_static.html.erb | 2 +- .../communication/blocks/components/page/_static.html.erb | 2 +- .../blocks/components/page_category/_static.html.erb | 2 +- .../communication/blocks/components/paper/_static.html.erb | 2 +- .../communication/blocks/components/person/_static.html.erb | 2 +- .../blocks/components/person_category/_static.html.erb | 2 +- .../communication/blocks/components/post/_static.html.erb | 2 +- .../blocks/components/post_category/_static.html.erb | 2 +- .../communication/blocks/components/program/_static.html.erb | 2 +- .../communication/blocks/components/project/_static.html.erb | 2 +- .../blocks/components/project_category/_static.html.erb | 2 +- .../blocks/components/rich_text/_static.html.erb | 2 +- .../blocks/components/taxonomy/_static.html.erb | 2 +- .../communication/blocks/components/text/_static.html.erb | 2 +- .../blocks/components/time_slot/_static.html.erb | 2 +- .../communication/blocks/components/volume/_static.html.erb | 2 +- 26 files changed, 27 insertions(+), 30 deletions(-) diff --git a/app/views/admin/communication/blocks/components/array/_static.html.erb b/app/views/admin/communication/blocks/components/array/_static.html.erb index 22eddad36e..c461364749 100644 --- a/app/views/admin/communication/blocks/components/array/_static.html.erb +++ b/app/views/admin/communication/blocks/components/array/_static.html.erb @@ -1,4 +1,3 @@ <% array = value&.compact_blank -%> -<%= indentation %><%= property %>: <%= raw array %> +%><%= indentation %><%= property %>: <%= raw array %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/code/_static.html.erb b/app/views/admin/communication/blocks/components/code/_static.html.erb index c865701db2..8becab7df3 100644 --- a/app/views/admin/communication/blocks/components/code/_static.html.erb +++ b/app/views/admin/communication/blocks/components/code/_static.html.erb @@ -1,2 +1,2 @@ <%= indentation %><%= property %>: >- -<%= indentation %> <%= prepare_code_for_static value, depth: depth + 1 %> +<%= indentation %> <%= prepare_code_for_static value, depth: depth + 1 %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/event/_static.html.erb b/app/views/admin/communication/blocks/components/event/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/event/_static.html.erb +++ b/app/views/admin/communication/blocks/components/event/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/exhibition/_static.html.erb b/app/views/admin/communication/blocks/components/exhibition/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/exhibition/_static.html.erb +++ b/app/views/admin/communication/blocks/components/exhibition/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/file/_static.html.erb b/app/views/admin/communication/blocks/components/file/_static.html.erb index 8a5faf3d8c..28c00a04cb 100644 --- a/app/views/admin/communication/blocks/components/file/_static.html.erb +++ b/app/views/admin/communication/blocks/components/file/_static.html.erb @@ -1,7 +1,6 @@ <% blob = component.blob return unless blob -%> -<%= indentation %><%= property %>: +%><%= indentation %><%= property %>: <%= indentation %> id: "<%= blob.id %>" -<%= indentation %> file: "<%= blob.id %>" +<%= indentation %> file: "<%= blob.id %>" \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/image/_static.html.erb b/app/views/admin/communication/blocks/components/image/_static.html.erb index 8a5faf3d8c..a220f35d1d 100644 --- a/app/views/admin/communication/blocks/components/image/_static.html.erb +++ b/app/views/admin/communication/blocks/components/image/_static.html.erb @@ -1,7 +1,6 @@ <% blob = component.blob return unless blob -%> -<%= indentation %><%= property %>: +%><%= indentation %><%= property %>: <%= indentation %> id: "<%= blob.id %>" <%= indentation %> file: "<%= blob.id %>" diff --git a/app/views/admin/communication/blocks/components/job/_static.html.erb b/app/views/admin/communication/blocks/components/job/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/job/_static.html.erb +++ b/app/views/admin/communication/blocks/components/job/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/job_category/_static.html.erb b/app/views/admin/communication/blocks/components/job_category/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/job_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/job_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/location/_static.html.erb b/app/views/admin/communication/blocks/components/location/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/location/_static.html.erb +++ b/app/views/admin/communication/blocks/components/location/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/organization/_static.html.erb b/app/views/admin/communication/blocks/components/organization/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/organization/_static.html.erb +++ b/app/views/admin/communication/blocks/components/organization/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/organization_category/_static.html.erb b/app/views/admin/communication/blocks/components/organization_category/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/organization_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/organization_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/page/_static.html.erb b/app/views/admin/communication/blocks/components/page/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/page/_static.html.erb +++ b/app/views/admin/communication/blocks/components/page/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/page_category/_static.html.erb b/app/views/admin/communication/blocks/components/page_category/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/page_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/page_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/paper/_static.html.erb b/app/views/admin/communication/blocks/components/paper/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/paper/_static.html.erb +++ b/app/views/admin/communication/blocks/components/paper/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/person/_static.html.erb b/app/views/admin/communication/blocks/components/person/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/person/_static.html.erb +++ b/app/views/admin/communication/blocks/components/person/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/person_category/_static.html.erb b/app/views/admin/communication/blocks/components/person_category/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/person_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/person_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/post/_static.html.erb b/app/views/admin/communication/blocks/components/post/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/post/_static.html.erb +++ b/app/views/admin/communication/blocks/components/post/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/post_category/_static.html.erb b/app/views/admin/communication/blocks/components/post_category/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/post_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/post_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/program/_static.html.erb b/app/views/admin/communication/blocks/components/program/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/program/_static.html.erb +++ b/app/views/admin/communication/blocks/components/program/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/project/_static.html.erb b/app/views/admin/communication/blocks/components/project/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/project/_static.html.erb +++ b/app/views/admin/communication/blocks/components/project/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/project_category/_static.html.erb b/app/views/admin/communication/blocks/components/project_category/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/project_category/_static.html.erb +++ b/app/views/admin/communication/blocks/components/project_category/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb index d9c193c326..c5354ceb19 100644 --- a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb +++ b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb @@ -1 +1 @@ -<%= osuny_static_html property, value, depth: depth+1 %> +<%= osuny_static_html property, value, depth: depth+1 %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/taxonomy/_static.html.erb b/app/views/admin/communication/blocks/components/taxonomy/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/taxonomy/_static.html.erb +++ b/app/views/admin/communication/blocks/components/taxonomy/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/text/_static.html.erb b/app/views/admin/communication/blocks/components/text/_static.html.erb index 3bb70d7d31..78941f4f17 100644 --- a/app/views/admin/communication/blocks/components/text/_static.html.erb +++ b/app/views/admin/communication/blocks/components/text/_static.html.erb @@ -1 +1 @@ -<%= osuny_static_text property, value, depth: depth+1 %> +<%= osuny_static_text property, value, depth: depth+1 %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/time_slot/_static.html.erb b/app/views/admin/communication/blocks/components/time_slot/_static.html.erb index 25464183d2..fb883c18b2 100644 --- a/app/views/admin/communication/blocks/components/time_slot/_static.html.erb +++ b/app/views/admin/communication/blocks/components/time_slot/_static.html.erb @@ -1,3 +1,3 @@ <%= indentation %><%= property %>: <%= indentation %> from: "<%= component.from %>" -<%= indentation %> to: "<%= component.to %>" +<%= indentation %> to: "<%= component.to %>" \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/volume/_static.html.erb b/app/views/admin/communication/blocks/components/volume/_static.html.erb index e7e1732f24..10c417295f 100644 --- a/app/views/admin/communication/blocks/components/volume/_static.html.erb +++ b/app/views/admin/communication/blocks/components/volume/_static.html.erb @@ -1 +1 @@ -<%= indentation %><%= property %>: <%= value %> +<%= indentation %><%= property %>: <%= value %> \ No newline at end of file From 739c34ee894b30b194993726b8ae1767d1675578 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 15:14:17 +0100 Subject: [PATCH 04/11] better --- .../communication/blocks/components/file/_static.html.erb | 4 +--- .../communication/blocks/components/image/_static.html.erb | 4 +--- .../communication/blocks/templates/files/_static.html.erb | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/views/admin/communication/blocks/components/file/_static.html.erb b/app/views/admin/communication/blocks/components/file/_static.html.erb index 28c00a04cb..f2a64f4d58 100644 --- a/app/views/admin/communication/blocks/components/file/_static.html.erb +++ b/app/views/admin/communication/blocks/components/file/_static.html.erb @@ -1,6 +1,4 @@ <% blob = component.blob return unless blob -%><%= indentation %><%= property %>: -<%= indentation %> id: "<%= blob.id %>" -<%= indentation %> file: "<%= blob.id %>" \ No newline at end of file +%><%= indentation %><%= property %>: "<%= blob.id %>" \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/image/_static.html.erb b/app/views/admin/communication/blocks/components/image/_static.html.erb index a220f35d1d..f2a64f4d58 100644 --- a/app/views/admin/communication/blocks/components/image/_static.html.erb +++ b/app/views/admin/communication/blocks/components/image/_static.html.erb @@ -1,6 +1,4 @@ <% blob = component.blob return unless blob -%><%= indentation %><%= property %>: -<%= indentation %> id: "<%= blob.id %>" -<%= indentation %> file: "<%= blob.id %>" +%><%= indentation %><%= property %>: "<%= blob.id %>" \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/files/_static.html.erb b/app/views/admin/communication/blocks/templates/files/_static.html.erb index c35e6eabd4..38f5785e15 100644 --- a/app/views/admin/communication/blocks/templates/files/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/files/_static.html.erb @@ -4,7 +4,7 @@ block.template.elements.each do |element| next unless element.blob %> - -<%= block_component_static block, :file, template: element, depth: 5 %> <%= block_component_static block, :title, template: element, depth: 5 %> +<%= block_component_static block, :file, template: element, depth: 5 %> <%= block_component_static block, :image, template: element, depth: 5 %> <% end %> From ef0f059f305a2c1e7df8bd2d1602c443d68e7def Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 15:21:20 +0100 Subject: [PATCH 05/11] back --- .../communication/blocks/components/file/_static.html.erb | 4 +++- .../communication/blocks/components/image/_static.html.erb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/admin/communication/blocks/components/file/_static.html.erb b/app/views/admin/communication/blocks/components/file/_static.html.erb index f2a64f4d58..28c00a04cb 100644 --- a/app/views/admin/communication/blocks/components/file/_static.html.erb +++ b/app/views/admin/communication/blocks/components/file/_static.html.erb @@ -1,4 +1,6 @@ <% blob = component.blob return unless blob -%><%= indentation %><%= property %>: "<%= blob.id %>" \ No newline at end of file +%><%= indentation %><%= property %>: +<%= indentation %> id: "<%= blob.id %>" +<%= indentation %> file: "<%= blob.id %>" \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/image/_static.html.erb b/app/views/admin/communication/blocks/components/image/_static.html.erb index f2a64f4d58..28c00a04cb 100644 --- a/app/views/admin/communication/blocks/components/image/_static.html.erb +++ b/app/views/admin/communication/blocks/components/image/_static.html.erb @@ -1,4 +1,6 @@ <% blob = component.blob return unless blob -%><%= indentation %><%= property %>: "<%= blob.id %>" \ No newline at end of file +%><%= indentation %><%= property %>: +<%= indentation %> id: "<%= blob.id %>" +<%= indentation %> file: "<%= blob.id %>" \ No newline at end of file From 10afea318c6ce00f0489f659c141738d9f39b36a Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 15:24:44 +0100 Subject: [PATCH 06/11] simpler --- .../communication/blocks/components/file/_static.html.erb | 3 +-- .../communication/blocks/components/image/_static.html.erb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/admin/communication/blocks/components/file/_static.html.erb b/app/views/admin/communication/blocks/components/file/_static.html.erb index 28c00a04cb..b92a943473 100644 --- a/app/views/admin/communication/blocks/components/file/_static.html.erb +++ b/app/views/admin/communication/blocks/components/file/_static.html.erb @@ -2,5 +2,4 @@ blob = component.blob return unless blob %><%= indentation %><%= property %>: -<%= indentation %> id: "<%= blob.id %>" -<%= indentation %> file: "<%= blob.id %>" \ No newline at end of file +<%= indentation %> id: "<%= blob.id %>" \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/image/_static.html.erb b/app/views/admin/communication/blocks/components/image/_static.html.erb index 28c00a04cb..b92a943473 100644 --- a/app/views/admin/communication/blocks/components/image/_static.html.erb +++ b/app/views/admin/communication/blocks/components/image/_static.html.erb @@ -2,5 +2,4 @@ blob = component.blob return unless blob %><%= indentation %><%= property %>: -<%= indentation %> id: "<%= blob.id %>" -<%= indentation %> file: "<%= blob.id %>" \ No newline at end of file +<%= indentation %> id: "<%= blob.id %>" \ No newline at end of file From e7f986fcee2e100ccde448d2cf00c1d5402669d0 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 15:36:51 +0100 Subject: [PATCH 07/11] with legacy --- .../communication/blocks/templates/files/_static.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/admin/communication/blocks/templates/files/_static.html.erb b/app/views/admin/communication/blocks/templates/files/_static.html.erb index 38f5785e15..ed4d688240 100644 --- a/app/views/admin/communication/blocks/templates/files/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/files/_static.html.erb @@ -3,7 +3,8 @@ <% block.template.elements.each do |element| next unless element.blob %> - - + - + id: "<%= element.blob.id %>"<%# TODO legacy to remove %> <%= block_component_static block, :title, template: element, depth: 5 %> <%= block_component_static block, :file, template: element, depth: 5 %> <%= block_component_static block, :image, template: element, depth: 5 %> From c6cd29f788b4ac6ad0ce07c25c6549212883a6b1 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 15:49:14 +0100 Subject: [PATCH 08/11] empty image block --- app/models/communication/block/template/image.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/communication/block/template/image.rb b/app/models/communication/block/template/image.rb index c90df84f1c..a4994f0b4f 100644 --- a/app/models/communication/block/template/image.rb +++ b/app/models/communication/block/template/image.rb @@ -16,6 +16,10 @@ def media_blobs ] end + def empty? + image_component.blob.nil? + end + protected def check_accessibility From 2177b49c387fb426bc81fbdc1cd307877e5c9d36 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 16:13:06 +0100 Subject: [PATCH 09/11] Fix --- app/views/admin/education/programs/_static_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/education/programs/_static_list.html.erb b/app/views/admin/education/programs/_static_list.html.erb index 49405247e6..4e869d69f4 100644 --- a/app/views/admin/education/programs/_static_list.html.erb +++ b/app/views/admin/education/programs/_static_list.html.erb @@ -13,7 +13,7 @@ indentation = ' ' * depth <%= indentation %> path: "<%= hugo.path %>" <%= indentation %> slug: "<%= hugo.slug %>" <%= indentation %> file: "<%= hugo.file %>" -<%= osuny_static_text 'label', program_l10n.to_s, depth: depth+1 %> +<%= osuny_static_text 'label', program_l10n.to_s, depth: depth-1 %> <% children = program.children.published_now_in(language).where(diploma: diploma) # Limit to a global list of programs, for example on a location From 97b59576b08f97d1b3ff68bb3dc130e691e5b1a9 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 16:22:09 +0100 Subject: [PATCH 10/11] empty timeline --- app/models/communication/block/template/timeline.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/communication/block/template/timeline.rb b/app/models/communication/block/template/timeline.rb index c500b9bca7..c4985ebf95 100644 --- a/app/models/communication/block/template/timeline.rb +++ b/app/models/communication/block/template/timeline.rb @@ -10,4 +10,8 @@ def allowed_for_about? def children elements end + + def empty? + elements.none? + end end From 94e4eda461e553c86dccb31a5498d97fd7da2e8f Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 6 Feb 2026 16:24:01 +0100 Subject: [PATCH 11/11] def --- app/models/communication/block/template/definition.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/communication/block/template/definition.rb b/app/models/communication/block/template/definition.rb index 93ea3cda61..2807cd4c0c 100644 --- a/app/models/communication/block/template/definition.rb +++ b/app/models/communication/block/template/definition.rb @@ -6,5 +6,8 @@ class Communication::Block::Template::Definition < Communication::Block::Templat def allowed_for_about? !about.respond_to?(:extranet) end - + + def empty? + elements.none? + end end