% query ||= nil %>
<% text = query.present? ? highlight(my_module.name, query) : my_module.name %>
<% if my_module.archived? %>
<%=t "search.index.archived" %>
<% if can_view_project_archive(my_module.project) and can_restore_module(my_module) %>
<%= text %>
<% else %>
<%= text %>
<% end %>
<% else %>
<% if can_view_module(my_module) %>
<%= text %>
<% else %>
<%= text %>
<% end %>
<% end %>