2020-12-10 22:15:36 +08:00
|
|
|
<ul class="sidebar-branch">
|
|
|
|
<li class="sidebar-leaf">
|
2021-01-07 21:58:56 +08:00
|
|
|
<% if @project.archived? %>
|
2021-01-12 17:51:17 +08:00
|
|
|
<%= link_to t('sidebar.experiments.back_archived_projects'), projects_path(view_mode: :archived), class: 'sidebar-link back-button' %>
|
2021-02-03 21:23:38 +08:00
|
|
|
<% elsif view_mode == 'archived' %>
|
2020-12-17 20:07:30 +08:00
|
|
|
<%= link_to t('sidebar.experiments.back_active_experiments'), project_url(@project), class: 'sidebar-link back-button' %>
|
2021-01-07 21:58:56 +08:00
|
|
|
<% else %>
|
|
|
|
<%= link_to t('sidebar.experiments.back_button'), projects_path, class: 'sidebar-link back-button' %>
|
2020-12-17 20:07:30 +08:00
|
|
|
<% end %>
|
2020-12-10 22:15:36 +08:00
|
|
|
</li>
|
2021-09-30 17:32:11 +08:00
|
|
|
<% project.sorted_experiments(current_user, @current_sort, view_mode == 'archived').each do |experiment| %>
|
2020-12-10 22:15:36 +08:00
|
|
|
<li class="sidebar-leaf">
|
2021-02-03 21:23:38 +08:00
|
|
|
<% if view_mode == 'archived' %>
|
2023-01-12 18:31:04 +08:00
|
|
|
<%= link_to experiment.name, my_modules_experiment_path(experiment, view_mode: :archived), title: experiment.name, class: 'sidebar-link' %>
|
2021-01-08 00:18:52 +08:00
|
|
|
<% else %>
|
2023-01-12 18:31:04 +08:00
|
|
|
<%= link_to experiment.name, my_modules_experiment_path(experiment), title: experiment.name, class: 'sidebar-link' %>
|
2021-01-08 00:18:52 +08:00
|
|
|
<% end %>
|
2020-12-10 22:15:36 +08:00
|
|
|
</li>
|
|
|
|
<% end %>
|
2021-02-03 21:23:38 +08:00
|
|
|
<% if view_mode == 'active' %>
|
2020-12-17 20:07:30 +08:00
|
|
|
<li class="sidebar-leaf">
|
2021-02-03 21:23:38 +08:00
|
|
|
<%= link_to project_path(@project, view_mode: 'archived'), class: 'sidebar-link' do %>
|
2023-06-08 14:33:37 +08:00
|
|
|
<i class="sn-icon sn-icon-archive"></i>
|
2020-12-17 20:07:30 +08:00
|
|
|
<%= t('sidebar.experiments.archived_experiments') %>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2020-12-10 22:15:36 +08:00
|
|
|
</ul>
|