% query ||= nil %>
<% text = query.present? ? highlight(protocol.name, query.strip.split(/\s+/)) : (protocol.name.empty? ? t("search.index.no_name") : protocol.name) %>
<% if protocol.in_repository_public? %>
<%=t "search.index.public" %>
<% elsif protocol.in_repository_private? %>
<%=t "search.index.private" %>
<% elsif protocol.in_repository_archived? %>
<%=t "search.index.archived" %>
<% end %>
<% if can_read_protocol_in_module?(protocol) || 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 %>