2018-08-15 08:03:55 -04:00
|
|
|
- users = capture_haml do
|
2018-12-18 03:35:54 -05:00
|
|
|
- if search_tabs?(:members)
|
2018-08-15 08:03:55 -04:00
|
|
|
%li{ class: active_when(@scope == 'users') }
|
|
|
|
= link_to search_filter_path(scope: 'users') do
|
|
|
|
Users
|
|
|
|
%span.badge.badge-pill
|
|
|
|
= limited_count(@search_results.limited_users_count)
|
|
|
|
|
2017-03-28 10:56:08 -04:00
|
|
|
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
|
2017-03-24 05:49:10 -04:00
|
|
|
.fade-left= icon('angle-left')
|
|
|
|
.fade-right= icon('angle-right')
|
2018-04-19 23:34:20 -04:00
|
|
|
%ul.nav-links.search-filter.scrolling-tabs.nav.nav-tabs
|
2017-03-24 05:49:10 -04:00
|
|
|
- if @project
|
2017-05-29 09:52:02 -04:00
|
|
|
- if project_search_tabs?(:blobs)
|
2017-05-22 12:51:09 -04:00
|
|
|
%li{ class: active_when(@scope == 'blobs') }
|
|
|
|
= link_to search_filter_path(scope: 'blobs') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Code")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2017-05-22 12:51:09 -04:00
|
|
|
= @search_results.blobs_count
|
2017-05-29 09:52:02 -04:00
|
|
|
- if project_search_tabs?(:issues)
|
2017-05-22 12:51:09 -04:00
|
|
|
%li{ class: active_when(@scope == 'issues') }
|
|
|
|
= link_to search_filter_path(scope: 'issues') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Issues")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-03-05 08:25:56 -05:00
|
|
|
= limited_count(@search_results.limited_issues_count)
|
2017-05-29 09:52:02 -04:00
|
|
|
- if project_search_tabs?(:merge_requests)
|
2017-05-22 12:51:09 -04:00
|
|
|
%li{ class: active_when(@scope == 'merge_requests') }
|
|
|
|
= link_to search_filter_path(scope: 'merge_requests') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Merge requests")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-03-05 08:25:56 -05:00
|
|
|
= limited_count(@search_results.limited_merge_requests_count)
|
2017-05-29 09:52:02 -04:00
|
|
|
- if project_search_tabs?(:milestones)
|
2017-05-22 12:51:09 -04:00
|
|
|
%li{ class: active_when(@scope == 'milestones') }
|
|
|
|
= link_to search_filter_path(scope: 'milestones') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Milestones")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-03-05 08:25:56 -05:00
|
|
|
= limited_count(@search_results.limited_milestones_count)
|
2017-05-29 09:52:02 -04:00
|
|
|
- if project_search_tabs?(:notes)
|
2017-05-22 12:51:09 -04:00
|
|
|
%li{ class: active_when(@scope == 'notes') }
|
|
|
|
= link_to search_filter_path(scope: 'notes') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Comments")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-03-05 08:25:56 -05:00
|
|
|
= limited_count(@search_results.limited_notes_count)
|
2017-05-29 09:52:02 -04:00
|
|
|
- if project_search_tabs?(:wiki)
|
2017-05-22 12:51:09 -04:00
|
|
|
%li{ class: active_when(@scope == 'wiki_blobs') }
|
|
|
|
= link_to search_filter_path(scope: 'wiki_blobs') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Wiki")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2017-05-22 12:51:09 -04:00
|
|
|
= @search_results.wiki_blobs_count
|
2017-05-29 09:52:02 -04:00
|
|
|
- if project_search_tabs?(:commits)
|
2017-05-22 12:51:09 -04:00
|
|
|
%li{ class: active_when(@scope == 'commits') }
|
|
|
|
= link_to search_filter_path(scope: 'commits') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Commits")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2017-05-22 12:51:09 -04:00
|
|
|
= @search_results.commits_count
|
2018-08-15 08:03:55 -04:00
|
|
|
= users
|
2015-04-29 05:19:54 -04:00
|
|
|
|
2017-03-24 05:49:10 -04:00
|
|
|
- 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
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Snippet Contents")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2017-03-24 05:49:10 -04:00
|
|
|
= @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
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Titles and Filenames")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2017-03-24 05:49:10 -04:00
|
|
|
= @search_results.snippet_titles_count
|
|
|
|
- else
|
|
|
|
%li{ class: active_when(@scope == 'projects') }
|
|
|
|
= link_to search_filter_path(scope: 'projects') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Projects")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-01-23 06:03:15 -05:00
|
|
|
= limited_count(@search_results.limited_projects_count)
|
2017-03-24 05:49:10 -04:00
|
|
|
%li{ class: active_when(@scope == 'issues') }
|
|
|
|
= link_to search_filter_path(scope: 'issues') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Issues")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-01-23 06:03:15 -05:00
|
|
|
= limited_count(@search_results.limited_issues_count)
|
2017-03-24 05:49:10 -04:00
|
|
|
%li{ class: active_when(@scope == 'merge_requests') }
|
|
|
|
= link_to search_filter_path(scope: 'merge_requests') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Merge requests")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-01-23 06:03:15 -05:00
|
|
|
= limited_count(@search_results.limited_merge_requests_count)
|
2017-03-24 05:49:10 -04:00
|
|
|
%li{ class: active_when(@scope == 'milestones') }
|
|
|
|
= link_to search_filter_path(scope: 'milestones') do
|
2018-06-14 00:11:10 -04:00
|
|
|
= _("Milestones")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2018-01-23 06:03:15 -05:00
|
|
|
= limited_count(@search_results.limited_milestones_count)
|
2018-08-15 08:03:55 -04:00
|
|
|
= users
|