mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +08:00
Add permission checking to inline editor fields [SCI-3468]
This commit is contained in:
parent
039b2f3754
commit
2ef926e795
4 changed files with 6 additions and 6 deletions
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
<% editable = false if local_assigns[:editable].nil? %>
|
||||
<h4 class="nav-name <%= (editable && editable[:active]) ? 'editable' : '' %>">
|
||||
<% if editable && editable[:active] %>
|
||||
<%= render partial: "shared/inline_editing", locals: {
|
||||
<%= render partial: "shared/inline_editing", locals: {
|
||||
initial_value: truncate(title_element.name, length: Constants::MAX_EDGE_LENGTH),
|
||||
width: editable[:width] || '100%',
|
||||
name: editable[:name],
|
||||
|
|
Loading…
Reference in a new issue