2016-07-28 19:29:26 +08:00
|
|
|
<% target = nil if local_assigns[:target].nil? %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% query ||= nil %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% text = query.present? ? highlight(result.name, query.strip.split(/\s+/)) : result.name %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
<% if result.archived? %>
|
|
|
|
<span class="label label-warning"><%=t "search.index.archived" %></span>
|
2018-02-09 23:14:40 +08:00
|
|
|
<% if can_read_experiment?(result.my_module.experiment) %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% if target == :comment %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= route_to_other_team archive_my_module_path(result.my_module, ctarget: "result-panel-#{result.id}"),
|
|
|
|
result.my_module.experiment.project.team,
|
|
|
|
text %>
|
2016-10-11 22:16:48 +08:00
|
|
|
|
2016-07-21 19:11:15 +08:00
|
|
|
<% else %>
|
2018-02-09 23:14:40 +08:00
|
|
|
<%= route_to_other_team archive_my_module_path(result.my_module),
|
|
|
|
result.my_module.experiment.project.team,
|
|
|
|
text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
2018-01-29 18:36:36 +08:00
|
|
|
<% if can_read_experiment?(result.my_module.experiment) %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% if target == :comment %>
|
2023-09-05 22:23:42 +08:00
|
|
|
<%= route_to_other_team my_module_results_path(result.my_module, ctarget: "result-panel-#{result.id}"),
|
2017-01-25 19:01:23 +08:00
|
|
|
result.my_module.experiment.project.team,
|
|
|
|
text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% else %>
|
2023-09-05 22:23:42 +08:00
|
|
|
<%= route_to_other_team my_module_results_path(result.my_module),
|
2017-01-25 19:01:23 +08:00
|
|
|
result.my_module.experiment.project.team,
|
|
|
|
text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|