BigW Consortium Gitlab

_results.html.haml 762 Bytes
Newer Older
1 2 3
- if @search_results.empty?
  = render partial: "search/results/empty"
- else
4
  %p.light
5 6 7 8 9 10 11 12 13 14 15
    Search results for
    %code
      = @search_term
    - unless @show_snippets
      - if @project
        in project #{link_to @project.name_with_namespace, [@project.namespace.becomes(Namespace), @project]}
      - elsif @group
        in group #{link_to @group.name, @group}

  .results.prepend-top-10
    .search-results
16 17 18 19 20
      - if @scope == 'projects'
        .term
          = render 'shared/projects/list', projects: @objects
      - else
        = render partial: "search/results/#{@scope.singularize}", collection: @objects
21
      = paginate @objects, theme: 'gitlab'
22 23

:javascript
24
  $(".search-results .term").highlight("#{escape_javascript(params[:search])}");