<% target = nil if local_assigns[:target].nil? %> <% query ||= nil %> <% text = query.present? ? highlight(result.name, query.strip.split(/\s+/)) : result.name %> <% if result.archived? %> <%=t "search.index.archived" %> <% if can_view_module_archive(result.my_module) %> <% if target == :comment %> <%= route_to_other_org archive_my_module_path(result.my_module, ctarget: "result-panel-#{result.id}"), result.my_module.experiment.project.organization, text %> <% else %> <%= route_to_other_org archive_my_module_path(result.my_module), result.my_module.experiment.project.organization, text %> <% end %> <% else %> <%= text %> <% end %> <% else %> <% if can_view_results_in_module(result.my_module) %> <% if target == :comment %> <%= route_to_other_org results_my_module_path(result.my_module, ctarget: "result-panel-#{result.id}"), result.my_module.experiment.project.organization, text %> <% else %> <%= route_to_other_org results_my_module_path(result.my_module), result.my_module.experiment.project.organization, text %> <% end %> <% else %> <%= text %> <% end %> <% end %>