gitlab-org--gitlab-foss/app/views/search/_results.html.haml
Vinnie Okada 76aad9b76e Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:

* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00

28 lines
846 B
Text

%h4
#{@search_results.total_count} results found
- unless @show_snippets
- if @project
for #{link_to @project.name_with_namespace, [@project.namespace.becomes(Namespace), @project]}
- elsif @group
for #{link_to @group.name, @group}
%hr
.row
.col-sm-3
- if @project
= render "project_filter"
- elsif @show_snippets
= render 'snippet_filter'
- else
= render "global_filter"
.col-sm-9
.search-results
- if @search_results.empty?
= render partial: "search/results/empty", locals: { message: "We couldn't find any matching results" }
- else
= render partial: "search/results/#{@scope.singularize}", collection: @objects
= paginate @objects, theme: 'gitlab'
:javascript
$(".search-results .term").highlight("#{escape_javascript(params[:search])}");