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

72 lines
2.6 KiB
Text
Raw Normal View History

%ul.nav-links.search-filter
- if @project
%li{ class: active_when(@scope == 'blobs') }
= link_to search_filter_path(scope: 'blobs') do
2016-04-15 10:58:40 -04:00
Code
%span.badge
= @search_results.blobs_count
%li{ class: active_when(@scope == 'issues') }
= link_to search_filter_path(scope: 'issues') do
2016-04-15 10:58:40 -04:00
Issues
%span.badge
= @search_results.issues_count
%li{ class: active_when(@scope == 'merge_requests') }
= link_to search_filter_path(scope: 'merge_requests') do
2016-04-15 10:58:40 -04:00
Merge requests
%span.badge
= @search_results.merge_requests_count
%li{ class: active_when(@scope == 'milestones') }
2015-08-13 10:48:21 -04:00
= link_to search_filter_path(scope: 'milestones') do
2016-04-15 10:58:40 -04:00
Milestones
%span.badge
= @search_results.milestones_count
%li{ class: active_when(@scope == 'notes') }
= link_to search_filter_path(scope: 'notes') do
2016-04-15 10:58:40 -04:00
Comments
%span.badge
= @search_results.notes_count
%li{ class: active_when(@scope == 'wiki_blobs') }
= link_to search_filter_path(scope: 'wiki_blobs') do
2016-04-15 10:58:40 -04:00
Wiki
%span.badge
= @search_results.wiki_blobs_count
%li{ class: active_when(@scope == 'commits') }
= link_to search_filter_path(scope: 'commits') do
2016-04-15 10:58:40 -04:00
Commits
%span.badge
= @search_results.commits_count
- 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
2016-04-15 10:58:40 -04:00
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
2016-04-15 10:58:40 -04:00
Titles and Filenames
%span.badge
= @search_results.snippet_titles_count
- else
%li{ class: active_when(@scope == 'projects') }
= link_to search_filter_path(scope: 'projects') do
2016-04-15 10:58:40 -04:00
Projects
%span.badge
= @search_results.projects_count
%li{ class: active_when(@scope == 'issues') }
= link_to search_filter_path(scope: 'issues') do
2016-04-15 10:58:40 -04:00
Issues
%span.badge
= @search_results.issues_count
%li{ class: active_when(@scope == 'merge_requests') }
= link_to search_filter_path(scope: 'merge_requests') do
2016-04-15 10:58:40 -04:00
Merge requests
%span.badge
= @search_results.merge_requests_count
%li{ class: active_when(@scope == 'milestones') }
2015-08-13 10:48:21 -04:00
= link_to search_filter_path(scope: 'milestones') do
2016-04-15 10:58:40 -04:00
Milestones
%span.badge
= @search_results.milestones_count