scinote-web/app/views/global_activities/references/_protocol.html.erb

19 lines
793 B
Text

<%= render partial: "global_activities/references/my_module.html.erb",
locals: { subject: subject&.my_module } %>
<div class="col-xs-2">
<span class="fas fa-edit"></span>
<% if subject %>
<% if subject.in_repository %>
<%= route_to_other_team protocols_path(team: subject.team),
subject.team,
subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH),
title: subject.name %>
<% else %>
<%= link_to truncated_name, protocols_my_module_path(subject.my_module), title: subject.name %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:protocol] %>">
<%= breadcrumbs[:protocol].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>