mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Update archive navigation for tasks page [SCI-5347] (#3052)
* Update archive navigation for tasks page [SCI-5347]
This commit is contained in:
parent
0d7da90b15
commit
276d6abe19
6 changed files with 21 additions and 7 deletions
|
@ -57,6 +57,7 @@ class ExperimentsController < ApplicationController
|
|||
end
|
||||
|
||||
def canvas
|
||||
redirect_to module_archive_experiment_path(@experiment) if @experiment.archived_branch?
|
||||
@project = @experiment.project
|
||||
@active_modules = @experiment.my_modules.active.includes(:tags, :inputs, :outputs)
|
||||
current_team_switch(@project.team)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% provide(:head_title, t("experiments.module_archive.head_title", experiment: h(@experiment.name)).html_safe) %>
|
||||
<% provide(:sidebar_title, t("sidebar.my_modules.sidebar_title")) %>
|
||||
<% provide(:sidebar_title, t("sidebar.my_modules.sidebar_title_archived")) %>
|
||||
<% provide(:sidebar_url, experiment_sidebar_path(@experiment)) %>
|
||||
|
||||
<%= content_for :sidebar do %>
|
||||
|
|
|
@ -26,7 +26,13 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="panel-title"><%= link_to experiment.name, canvas_experiment_path(experiment) %></div>
|
||||
<div class="panel-title">
|
||||
<% if experiment.archived_branch? %>
|
||||
<%= link_to experiment.name, module_archive_experiment_path(experiment) %>
|
||||
<% else %>
|
||||
<%= link_to experiment.name, canvas_experiment_path(experiment) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if experiment.archived? %>
|
||||
<div class="panel-date">
|
||||
|
|
|
@ -10,7 +10,11 @@
|
|||
</li>
|
||||
<% project.sorted_experiments(@current_sort, archived).each do |experiment| %>
|
||||
<li class="sidebar-leaf">
|
||||
<%= link_to experiment.name, canvas_experiment_path(experiment), class: 'sidebar-link' %>
|
||||
<% if archived %>
|
||||
<%= link_to experiment.name, module_archive_experiment_path(experiment), class: 'sidebar-link' %>
|
||||
<% else %>
|
||||
<%= link_to experiment.name, canvas_experiment_path(experiment), class: 'sidebar-link' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% unless archived %>
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<li class="sidebar-leaf">
|
||||
<i class="fas fa-archive"></i>
|
||||
<%= link_to t('sidebar.my_modules.archived_button'), module_archive_experiment_url(experiment), class: 'sidebar-link' %>
|
||||
<%= link_to module_archive_experiment_url(experiment), class: 'sidebar-link' do %>
|
||||
<i class="fas fa-archive"></i>
|
||||
<%= t('sidebar.my_modules.archived_button') %>
|
||||
<% end%>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -219,6 +219,7 @@ en:
|
|||
archived_experiments: "Archived experiments"
|
||||
my_modules:
|
||||
sidebar_title: "TASKS"
|
||||
sidebar_title_archived: "ARCHIVED TASKS"
|
||||
back_button: "Back to experiments"
|
||||
back_to_archived_button: "Back to archived experiments"
|
||||
archived_button: "Archived tasks"
|
||||
|
@ -227,7 +228,7 @@ en:
|
|||
sidebar_title: "TASK"
|
||||
back_button: "Back to all tasks"
|
||||
back_button_archived: "Back to all archived tasks"
|
||||
steps: "Protocols"
|
||||
steps: "Protocol"
|
||||
results: "Results"
|
||||
activities: "Activity"
|
||||
archive: "Archived results"
|
||||
|
@ -245,7 +246,7 @@ en:
|
|||
reports: "Reports"
|
||||
archive: "Archived experiments"
|
||||
modules:
|
||||
steps: "Protocols"
|
||||
steps: "Protocol"
|
||||
results: "Results"
|
||||
activities: "Activity"
|
||||
archive: "Archived results"
|
||||
|
|
Loading…
Reference in a new issue