diff --git a/app/views/admin/education/diplomas/_programs.html.erb b/app/views/admin/education/diplomas/_programs.html.erb index fc7f42ca78ed0c1d93702b68a00ccede81550ffb..af697c37f81cff55735e5400d14983c09ce66e68 100644 --- a/app/views/admin/education/diplomas/_programs.html.erb +++ b/app/views/admin/education/diplomas/_programs.html.erb @@ -2,11 +2,11 @@ depth ||= 2 indentation = ' ' * depth %> -<% programs.each do |program| %> +<% programs.ordered_by_name.each do |program| %> <%= indentation %>- label: > <%= indentation %> <%= program.to_s %> <%= indentation %> path: "<%= program.current_permalink_in_website(@website)&.path %>" -<% children = program.children.where(diploma: diploma).ordered %> +<% children = program.children.where(diploma: diploma) %> <% if children.any? %> <%= indentation %> children: <%= render 'admin/education/diplomas/programs', diploma: diploma, programs: children, depth: depth + 4 %> diff --git a/config/admin_navigation.rb b/config/admin_navigation.rb index f4e11299d9c6bcb52d99ce607a380cfa9a8ef7d6..090a87b39db8e94e9140a7f56d906cac1dec2e0a 100644 --- a/config/admin_navigation.rb +++ b/config/admin_navigation.rb @@ -27,7 +27,7 @@ SimpleNavigation::Configuration.run do |navigation| primary.item :education, 'Feedbacks', nil, { icon: Icon::EDUCATION_FEEDBACKS } end - if can?(:read, Research::Journal) || can?(:read, Research::Publication) || can?(:read, Research::Laboratory) + if can?(:read, Research::Journal) || can?(:read, Research::Hal::Publication) || can?(:read, Research::Laboratory) primary.item :research, Research.model_name.human, admin_research_root_path, { kind: :header, image: 'admin/research-thumb.jpg' } load_from_parts Research, primary primary.item :research_watch, 'Veille', nil, { icon: Icon::RESEARCH_WATCH }