gitlab-org--gitlab-foss/app/views/search/_results.html.haml

29 lines
846 B
Text
Raw Normal View History

%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])}");