scinote-web/app/views/shared/sidebar/_experiments.html.erb

34 lines
1.3 KiB
Text
Raw Normal View History

2018-03-22 18:41:33 +08:00
<% if project.active_experiments.present? then %>
<ul>
<% project.active_experiments.each do |experiment| %>
2016-12-14 17:35:48 +08:00
<% if (experiment_page? ||
sample_groups_page_experiment? ||
sample_types_page_expermient?) && experiment == @experiment %>
<li class="active" data-parent="candidate">
2018-03-22 18:41:33 +08:00
<span class="tree-link line-wrap first-indent">
<i class="no-arrow"></i>
<span title="<%= @experiment.name %>"><%= @experiment.name %></span>
</span>
<%= render partial: 'shared/sidebar/my_modules', locals: { experiment: @experiment } %>
</li>
<% else %>
<li data-parent="candidate">
2018-03-22 18:41:33 +08:00
<span class="tree-link line-wrap first-indent">
<i class="no-arrow"></i>
<% if can_read_experiment?(experiment) %>
2016-08-03 22:09:45 +08:00
<%= link_to experiment.name,
experiment_action_to_link_to(experiment),
title: experiment.name,
class: 'overview_exp_label'
%>
<% else %>
<%= experiment.name %>
<% end %>
</span>
<%= render partial: 'shared/sidebar/my_modules', locals: { experiment: experiment } %>
</li>
<% end %>
2016-07-29 21:58:47 +08:00
<% end %>
2018-03-22 18:41:33 +08:00
</ul>
<% end %>