summaryrefslogtreecommitdiff
path: root/app/views/layouts/nav/_search.html.haml
blob: f95f6acb28dfeca8b67bd506271455fbde231b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- if @search_term
  %ul.nav.nav-sidebar.search-filter
    - if @project
      = render 'layouts/nav/search/project'

    - elsif @show_snippets
      = render 'layouts/nav/search/snippet'

    - else
      %li{class: ("active" if @scope == 'projects')}
        = link_to search_filter_path(scope: 'projects') do
          = icon('bookmark fw')
          %span
            Projects
            %span.count
              = @search_results.projects_count
      %li{class: ("active" if @scope == 'issues')}
        = link_to search_filter_path(scope: 'issues') do
          = icon('exclamation-circle fw')
          %span
            Issues
            %span.count
              = @search_results.issues_count
      %li{class: ("active" if @scope == 'merge_requests')}
        = link_to search_filter_path(scope: 'merge_requests') do
          = icon('tasks fw')
          %span
            Merge requests
            %span.count
              = @search_results.merge_requests_count