2016-01-13 11:13:36 -05:00
|
|
|
%ul.nav-links.search-filter
|
2015-04-29 05:19:54 -04:00
|
|
|
- if @project
|
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-08-13 10:48:21 -04:00
|
|
|
%li{class: ("active" if @scope == 'milestones')}
|
|
|
|
= link_to search_filter_path(scope: 'milestones') do
|
2016-04-15 10:58:40 -04:00
|
|
|
Milestones
|
|
|
|
%span.badge
|
|
|
|
= @search_results.milestones_count
|
2015-04-29 05:19:54 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-06-14 18:04:20 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
|
|
|
|
- elsif @show_snippets
|
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
|
|
|
|
- else
|
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-04-29 05:19:54 -04:00
|
|
|
%li{class: ("active" if @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
|
2015-08-13 10:48:21 -04:00
|
|
|
%li{class: ("active" if @scope == 'milestones')}
|
|
|
|
= link_to search_filter_path(scope: 'milestones') do
|
2016-04-15 10:58:40 -04:00
|
|
|
Milestones
|
|
|
|
%span.badge
|
|
|
|
= @search_results.milestones_count
|