<% if @projects_by_teams.present? then %>
<% @projects_by_teams.each do |team, projects| %>
<% projects.each do |project| %>
<% if (project_page? && action_name.in?(%w(show experiment_archive)) ||
sample_types_page_project? ||
sample_groups_page_project?) && project == @project %>
-
<%= @project.name %>
<%= render partial: 'shared/sidebar/experiments',
locals: { project: project } %>
<% else %>
-
<%= link_to project.name,
project_action_to_link_to(project),
title: project.name,
data: { project_id: project.id } %>
<%= render partial: 'shared/sidebar/experiments',
locals: { project: project } %>
<% end %>
<% end %>
<% end %>
<% end %>