From 36d63e543ade5d36eed1afec7c06248a6180c351 Mon Sep 17 00:00:00 2001 From: Soufiane Date: Thu, 25 May 2023 08:53:12 +0200 Subject: [PATCH] Active state selected by default when viewing archived content [SCI-8533] (#5474) * Redirect to archived state when clicking on archived experiment [SCI-8533] Co-authored-by: Sboursen * Cover the case where Project is archived and experiment is not [SCI-8533] Co-authored-by: Sboursen --------- Co-authored-by: Sboursen --- app/views/projects/show/_experiment_card.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/projects/show/_experiment_card.html.erb b/app/views/projects/show/_experiment_card.html.erb index c8c271fcb..e19561e6e 100644 --- a/app/views/projects/show/_experiment_card.html.erb +++ b/app/views/projects/show/_experiment_card.html.erb @@ -24,7 +24,11 @@
<%= render partial: 'projects/show/experiment_workflow_image_container', locals: { experiment: experiment } %>
- <%= link_to experiment.name, my_modules_experiment_path(experiment), title: experiment.name, class: 'name-link' %> + <% if experiment.archived_branch? %> + <%= link_to experiment.name, module_archive_experiment_url(experiment), title: experiment.name, class: 'name-link' %> + <% else %> + <%= link_to experiment.name, my_modules_experiment_url(experiment), title: experiment.name, class: 'name-link' %> + <% end %>