scinote-web/app/views/search/results/partials/_experiment_text.html.erb

12 lines
412 B
Plaintext
Raw Normal View History

<% query ||= nil %>
<% text = query.present? ? highlight(experiment.name, query.strip.split(/\s+/)) : experiment.name %>
<% if experiment.archived? %>
2021-01-21 18:24:25 +08:00
<span class="label label-warning"><%= t('search.index.archived') %></span>
<% end %>
<% if can_read_experiment?(experiment) %>
<%= route_to_other_team(canvas_experiment_path(experiment), experiment.project.team, text) %>
<% else %>
2021-01-21 18:24:25 +08:00
<%= text %>
<% end %>