Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-08-14 16:43:46 +0300
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2019-03-14 20:15:40 +0300
commit70261ff11c93dcad30b0f4b3b61c4289d0ae1bb3 (patch)
tree6157c1cfd5b02e78ede0de294ed5af2d080d1ce9 /app/views/search
parentc53704398435e6585dbf7e26415a55162fa4e4a8 (diff)
add users search results to global search
Diffstat (limited to 'app/views/search')
-rw-r--r--app/views/search/_category.html.haml5
-rw-r--r--app/views/search/results/_user.html.haml8
2 files changed, 13 insertions, 0 deletions
diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml
index aaf9b973cda..65c1a30716b 100644
--- a/app/views/search/_category.html.haml
+++ b/app/views/search/_category.html.haml
@@ -78,3 +78,8 @@
= _("Milestones")
%span.badge.badge-pill
= limited_count(@search_results.limited_milestones_count)
+ %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)
diff --git a/app/views/search/results/_user.html.haml b/app/views/search/results/_user.html.haml
new file mode 100644
index 00000000000..fd454950ef0
--- /dev/null
+++ b/app/views/search/results/_user.html.haml
@@ -0,0 +1,8 @@
+%ul.content-list
+ %li
+ .avatar-cell.d-none.d-sm-block
+ = user_avatar(user: user, user_name: user.name, css_class: 'd-none d-sm-inline avatar s40')
+ .user-info
+ = link_to user_path(user), class: 'd-none d-sm-inline' do
+ .item-title= user.name
+ .cgray= user.to_reference