mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Fix experiment table sidebar navigation [SCI-7652] (#4741)
This commit is contained in:
parent
b43813366e
commit
6844144503
3 changed files with 17 additions and 3 deletions
|
@ -4,7 +4,11 @@
|
|||
<% provide(:container_class, 'no-second-nav-container') %>
|
||||
|
||||
<%= content_for :sidebar do %>
|
||||
<%= render partial: 'shared/sidebar/my_modules.html.erb', locals: { experiment: @experiment, my_modules: @my_modules } %>
|
||||
<% if params[:view_mode] == 'archived' %>
|
||||
<%= render partial: 'shared/sidebar/archived_my_modules.html.erb', locals: { experiment: @experiment, my_modules: @my_modules } %>
|
||||
<% else %>
|
||||
<%= render partial: 'shared/sidebar/my_modules.html.erb', locals: { experiment: @experiment, my_modules: @my_modules } %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="content-pane flexible experiment-new-my_module <%= params[:view_mode] %>" id="experimentTable">
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
</li>
|
||||
<% else %>
|
||||
<li class="sidebar-leaf">
|
||||
<%= link_to t('sidebar.my_modules.back_to_active_button'), canvas_experiment_url(experiment), class: 'sidebar-link back-button' %>
|
||||
<% if params[:action] == 'table' %>
|
||||
<%= link_to t('sidebar.my_modules.back_to_active_button'), table_experiment_path(experiment), class: 'sidebar-link back-button' %>
|
||||
<% else %>
|
||||
<%= link_to t('sidebar.my_modules.back_to_active_button'), canvas_experiment_url(experiment), class: 'sidebar-link back-button' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% my_modules.each do |my_module| %>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<% if params[:action] == 'table' %>
|
||||
<% @view_mode_link = table_experiment_path(@experiment, view_mode: 'archived') %>
|
||||
<% else %>
|
||||
<% @view_mode_link = module_archive_experiment_url(experiment) %>
|
||||
<% end %>
|
||||
|
||||
<ul class="sidebar-branch">
|
||||
<li class="sidebar-leaf">
|
||||
<%= link_to t('sidebar.my_modules.back_button'), project_url(experiment.project), class: 'sidebar-link back-button' %>
|
||||
|
@ -15,7 +21,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<li class="sidebar-leaf">
|
||||
<%= link_to module_archive_experiment_url(experiment), class: 'sidebar-link' do %>
|
||||
<%= link_to @view_mode_link, class: 'sidebar-link' do %>
|
||||
<i class="fas fa-archive"></i>
|
||||
<%= t('sidebar.my_modules.archived_button') %>
|
||||
<% end%>
|
||||
|
|
Loading…
Reference in a new issue