summaryrefslogtreecommitdiff
path: root/app/views/shared/users
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/users')
-rw-r--r--app/views/shared/users/_user.html.haml13
-rw-r--r--app/views/shared/users/index.html.haml20
2 files changed, 33 insertions, 0 deletions
diff --git a/app/views/shared/users/_user.html.haml b/app/views/shared/users/_user.html.haml
new file mode 100644
index 00000000000..f92c12102bb
--- /dev/null
+++ b/app/views/shared/users/_user.html.haml
@@ -0,0 +1,13 @@
+- user = local_assigns.fetch(:user)
+
+.col-lg-3.col-md-4.col-sm-12
+ .gl-card.gl-mb-5
+ .gl-card-body
+ = image_tag avatar_icon_for_user(user, 40), class: "avatar s40", alt: ''
+
+ .user-info
+ .block-truncated
+ = link_to user.name, user_path(user), class: 'user js-user-link', data: { user_id: user.id }
+
+ .block-truncated
+ %span.gl-text-gray-900= user.to_reference
diff --git a/app/views/shared/users/index.html.haml b/app/views/shared/users/index.html.haml
new file mode 100644
index 00000000000..dd6b14d6be2
--- /dev/null
+++ b/app/views/shared/users/index.html.haml
@@ -0,0 +1,20 @@
+- followers_illustration_path = 'illustrations/starred_empty.svg'
+- followers_visitor_empty_message = s_('UserProfile|This user doesn\'t have any followers.')
+- followers_current_user_empty_message_header = s_('UserProfile|You do not have any followers.')
+- following_illustration_path = 'illustrations/starred_empty.svg'
+- following_visitor_empty_message = s_('UserProfile|This user isn\'t following other users.')
+- following_current_user_empty_message_header = s_('UserProfile|You are not following other users.')
+
+- if users.size > 0
+ .row.gl-mt-3
+ = render partial: 'shared/users/user', collection: users, as: :user
+ = paginate users, theme: 'gitlab'
+- else
+ - if @user_followers
+ = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: followers_illustration_path,
+ visitor_empty_message: followers_visitor_empty_message,
+ current_user_empty_message_header: followers_current_user_empty_message_header}
+ - elsif @user_following
+ = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: following_illustration_path,
+ visitor_empty_message: following_visitor_empty_message,
+ current_user_empty_message_header: following_current_user_empty_message_header}