diff --git a/app/views/experiments/canvas.html.erb b/app/views/experiments/canvas.html.erb index ae85ee762..c50336b0b 100644 --- a/app/views/experiments/canvas.html.erb +++ b/app/views/experiments/canvas.html.erb @@ -1,9 +1,9 @@ <% 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/secondary_navigation" , locals: { +<%= render partial: "shared/secondary_navigation" , locals: { editable: { name: 'title', - active: true, + active: can_manage_experiment?(@experiment), width: 'calc(100% - 500px)', params_group: 'experiment', field_to_udpate: 'name', diff --git a/app/views/my_modules/protocols.html.erb b/app/views/my_modules/protocols.html.erb index 1e69e9119..d8763be69 100644 --- a/app/views/my_modules/protocols.html.erb +++ b/app/views/my_modules/protocols.html.erb @@ -5,7 +5,7 @@ <%= render partial: "shared/secondary_navigation", locals: { editable: { name: 'title', - active: true, + active: can_manage_module?(@my_module), width: 'calc(100% - 580px)', params_group: 'my_module', field_to_udpate: 'name', diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index b3bcb8543..f9d5d7a7f 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -1,9 +1,9 @@ <% 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/secondary_navigation", locals: { +<%= render partial: "shared/secondary_navigation", locals: { editable: { name: 'title', - active: true, + active: can_manage_project?(@project), width: 'calc(100% - 500px)', params_group: 'project', field_to_udpate: 'name', diff --git a/app/views/shared/_secondary_navigation.html.erb b/app/views/shared/_secondary_navigation.html.erb index 9387ca785..1707ae1ef 100644 --- a/app/views/shared/_secondary_navigation.html.erb +++ b/app/views/shared/_secondary_navigation.html.erb @@ -152,7 +152,7 @@ <% editable = false if local_assigns[:editable].nil? %>