<% query ||= nil %> <% text = query.present? ? highlight(report.name, query.strip.split(/\s+/)) : report.name %> <% if can_view_reports(report.project) %> <%= text %> <% else %> <%= text %> <% end %>