mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
21 lines
847 B
Text
21 lines
847 B
Text
<% target = nil if local_assigns[:target].nil? %>
|
|
<% query ||= nil %>
|
|
<% text = query.present? ? highlight(step.name, query.strip.split(/\s+/)) : step.name %>
|
|
|
|
<% if can_read_protocol_in_module?(step.protocol) %>
|
|
<% if target == :comment %>
|
|
<%= route_to_other_team protocols_my_module_path(step.protocol.my_module, ctarget: "step-panel-#{step.id}"),
|
|
step.protocol.team,
|
|
text %>
|
|
<% else %>
|
|
<%= route_to_other_team protocols_my_module_path(step.protocol.my_module),
|
|
step.protocol.team,
|
|
text %>
|
|
<% end %>
|
|
<% elsif can_read_protocol_in_repository?(step.protocol) %>
|
|
<%= route_to_other_team protocol_path(step.protocol),
|
|
step.protocol.team,
|
|
text %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|