Skip to content
Snippets Groups Projects
Unverified Commit 33c55774 authored by Pierre-André Boissinot's avatar Pierre-André Boissinot Committed by GitHub
Browse files

Merge pull request #713 from noesya/fix/program_permalinks

Nettoyage des permalinks des programs
parents 830bd776 73fa2cdf
No related branches found
No related tags found
No related merge requests found
......@@ -139,10 +139,6 @@ class Education::Program < ApplicationRecord
"#{clean_path}_index.html"
end
def path_in_website(website)
Static.clean_path "#{website.special_page(Communication::Website::Page::EducationProgram)&.path}#{path}"
end
def git_dependencies(website)
[self] +
siblings +
......
......@@ -9,7 +9,7 @@ administrator_involvements = @about.involvements_through_roles
%>
title: >
<%= @about.name %>
url: <%= @about.path_in_website(@website) %>
<%= render 'admin/application/static/permalink' %>
<%= render 'admin/application/static/design', full_width: false, toc_offcanvas: true, toc_present: true %>
<% if @about.downloadable_summary.attached? %>
downloadable_summary: <%= @about.downloadable_summary.blob_id %>
......@@ -25,7 +25,7 @@ position: <%= @about.position %>
parent:
title: >
<%= @about.parent.name %>
url: <%= @about.parent.path_in_website(@website) %>
url: <%= @about.parent.current_permalink_in_website(@website)&.path %>
<% end %>
<%= render 'admin/communication/unsplash/static' %>
category: "<%= @website.categories.find_by(program_id: @about.id)&.path %>"
......
......@@ -46,7 +46,7 @@ teachings:
title: >
<%= target.to_s %>
url: >
<%= target.path_in_website(@website) if target.respond_to? :path_in_website %>
<%= target.current_permalink_in_website(@website)&.path %>
<% end %>
<% end %>
<% if @about.roles_as_administrator.any? %>
......@@ -59,7 +59,7 @@ administrative_missions:
title: >
<%= target.to_s %>
url: >
<%= target.path_in_website(@website) if target.respond_to? :path_in_website %>
<%= target.current_permalink_in_website(@website)&.path if target.respond_to? :current_permalink_in_website %>
<% end %>
<% end %>
<%= render 'admin/communication/blocks/static', about: @about %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment