mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Add whole tree structure for experiment
SCI-353 #close
This commit is contained in:
parent
5c8d669cac
commit
e60533af57
2 changed files with 29 additions and 25 deletions
|
@ -13,23 +13,27 @@
|
|||
</div>
|
||||
|
||||
<div class="tree">
|
||||
<% if !project_page? %>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="tree-link line-wrap">
|
||||
<i></i>
|
||||
<%= link_to @project.name,
|
||||
project_action_to_link_to(@project),
|
||||
title: @project.name %>
|
||||
</span>
|
||||
<%= render partial: 'shared/sidebar/experiments',
|
||||
locals: { project: @project } %>
|
||||
</li>
|
||||
<% if project_page? %>
|
||||
<li class="active">
|
||||
<span class="tree-link line-wrap">
|
||||
<i></i>
|
||||
<span title="<%= @project.name %>"><%= @project.name %></span>
|
||||
</span>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<span class="tree-link line-wrap">
|
||||
<i></i>
|
||||
<%= link_to @project.name,
|
||||
project_action_to_link_to(@project),
|
||||
title: @project.name %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<%= render partial: 'shared/sidebar/experiments',
|
||||
locals: { project: @project } %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<%= render partial: 'shared/sidebar/experiments',
|
||||
locals: { project: @project } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<ul>
|
||||
<% if project.active_experiments.present? then %>
|
||||
<% if experiment_page? %>
|
||||
<li class="active">
|
||||
<span class="tree-link line-wrap">
|
||||
<i></i>
|
||||
<span title="<%= @experiment.name %>"><%= @experiment.name %></span>
|
||||
</span>
|
||||
<%= render partial: 'shared/sidebar/my_modules', locals: { experiment: @experiment } %>
|
||||
</li>
|
||||
<% else %>
|
||||
<% project.active_experiments.each do |experiment| %>
|
||||
<% project.active_experiments.each do |experiment| %>
|
||||
<% if experiment_page? && experiment == @experiment %>
|
||||
<li class="active">
|
||||
<span class="tree-link line-wrap">
|
||||
<i></i>
|
||||
<span title="<%= @experiment.name %>"><%= @experiment.name %></span>
|
||||
</span>
|
||||
<%= render partial: 'shared/sidebar/my_modules', locals: { experiment: @experiment } %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<span class="tree-link line-wrap">
|
||||
<i></i>
|
||||
|
|
Loading…
Reference in a new issue