- if params[:q] - if params[:q].length > 0 %h2 = "Search for '#{params[:q]}'" - if @search_results.suggestion %p Did you mean %a{:href => "/projects/#{current_project.name}/search?q=#{@search_results.suggestion}"} = @search_results.suggestion %ul - @search_results.items.map {|i| i.object.feature["id"] }.uniq.each do |current_feature_id| - root_search_result = @search_results.items.find { |r| r.object.feature["id"] == current_feature_id } %li %a{:href => "/projects/#{current_project.name}/features/#{root_search_result.object.feature["id"]}"} = root_search_result.object.feature["name"] - if root_search_result.object.feature["tags"] = haml :tag_links, {:locals => {:tags => root_search_result.object.feature["tags"]}, :layout => false} %p != highlighted_search_result_blurb root_search_result %ul - @search_results.items.select { |r| r.object.feature["id"] == current_feature_id }.each do |search_result| - if search_result.object.scenario && search_result.object.scenario["id"] %li %a{:href => "/projects/#{current_project.name}/features/#{search_result.object.scenario["id"].gsub(";", "/scenario/")}"} = search_result.object.scenario["name"] - if search_result.object.scenario["tags"] = haml :tag_links, {:locals => {:tags => search_result.object.scenario["tags"]}, :layout => false} %p != highlighted_search_result_blurb(search_result) - if @search_results.items.empty? %p{:class => 'alert-message error'} Where's Nuker? This search returned no results. - else %p{:class => 'alert-message error'} Where's Nuker? This search returned no results.