scinote-web/app/views/shared/sidebar/_projects.html.erb
2020-02-27 16:04:44 +01:00

27 lines
1.1 KiB
Plaintext

<ul>
<% @projects_tree.each do |project| %>
<% cache [action_name, current_user, project] do %>
<li data-parent="candidate"
class="branch <%= 'active' if project_page? && current_project == project %>" >
<span class="tree-link no-indent" title="<%= project.name %>">
<% if project.active_experiments.any? %>
<i class="fas fa-caret-right tree-toggle"></i>
<% end %>
<%= link_to project.name,
project_action_to_link_to(project),
title: project.name,
class: 'line-wrap',
style: (current_project == project ? 'font-weight: bold' : ''),
data: { type: 'project', id: project.id } %>
</span>
<%= render partial: 'shared/sidebar/experiments', locals: {
project: project,
current_project: current_project,
current_experiment: current_experiment,
current_task: current_task
} %>
</li>
<% end %>
<% end %>
</ul>