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

26 lines
1.1 KiB
Text
Raw Normal View History

<% if !subject || subject.in_repository? %>
<%= render partial: "global_activities/references/team.html.erb",
locals: { team: team, subject: team, breadcrumbs: breadcrumbs, values: values, type_of: type_of } %>
<% else %>
<%= render partial: "global_activities/references/my_module.html.erb",
locals: { team: team, subject: subject&.my_module, breadcrumbs: breadcrumbs, values: values, type_of: type_of } %>
<% end %>
2019-03-29 22:09:20 +08:00
<% if subject %>
<% if subject.in_repository? %>
<div class="ga-breadcrumb">
<span class="fas fa-edit"></span>
2023-02-21 22:25:01 +08:00
<%= route_to_other_team protocols_path(team: subject.team),
2019-03-29 22:09:20 +08:00
team,
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
title: subject.name %>
</div>
<% end %>
<% else %>
<div class="ga-breadcrumb">
<span class="fas fa-edit"></span>
<span title="<%= breadcrumbs['protocol'] %>">
<%= breadcrumbs['protocol']&.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
2019-03-29 22:09:20 +08:00
</div>
<% end %>