diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 7f22bb26842f95e7381141f3e0657fbe3f455fef..4da9b86d49106a152435ff2b7316e0e022a3d806 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -20,6 +20,7 @@ teachers_description: "<%= involvement.person.slug %>": > <%= involvement.description %> <% end %> +<% if @program.university_roles.any? %> roles: <% @program.university_roles.ordered.each do |role| %> - title: > @@ -29,6 +30,9 @@ roles: - "<%= involvement.person.slug %>" <% end %> <% end %> +<% else %> +roles: [] +<% end %> continuing: <%= @program.continuing %> level: <%= @program.level %> ects: <%= @program.ects %> diff --git a/app/views/admin/education/schools/static.html.erb b/app/views/admin/education/schools/static.html.erb index e25722aa029899b2c86c1d307eeb9210fffc4b30..a0afec14d317ea794c1c1de5ea7e94dd25aa5d04 100644 --- a/app/views/admin/education/schools/static.html.erb +++ b/app/views/admin/education/schools/static.html.erb @@ -11,13 +11,17 @@ country: > <%= ISO3166::Country[@school.country].translations[@school.country.downcase] %> phone: > <%= @school.phone %> -administrators: -<% @school.involvements_through_roles.includes(:person).ordered.each do |involvement| %> - - "<%= involvement.person.slug %>" +<% if @school.university_roles.any? %> +roles: +<% @school.university_roles.ordered.each do |role| %> + - title: > + <%= role.to_s %> + persons: + <% role.involvements.includes(:person).ordered.each do |involvement| %> + - "<%= involvement.person.slug %>" + <% end %> <% end %> -administrators_description: -<% @school.involvements_through_roles.includes(:person).ordered.each do |involvement| %> - "<%= involvement.person.slug %>": > - <%= involvement.description %> +<% else %> +roles: [] <% end %> ---