debian-mirror-gitlab/app/views/search/_category.html.haml

91 lines
4 KiB
Text
Raw Normal View History

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