scinote-web/app/views/search/results/partials/_experiment_text.html.erb
2017-01-25 12:01:23 +01:00

20 lines
688 B
Plaintext

<% 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) %>
<%= route_to_other_team root_path, experiment.project.team, text %>
<% else %>
<%= text %>
<% end %>
<% else %>
<% if can_view_experiment(experiment) %>
<%= route_to_other_team canvas_experiment_path(experiment),
experiment.project.team,
text %>
<% else %>
<%= text %>
<% end %>
<% end %>