scinote-web/app/views/shared/sidebar/_experiments.html.erb
2020-12-03 10:19:11 +01:00

26 lines
1.2 KiB
Text

<%= content_for :sidebar do %>
<div id="slide-panel" class="visible">
<ul class="sidebar-root" data-sidebar-url="<%= project_sidebar_path(project) %>">
<% if project.active_experiments.present? %>
<ul class="tree-child hidden" data-branch-id="pro<%= project.id %>">
<% project.sorted_active_experiments('atoz').preload(:active_my_modules).each do |experiment| %>
<% cache [action_name, current_user, experiment] do %>
<li data-parent="candidate" class="branch">
<span class="tree-link first-indent" title="<%= experiment.name %>">
<% if experiment.active_my_modules.any? %>
<i class="fas fa-caret-right tree-toggle"></i>
<% end %>
<%= link_to experiment.name,
experiment_action_to_link_to(experiment),
class: 'overview_exp_label line-wrap',
data: { type: 'experiment', id: experiment.id }
%>
</span>
</li>
<% end %>
<% end %>
</ul>
<% end %>
</ul>
</div>
<% end %>