scinote-web/app/views/protocols/index/_protocol_versions.html.erb

17 lines
649 B
Text
Raw Normal View History

<% if protocol.in_repository_published_original? || protocol.in_repository_published_version? %>
<% parent = protocol.parent || protocol %>
<%= link_to versions_modal_protocol_path(parent), class: 'protocol-versions-link', remote: true do %>
<%= protocol.nr_of_versions %>
<% end %>
<% if protocol.draft.present? %>
/
<%= link_to protocol_path(parent.draft) do %>
<%= t("protocols.index.table.draft") %>
<% end %>
<% end %>
<% elsif protocol.in_repository_draft? %>
<%= link_to protocol_path(protocol) do %>
<%= t("protocols.index.table.draft") %>
<% end %>
<% end %>