<% query ||= nil %> <% text = query.present? ? highlight(escape_input(protocol.name), query.strip.split(/\s+/)) : (protocol.name.blank? ? t('search.index.no_name') : escape_input(protocol.name)) %> <% if protocol.in_repository? %> <%= t('search.index.in_repository') %>   <% end %> <% if protocol.archived? %> <%= t('search.index.archived') %>   <% end %> <% if protocol.in_module? && can_read_protocol_in_module?(protocol) || protocol.in_repository? && can_read_protocol_in_repository?(protocol) %> <%= link_to text, '#', 'data-action': 'protocol-preview', 'data-url': preview_protocol_path(protocol) %> <%= javascript_include_tag "handsontable.full" %> <%= render partial: "shared/formulas_libraries.html.erb" %> <%= stylesheet_link_tag 'datatables' %> <%= javascript_include_tag "protocols/index" %> <%= javascript_include_tag "protocols/steps" %> <% else %> <%= text %> <% end %>