From dc15accc8603b684f380d6a7f2b01fcb765e3d15 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 2 Dec 2020 16:40:30 +0100 Subject: [PATCH] Update sidebar usages in partials [SCI-5177] --- app/controllers/teams_controller.rb | 2 +- app/views/experiments/canvas.html.erb | 2 +- app/views/experiments/module_archive.html.erb | 2 +- app/views/my_modules/activities.html.erb | 2 +- app/views/my_modules/archive.html.erb | 2 +- app/views/my_modules/protocols.html.erb | 2 +- app/views/my_modules/repository.html.erb | 2 +- app/views/my_modules/results.html.erb | 2 +- app/views/projects/experiment_archive.html.erb | 2 +- app/views/projects/index.html.erb | 2 +- app/views/projects/show.html.erb | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index 04c8f8955..6fd5bcd4e 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -10,7 +10,7 @@ class TeamsController < ApplicationController format.json do render json: { html: render_to_string( - partial: 'shared/sidebar/projects.html.erb', locals: { team: @team } + partial: 'shared/sidebar/projects.html.erb', locals: { team: current_team } ) } end diff --git a/app/views/experiments/canvas.html.erb b/app/views/experiments/canvas.html.erb index b14f3a13e..2446c74e5 100644 --- a/app/views/experiments/canvas.html.erb +++ b/app/views/experiments/canvas.html.erb @@ -1,5 +1,5 @@ <% provide(:head_title, t("experiments.canvas.head_title", project: h(@project.name)).html_safe) %> -<%= render partial: "shared/sidebar", locals: { current_experiment: @experiment, page: 'canvas' } %> +<%= render partial: 'shared/sidebar/my_modules.html.erb', locals: { experiment: @experiment } %> <%= render partial: "shared/secondary_navigation" %>
diff --git a/app/views/experiments/module_archive.html.erb b/app/views/experiments/module_archive.html.erb index e0f0bc904..2a20cb4fe 100644 --- a/app/views/experiments/module_archive.html.erb +++ b/app/views/experiments/module_archive.html.erb @@ -1,5 +1,5 @@ <% provide(:head_title, t("experiments.module_archive.head_title", experiment: h(@experiment.name)).html_safe) %> -<%= render partial: "shared/sidebar", locals: { current_experiment: @experiment, page: 'experiment' } %> +<%= render partial: 'shared/sidebar/my_modules.html.erb', locals: { experiment: @experiment } %> <%= render partial: "shared/secondary_navigation" %>
diff --git a/app/views/my_modules/activities.html.erb b/app/views/my_modules/activities.html.erb index b07cae79c..f6e920aa0 100644 --- a/app/views/my_modules/activities.html.erb +++ b/app/views/my_modules/activities.html.erb @@ -1,5 +1,5 @@ <% provide(:head_title, t("my_modules.activities.head_title", project: h(@my_module.experiment.project.name), module: h(@my_module.name))) %> -<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %> +<%= render partial: 'shared/sidebar/my_module.html.erb' %> <%= render partial: "shared/secondary_navigation" %>
diff --git a/app/views/my_modules/archive.html.erb b/app/views/my_modules/archive.html.erb index 5b5bed9bd..d3973aa58 100644 --- a/app/views/my_modules/archive.html.erb +++ b/app/views/my_modules/archive.html.erb @@ -1,5 +1,5 @@ <% provide(:head_title, t("my_modules.module_archive.head_title", project: h(@my_module.experiment.project.name), module: h(@my_module.name)).html_safe) %> -<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %> +<%= render partial: 'shared/sidebar/my_module.html.erb' %> <%= render partial: "shared/secondary_navigation" %>
diff --git a/app/views/my_modules/protocols.html.erb b/app/views/my_modules/protocols.html.erb index 882f6c144..e61533524 100644 --- a/app/views/my_modules/protocols.html.erb +++ b/app/views/my_modules/protocols.html.erb @@ -1,7 +1,7 @@ <% provide(:head_title, t("my_modules.protocols.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %> <%= render partial: 'shared/drag_n_drop_overlay' %> -<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %> +<%= render partial: 'shared/sidebar/my_module.html.erb' %> <%= render partial: "shared/secondary_navigation" %>
diff --git a/app/views/my_modules/repository.html.erb b/app/views/my_modules/repository.html.erb index 07eca6ca5..41bebf560 100644 --- a/app/views/my_modules/repository.html.erb +++ b/app/views/my_modules/repository.html.erb @@ -6,7 +6,7 @@ project: h(@project.name), module: h(@my_module.name), repository: h(@repository.name)).html_safe) %> -<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %> +<%= render partial: 'shared/sidebar/my_module.html.erb' %> <%= render partial: "shared/secondary_navigation" %>
diff --git a/app/views/my_modules/results.html.erb b/app/views/my_modules/results.html.erb index ee3c3fff5..5caee7e3a 100644 --- a/app/views/my_modules/results.html.erb +++ b/app/views/my_modules/results.html.erb @@ -1,5 +1,5 @@ <% provide(:head_title, t("my_modules.results.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %> -<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %> +<%= render partial: 'shared/sidebar/my_module.html.erb' %> <%= render partial: "shared/secondary_navigation" %> <%= render partial: 'shared/drag_n_drop_overlay' %> <%= render partial: 'assets/wopi/create_wopi_file_modal' %> diff --git a/app/views/projects/experiment_archive.html.erb b/app/views/projects/experiment_archive.html.erb index fefe9f572..b6559717a 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) %> -<%= render partial: "shared/sidebar", locals: { current_project: @project, page: 'project' } %> +<%= render partial: 'shared/sidebar/experiments.html.erb', locals: { project: @project } %> <%= render partial: "shared/secondary_navigation" %>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 277a318dd..70b9402ab 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -1,7 +1,7 @@ <% provide(:head_title, t("projects.index.head_title")) %> <% if current_team %> - <%= render partial: "shared/sidebar", locals: { page: 'project' } %> + <%= render partial: 'shared/sidebar/projects.html.erb', locals: { team: current_team } %> <% content_for :breadcrumbs do %> <%= render partial: "projects/index/breadcrumbs" if @current_folder %> <% end %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 0a0aece84..88267ffe5 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -1,5 +1,5 @@ <% provide(:head_title, t("projects.show.head_title", project: h(@project.name)).html_safe) %> -<%= render partial: "shared/sidebar", locals: { current_project: @project, page: 'project' } %> +<%= render partial: 'shared/sidebar/experiments.html.erb', locals: { project: @project } %> <%= render partial: "shared/secondary_navigation" %>