mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 06:35:14 +08:00
29 lines
1 KiB
Text
29 lines
1 KiB
Text
<% 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? %>
|
|
<span class="label label-info">
|
|
<%= t('search.index.in_repository') %>
|
|
</span>
|
|
|
|
<% end %>
|
|
<% if protocol.archived? %>
|
|
<span class="label label-warning">
|
|
<%= t('search.index.archived') %>
|
|
</span>
|
|
|
|
<% 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" %>
|
|
|
|
<!-- Libraries for formulas -->
|
|
<%= render partial: "shared/formulas_libraries.html.erb" %>
|
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
|
<%= javascript_include_tag "protocols/index" %>
|
|
<%= javascript_include_tag "protocols/steps" %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|