Skip to content
Snippets Groups Projects
Commit 0866eb04 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix #797

parent c3da2457
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ class Admin::Education::DiplomasController < Admin::Education::ApplicationContro
def static
@about = @diploma
@website = @diploma.websites&.first
@programs = @website.education_programs.root.ordered
render layout: false
end
......
<%
indentation = ' ' * depth
%>
<% programs.each do |program| %>
<%= indentation %>- label: >
<%= indentation %> <%= program.to_s %>
<%= indentation %> path: >
<%= indentation %> <%= program.current_permalink_in_website(@website)&.path %>
<% children = program.children.ordered %>
<% if children.any? %>
<%= indentation %> children:
<%= render 'programs', programs: program.children.ordered, depth: depth + 4 %>
<% end %>
<% end %>
......@@ -3,6 +3,8 @@ title: >
<%= prepare_text_for_static @about.name %>
<%= render 'admin/application/static/permalink' %>
<%= render 'admin/application/static/design', full_width: true, toc_offcanvas: true %>
programs:
<%= render 'programs', programs: @programs, depth: 2 %>
short_name: >
<%= prepare_text_for_static @about.short_name %>
<%= render 'admin/application/summary/static' %>
......
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