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

21 lines
883 B
Plaintext
Raw Normal View History

<%= render partial: "global_activities/references/my_module.html.erb",
locals: { subject: subject&.my_module, breadcrumbs: breadcrumbs } %>
<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 subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
protocols_my_module_path(subject.my_module), title: subject.name %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:protocol] %>">
2019-03-19 21:12:39 +08:00
<%= breadcrumbs[:protocol]&.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>