2016-07-28 19:29:26 +08:00
|
|
|
<% target = nil if local_assigns[:target].nil? %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% query ||= nil %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% text = query.present? ? highlight(step.name, query.strip.split(/\s+/)) : step.name %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2018-02-16 01:46:29 +08:00
|
|
|
<% if can_read_protocol_in_module?(step.protocol) %>
|
2017-12-06 02:51:44 +08:00
|
|
|
<% if target == :comment %>
|
|
|
|
<%= route_to_other_team protocols_my_module_path(step.protocol.my_module, ctarget: "step-panel-#{step.id}"),
|
|
|
|
step.protocol.team,
|
|
|
|
text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% else %>
|
2017-12-06 02:51:44 +08:00
|
|
|
<%= route_to_other_team protocols_my_module_path(step.protocol.my_module),
|
|
|
|
step.protocol.team,
|
|
|
|
text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|
2018-02-16 01:46:29 +08:00
|
|
|
<% elsif can_manage_protocol_in_repository?(step.protocol) %>
|
2017-12-06 02:51:44 +08:00
|
|
|
<%= route_to_other_team edit_protocol_path(step.protocol),
|
|
|
|
step.protocol.team,
|
|
|
|
text %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|