From 5aae35d700cf96bd29f80a22ef88b91e5c465dec Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Thu, 7 Jan 2021 14:58:56 +0100 Subject: [PATCH] Update archived experiments navigation (#3053) --- app/views/projects/experiment_archive.html.erb | 2 +- .../projects/index/_project_card.html.erb | 18 +++++++++++++----- app/views/shared/sidebar/_experiments.html.erb | 8 +++++--- .../sidebar/_projects_tree_branch.html.erb | 6 +++++- config/locales/en.yml | 2 ++ 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/app/views/projects/experiment_archive.html.erb b/app/views/projects/experiment_archive.html.erb index d8f321b7b..1d2a00f55 100644 --- a/app/views/projects/experiment_archive.html.erb +++ b/app/views/projects/experiment_archive.html.erb @@ -1,5 +1,5 @@ <% provide(:head_title, t("projects.experiment_archive.head_title", project: h(@project.name)).html_safe) %> -<% provide(:sidebar_title, t("sidebar.experiments.sidebar_title")) %> +<% provide(:sidebar_title, t("sidebar.experiments.sidebar_title_archived")) %> <% provide(:sidebar_url, project_sidebar_path(@project)) %> <% provide(:container_class, 'no-second-nav-container') %> <%= content_for :sidebar do %> diff --git a/app/views/projects/index/_project_card.html.erb b/app/views/projects/index/_project_card.html.erb index 005c1608c..ffd82b46a 100644 --- a/app/views/projects/index/_project_card.html.erb +++ b/app/views/projects/index/_project_card.html.erb @@ -11,11 +11,19 @@
- -

- <%= project.name %> -

-
+ <% if project.archived? %> + <%= link_to experiment_archive_project_url(project) do %> +

+ <%= project.name %> +

+ <% end %> + <% else %> + <%= link_to project_url(project) do %> +

+ <%= project.name %> +

+ <% end %> + <% end %>
<%= render partial: 'projects/index/project_actions_dropdown.html.erb', locals: { project: project, view: 'cards' } %> diff --git a/app/views/shared/sidebar/_experiments.html.erb b/app/views/shared/sidebar/_experiments.html.erb index 97872ba99..05ffc7d23 100644 --- a/app/views/shared/sidebar/_experiments.html.erb +++ b/app/views/shared/sidebar/_experiments.html.erb @@ -1,9 +1,11 @@