2016-07-26 18:12:43 +08:00
|
|
|
<% query ||= nil %>
|
|
|
|
<% text = query.present? ? highlight(experiment.name, query.strip.split(/\s+/)) : experiment.name %>
|
|
|
|
|
|
|
|
<% if experiment.archived? %>
|
|
|
|
<span class="label label-warning"><%=t "search.index.archived" %></span>
|
|
|
|
<% if can_view_experiment(experiment) and can_restore_experiment(experiment.project) %>
|
|
|
|
<a href="/">
|
|
|
|
<%= text %>
|
|
|
|
</a>
|
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% if can_view_experiment(experiment) %>
|
2016-08-22 21:35:47 +08:00
|
|
|
<a href="<%= canvas_experiment_path(experiment) %>">
|
2016-07-26 18:12:43 +08:00
|
|
|
<%= text %>
|
|
|
|
</a>
|
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|