2016-07-21 19:11:15 +08:00
|
|
|
<% query ||= nil %>
|
|
|
|
<% text = query.present? ? highlight(protocol.name, query.strip.split(/\s+/)) : (protocol.name.empty? ? t("search.index.no_name") : protocol.name) %>
|
|
|
|
|
2017-01-06 01:08:59 +08:00
|
|
|
<% if protocol.in_repository_public? %>
|
|
|
|
<span class="label label-info">
|
|
|
|
<%=t "search.index.public" %>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<% elsif protocol.in_repository_private? %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<span class="label label-info">
|
2017-01-06 01:08:59 +08:00
|
|
|
<%=t "search.index.private" %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</span>
|
|
|
|
|
2017-01-06 01:08:59 +08:00
|
|
|
<% elsif protocol.in_repository_archived? %>
|
|
|
|
<span class="label label-warning">
|
|
|
|
<%=t "search.index.archived" %>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<% end %>
|
2018-02-02 01:41:28 +08:00
|
|
|
<% if can_read_protocol_in_module?(protocol) || can_read_protocol_in_repository?(protocol) %>
|
2017-01-06 17:46:36 +08:00
|
|
|
<%= link_to text, '#', 'data-action': 'protocol-preview', 'data-url': preview_protocol_path(protocol) %>
|
2019-07-02 17:21:00 +08:00
|
|
|
|
2021-05-04 22:05:19 +08:00
|
|
|
<%= javascript_include_tag "handsontable.full" %>
|
2019-07-02 17:21:00 +08:00
|
|
|
|
|
|
|
<!-- Libraries for formulas -->
|
|
|
|
<%= render partial: "shared/formulas_libraries.html.erb" %>
|
|
|
|
|
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
|
|
|
<%= javascript_include_tag "protocols/index" %>
|
|
|
|
<%= javascript_include_tag "protocols/steps" %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% else %>
|
2017-01-06 01:08:59 +08:00
|
|
|
<%= text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|