Add whole tree structure for experiment

SCI-353 #close
This commit is contained in:
Jure Grabnar 2016-08-24 10:47:30 +02:00
parent 5c8d669cac
commit e60533af57
2 changed files with 29 additions and 25 deletions

View file

@ -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 %>

View file

@ -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>