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? %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<span class="label label-warning"><%=t 'search.index.archived' %></span>
|
2018-01-29 18:36:36 +08:00
|
|
|
<% if can_read_experiment?(experiment) && can_restore_experiment?(experiment.project) %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= route_to_other_team root_path, experiment.project.team, text %>
|
2016-07-26 18:12:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
2018-01-29 18:36:36 +08:00
|
|
|
<% if can_read_experiment?(experiment) %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= route_to_other_team canvas_experiment_path(experiment),
|
|
|
|
experiment.project.team,
|
|
|
|
text %>
|
2016-07-26 18:12:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|