scinote-web/app/views/projects/index/_breadcrumbs.html.erb
aignatov-bio 6a44e23697
Add projects sidebar [SCI-5178] (#2995)
* Add projects sidebar navigation [SCI-5178]
2020-12-08 16:07:26 +01:00

19 lines
829 B
Text

<% target_folder ||= @current_folder %>
<div class="projects-breadcrumbs">
<%= link_to(t('projects.index.breadcrumbs_root'),
projects_path,
class: 'project-folder-link',
data: { projects_cards_url: cards_projects_url,
sidebar_url: sidebar_team_path(current_team) }) %>
<span>/</span>
<% target_folder&.parent_folders&.each do |project_folder| %>
<%= link_to(project_folder.name,
project_folder_path(project_folder),
class: 'project-folder-link',
data: { projects_cards_url: project_folder_cards_url(project_folder),
sidebar_url: sidebar_team_path(current_team, project_folder_id: project_folder.id),
}
) %>
<span>/</span>
<% end %>
</div>