diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index bb6046f90..084942033 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -46,7 +46,7 @@ class ProjectsController < ApplicationController else if current_folder breadcrumbs_html = render_to_string(partial: 'projects/index/breadcrumbs.html.erb', - locals: { target_folder: current_folder }) + locals: { target_folder: current_folder, folder_page: true }) projects_cards_url = project_folder_cards_url(current_folder) title = current_folder.name else diff --git a/app/views/projects/index/_breadcrumbs.html.erb b/app/views/projects/index/_breadcrumbs.html.erb index 5bdf4b083..101686c22 100644 --- a/app/views/projects/index/_breadcrumbs.html.erb +++ b/app/views/projects/index/_breadcrumbs.html.erb @@ -1,8 +1,10 @@ <% target_folder ||= nil %> <% experiment ||= nil %> <% project ||= nil %> +<% folder_page ||= false %> <% links = [] %> <% folders = tree_ordered_parent_folders(target_folder) %> +<% folders = folders&.take(folders.size - 1) if folder_page %>