<% 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) %> <%= text %> <% else %> <%= text %> <% end %> <% else %> <% if can_view_module(my_module) %> <% case link_to_page %> <% when :samples %> <%= text %> <% when :protocols %> <%= text %> <% when :canvas %> <%= text %> <% when :results %> <%= text %> <% else %> <%= text %> <% end %> <% else %> <%= text %> <% end %> <% end %>