scinote-web/app/views/protocols/header/_authors_label.html.erb
2019-11-15 16:23:48 +01:00

16 lines
668 B
Plaintext

<% if can_manage_protocol_in_repository?(@protocol) && editable %>
<%= render partial: "shared/inline_editing.html.erb",
locals: {
initial_value: @protocol.authors,
config: {
field_to_udpate: 'authors',
params_group: 'protocol',
placeholder: t("protocols.header.no_authors"),
path_to_update: authors_protocol_path(@protocol)
}
}
%>
<% else %>
<span class="view-mode"><%= @protocol.authors || t("protocols.header.no_authors") %></span>
<% end %>