mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
24 lines
756 B
Text
24 lines
756 B
Text
<% 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? %>
|
|
<span class="label label-info">
|
|
<%=t "search.index.public" %>
|
|
</span>
|
|
|
|
<% elsif protocol.in_repository_private? %>
|
|
<span class="label label-info">
|
|
<%=t "search.index.private" %>
|
|
</span>
|
|
|
|
<% elsif protocol.in_repository_archived? %>
|
|
<span class="label label-warning">
|
|
<%=t "search.index.archived" %>
|
|
</span>
|
|
|
|
<% end %>
|
|
<% if can_view_protocol(protocol) %>
|
|
<%= link_to text, '#', 'data-action': 'protocol-preview', 'data-url': preview_protocol_path(protocol) %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|