mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-22 16:06:18 +08:00
21 lines
587 B
Plaintext
21 lines
587 B
Plaintext
|
<% query ||= nil %>
|
||
|
<% text = query.present? ? highlight(result.name, query) : result.name %>
|
||
|
|
||
|
<% if result.archived? %>
|
||
|
<span class="label label-warning"><%=t "search.index.archived" %></span>
|
||
|
<% if can_view_module_archive(result.my_module) %>
|
||
|
<a href="<%= archive_my_module_path(result.my_module) %>">
|
||
|
<%= text %>
|
||
|
</a>
|
||
|
<% else %>
|
||
|
<%= text %>
|
||
|
<% end %>
|
||
|
<% else %>
|
||
|
<% if can_view_results_in_module(result.my_module) %>
|
||
|
<a href="<%= results_my_module_path(result.my_module) %>">
|
||
|
<%= text %>
|
||
|
</a>
|
||
|
<% else %>
|
||
|
<%= text %>
|
||
|
<% end %>
|
||
|
<% end %>
|