BigW Consortium Gitlab

_category.html.haml 3.28 KB
Newer Older
1
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
2 3 4 5
  .fade-left= icon('angle-left')
  .fade-right= icon('angle-right')
  %ul.nav-links.search-filter.scrolling-tabs
    - if @project
6
      - if project_search_tabs?(:blobs)
7 8 9 10 11
        %li{ class: active_when(@scope == 'blobs') }
          = link_to search_filter_path(scope: 'blobs') do
            Code
            %span.badge
              = @search_results.blobs_count
12
      - if project_search_tabs?(:issues)
13 14 15 16 17
        %li{ class: active_when(@scope == 'issues') }
          = link_to search_filter_path(scope: 'issues') do
            Issues
            %span.badge
              = @search_results.issues_count
18
      - if project_search_tabs?(:merge_requests)
19 20 21 22 23
        %li{ class: active_when(@scope == 'merge_requests') }
          = link_to search_filter_path(scope: 'merge_requests') do
            Merge requests
            %span.badge
              = @search_results.merge_requests_count
24
      - if project_search_tabs?(:milestones)
25 26 27 28 29
        %li{ class: active_when(@scope == 'milestones') }
          = link_to search_filter_path(scope: 'milestones') do
            Milestones
            %span.badge
              = @search_results.milestones_count
30
      - if project_search_tabs?(:notes)
31 32 33 34 35
        %li{ class: active_when(@scope == 'notes') }
          = link_to search_filter_path(scope: 'notes') do
            Comments
            %span.badge
              = @search_results.notes_count
36
      - if project_search_tabs?(:wiki)
37 38 39 40 41
        %li{ class: active_when(@scope == 'wiki_blobs') }
          = link_to search_filter_path(scope: 'wiki_blobs') do
            Wiki
            %span.badge
              = @search_results.wiki_blobs_count
42
      - if project_search_tabs?(:commits)
43 44 45 46 47
        %li{ class: active_when(@scope == 'commits') }
          = link_to search_filter_path(scope: 'commits') do
            Commits
            %span.badge
              = @search_results.commits_count
48

49 50 51 52 53 54 55 56 57 58 59
    - elsif @show_snippets
      %li{ class: active_when(@scope == 'snippet_blobs') }
        = link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do
          Snippet Contents
          %span.badge
            = @search_results.snippet_blobs_count
      %li{ class: active_when(@scope == 'snippet_titles') }
        = link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do
          Titles and Filenames
          %span.badge
            = @search_results.snippet_titles_count
60

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
    - else
      %li{ class: active_when(@scope == 'projects') }
        = link_to search_filter_path(scope: 'projects') do
          Projects
          %span.badge
            = @search_results.projects_count
      %li{ class: active_when(@scope == 'issues') }
        = link_to search_filter_path(scope: 'issues') do
          Issues
          %span.badge
            = @search_results.issues_count
      %li{ class: active_when(@scope == 'merge_requests') }
        = link_to search_filter_path(scope: 'merge_requests') do
          Merge requests
          %span.badge
            = @search_results.merge_requests_count
      %li{ class: active_when(@scope == 'milestones') }
        = link_to search_filter_path(scope: 'milestones') do
          Milestones
          %span.badge
            = @search_results.milestones_count