scinote-web/app/views/protocols/header/_name_label.html.erb

14 lines
512 B
Text
Raw Normal View History

2019-11-12 18:26:18 +08:00
<% if can_manage_protocol_in_repository?(@protocol) %>
<%= render partial: "shared/inline_editing.html.erb",
locals: {
initial_value: @protocol.name,
config: {
field_to_udpate: 'name',
params_group: 'protocol',
path_to_update: name_protocol_path(@protocol)
}
} %>
<% else %>
<span class="view-mode"><%= @protocol.name %></span>
<% end %>