scinote-web/app/views/search/results/partials/_experiment_text.html.erb
ajugo 67dcbb0fa6
Open the correct experiment view [SCI-7662][SCI-7741] (#4798)
* Fix experiment view loading [SCI-7662]

* Fix experiment view loading [SCI-7662]
2023-01-12 11:31:04 +01:00

11 lines
416 B
Text

<% 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>
<% end %>
<% if can_read_experiment?(experiment) %>
<%= route_to_other_team(my_modules_experiment_path(experiment), experiment.project.team, text) %>
<% else %>
<%= text %>
<% end %>