From a957e0788d38830654bbc69d4c560be22f9a05bb Mon Sep 17 00:00:00 2001 From: pabois Date: Thu, 11 Jun 2026 16:44:35 +0200 Subject: [PATCH 1/4] Ajustement du fichier statique du Program --- app/views/admin/education/programs/static.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index c3c279149..083c4d5ee 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -90,7 +90,12 @@ information: <%= osuny_static_html 'initial', @l10n.pricing_initial, depth: 3 %> <%= osuny_static_html 'continuing', @l10n.pricing_continuing, depth: 3 %> <%= osuny_static_html 'apprenticeship', @l10n.pricing_apprenticeship, depth: 3 %> -diplomas: "<%= @l10n.diploma&.slug %>" +diplomas: +<% if @l10n.diploma %> + <% hugo = @l10n.diploma.hugo(@website) %> + url: "<%= hugo.permalink %>" + slug: "<%= hugo.slug %>" +<% end %> <%= osuny_static_text 'duration', @l10n.duration %> teachers: <% From 3ef5caf013dae69fa8b6dbcabaec405df07954db Mon Sep 17 00:00:00 2001 From: pabois Date: Mon, 15 Jun 2026 10:03:02 +0200 Subject: [PATCH 2/4] fix --- app/views/admin/education/programs/static.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 083c4d5ee..364b2f312 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -92,9 +92,8 @@ information: <%= osuny_static_html 'apprenticeship', @l10n.pricing_apprenticeship, depth: 3 %> diplomas: <% if @l10n.diploma %> - <% hugo = @l10n.diploma.hugo(@website) %> - url: "<%= hugo.permalink %>" - slug: "<%= hugo.slug %>" +<% hugo = @l10n.diploma.hugo(@website) %> +<%= render 'admin/application/static/hugo/single', hugo: hugo, depth: 1 %> <% end %> <%= osuny_static_text 'duration', @l10n.duration %> teachers: From f8cead500867753eb4ae2cfd5a3d5cdb2480754d Mon Sep 17 00:00:00 2001 From: pabois Date: Mon, 15 Jun 2026 10:23:32 +0200 Subject: [PATCH 3/4] rename key singular --- app/views/admin/education/programs/static.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 364b2f312..cf7c7a85c 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -90,7 +90,7 @@ information: <%= osuny_static_html 'initial', @l10n.pricing_initial, depth: 3 %> <%= osuny_static_html 'continuing', @l10n.pricing_continuing, depth: 3 %> <%= osuny_static_html 'apprenticeship', @l10n.pricing_apprenticeship, depth: 3 %> -diplomas: +diploma: <% if @l10n.diploma %> <% hugo = @l10n.diploma.hugo(@website) %> <%= render 'admin/application/static/hugo/single', hugo: hugo, depth: 1 %> From 251bbc235755bce5ee240d1926439b072806b044 Mon Sep 17 00:00:00 2001 From: pabois Date: Mon, 15 Jun 2026 10:30:33 +0200 Subject: [PATCH 4/4] remove taxo displomas --- app/models/education/diploma/localization.rb | 2 +- .../websites/configs/default_languages/static.html.erb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/education/diploma/localization.rb b/app/models/education/diploma/localization.rb index 7cfa05bd9..a172fdfb7 100644 --- a/app/models/education/diploma/localization.rb +++ b/app/models/education/diploma/localization.rb @@ -63,7 +63,7 @@ def dependencies end def git_path_relative - "diplomas/#{slug}/_index.html" + "diplomas/#{slug}.html" end def template_static diff --git a/app/views/admin/communication/websites/configs/default_languages/static.html.erb b/app/views/admin/communication/websites/configs/default_languages/static.html.erb index 8d9d49cb2..a34aa3a9a 100644 --- a/app/views/admin/communication/websites/configs/default_languages/static.html.erb +++ b/app/views/admin/communication/websites/configs/default_languages/static.html.erb @@ -19,7 +19,6 @@ localizations.each do |l10n| taxonomies: administrator: administrators author: authors - diploma: diplomas events_category: events_categories jobs_category: jobs_categories location: locations