mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +08:00
25 lines
953 B
Text
25 lines
953 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_view_steps_in_protocol(step.protocol) %>
|
|
<% if step.protocol.in_module? %>
|
|
<% if target == :comment %>
|
|
<%= route_to_other_org protocols_my_module_path(step.protocol.my_module, ctarget: "step-panel-#{step.id}"),
|
|
step.protocol.organization,
|
|
text %>
|
|
<% else %>
|
|
<%= route_to_other_org protocols_my_module_path(step.protocol.my_module),
|
|
step.protocol.organization,
|
|
text %>
|
|
<% end %>
|
|
<% elsif can_edit_protocol(step.protocol) %>
|
|
<%= route_to_other_org edit_protocol_path(step.protocol),
|
|
step.protocol.organization,
|
|
text %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|