mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
54 lines
2.2 KiB
Text
54 lines
2.2 KiB
Text
<% if experiment.active_modules.present? then %>
|
|
<ul>
|
|
<% experiment.active_module_groups.each do |my_module_group| %>
|
|
<li data-module-group="<%= my_module_group.id %>">
|
|
<% if my_module_group.my_modules.present? then %>
|
|
<ul>
|
|
<span class="my-module-group-element">
|
|
<% my_module_group.my_modules.sort_by{|m| m.workflow_order}.each do |my_module| %>
|
|
<li class="leaf <%= "active" if currently_active? my_module %>" data-module-id="<%= my_module.id %>">
|
|
<span class="tree-link">
|
|
<% if currently_active? my_module %>
|
|
<%= my_module.name %>
|
|
<% else %>
|
|
<% if can_view_module(my_module) then %>
|
|
<%= link_to my_module.name, module_action_to_link_to(my_module), class: "module-link" %>
|
|
<% else %>
|
|
<%= my_module.name %>
|
|
<% end %>
|
|
<% end %>
|
|
<% if is_canvas? %>
|
|
<a href="#" class="canvas-center-on"><span class="glyphicon glyphicon-map-marker"></span></a>
|
|
<% end %>
|
|
</span>
|
|
</li>
|
|
<% end %>
|
|
</span>
|
|
</ul>
|
|
<% end %>
|
|
</li>
|
|
<% end %>
|
|
<% modules_without_group = experiment.modules_without_group %>
|
|
<% if modules_without_group.present? then %>
|
|
<li>
|
|
<ul>
|
|
<% modules_without_group.each do |my_module| %>
|
|
<li class="leaf <%= "active" if currently_active? my_module %>"
|
|
data-module-id="<%= my_module.id %>">
|
|
<span class="tree-link">
|
|
<% if currently_active? my_module %>
|
|
<%= my_module.name %>
|
|
<% else %>
|
|
<%= link_to my_module.name, module_action_to_link_to(my_module) %>
|
|
<% end %>
|
|
<% if is_canvas? %>
|
|
<a href="" class="canvas-center-on"><span class="glyphicon glyphicon-map-marker"></span></a>
|
|
<% end %>
|
|
</span>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|