diff --git a/app/models/education/program.rb b/app/models/education/program.rb index 3b7be391f4d452bbd4b3f73e86a2dd0c4a954929..99dcc822cce1aaf6d2638917dfb1057ae3b3b4fa 100644 --- a/app/models/education/program.rb +++ b/app/models/education/program.rb @@ -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 + diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 9ba44d41b29f414c01f068431b34e1ad88b8e583..f9111ef4ce2d40bb94d85f5070e23db156368310 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -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 %>" diff --git a/app/views/admin/university/people/static.html.erb b/app/views/admin/university/people/static.html.erb index 7907da37d0e73356bb6f1cbb3d5f7ba96069778a..8e58f1a9edf61c3f56e0f18287ce10aa73d4278c 100644 --- a/app/views/admin/university/people/static.html.erb +++ b/app/views/admin/university/people/static.html.erb @@ -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 %>