<% link_to_page = :protocols if local_assigns[:link_to_page].nil? %> <% query ||= nil %> <% text = query.present? ? highlight(my_module.name, query.strip.split(/\s+/)) : my_module.name %> <% if my_module.archived? %> <%=t "search.index.archived" %> <% if can_view_experiment_archive(my_module.experiment) and can_restore_module(my_module) %> <%= route_to_other_org module_archive_experiment_url(my_module.experiment), my_module.experiment.project.organization, text %> <% else %> <%= text %> <% end %> <% else %> <% if can_view_module(my_module) %> <% case link_to_page %> <% when :samples %> <%= route_to_other_org samples_my_module_path(my_module), my_module.experiment.project.organization, text %> <% when :protocols %> <%= route_to_other_org protocols_my_module_path(my_module), my_module.experiment.project.organization, text %> <% when :canvas %> <%= route_to_other_org canvas_experiment_path(my_module.experiment), my_module.experiment.project.organization, text %> <% when :results %> <%= route_to_other_org results_my_module_path(my_module), my_module.experiment.project.organization, text %> <% else %> <%= text %> <% end %> <% else %> <%= text %> <% end %> <% end %>