debian-mirror-gitlab/app/views/shared/members/_member.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
3.2 KiB
Text
Raw Normal View History

2016-09-13 17:45:13 +05:30
- show_roles = local_assigns.fetch(:show_roles, true)
2017-09-10 17:25:29 +05:30
- force_mobile_view = local_assigns.fetch(:force_mobile_view, false)
2018-03-17 18:26:18 +05:30
- member = local_assigns.fetch(:member)
2021-01-29 00:20:46 +05:30
- current_user_is_group_owner = local_assigns.fetch(:current_user_is_group_owner, false)
- membership_source = local_assigns.fetch(:membership_source)
- group = local_assigns.fetch(:group)
2016-11-03 12:29:30 +05:30
- user = local_assigns.fetch(:user, member.user)
- source = member.source
2019-09-04 21:01:54 +05:30
-# Note this is just for individual members. For groups please see shared/members/_group
2021-09-30 23:02:18 +05:30
%li.member.js-member.py-2.px-3.d-flex.flex-column{ class: [dom_class(member), ("flex-md-row" unless force_mobile_view)], id: dom_id(member), data: { qa_selector: 'member_row' } }
2019-09-04 21:01:54 +05:30
%span.list-item-name.mb-2.m-md-0
2016-08-24 12:49:21 +05:30
- if user
2019-09-04 21:01:54 +05:30
= image_tag avatar_icon_for_user(user, 40), class: "avatar s40 flex-shrink-0 flex-grow-0", alt: ''
2017-09-10 17:25:29 +05:30
.user-info
2020-05-24 23:13:21 +05:30
%span.mr-1
= link_to user.name, user_path(user), class: 'member js-user-link', data: { user_id: user.id }
= user_status(user)
%span.cgray= user.to_reference
2016-08-24 12:49:21 +05:30
2020-05-24 23:13:21 +05:30
.mx-n1.d-inline-flex.flex-wrap
= render_if_exists 'shared/members/ee/sso_badge', member: member
2018-12-13 13:39:08 +05:30
2020-05-24 23:13:21 +05:30
= render_if_exists 'shared/members/ee/gma_badge', member: member
2016-08-24 12:49:21 +05:30
2020-05-24 23:13:21 +05:30
= render 'shared/members/its_you_badge', user: user, current_user: current_user
2020-03-13 15:44:24 +05:30
2021-01-29 00:20:46 +05:30
= render_if_exists 'shared/members/ee/license_badge', user: user, group: group, current_user_is_group_owner: current_user_is_group_owner
2016-08-24 12:49:21 +05:30
2020-05-24 23:13:21 +05:30
= render 'shared/members/blocked_badge', user: user
= render 'shared/members/two_factor_auth_badge', user: user
2018-11-08 19:23:39 +05:30
2021-01-29 00:20:46 +05:30
- if source.instance_of?(Group) && source != membership_source
2017-09-10 17:25:29 +05:30
·
2020-11-24 15:15:51 +05:30
= link_to source.full_name, source, class: "gl-display-inline-block inline-link"
2016-11-03 12:29:30 +05:30
2017-09-10 17:25:29 +05:30
.cgray
- if member.request?
2019-02-15 15:39:39 +05:30
= _("Requested %{time_ago}").html_safe % { time_ago: time_ago_with_tooltip(member.requested_at) }
2017-09-10 17:25:29 +05:30
- else
2019-02-15 15:39:39 +05:30
= _("Given access %{time_ago}").html_safe % { time_ago: time_ago_with_tooltip(member.created_at) }
2021-01-03 14:25:43 +05:30
%span.js-expires-in{ class: ('gl-display-none' unless member.expires?) }
·
%span.js-expires-in-text{ class: "has-tooltip#{' text-warning' if member.expires_soon?}", title: (member.expires_at.to_time.in_time_zone.to_s(:medium) if member.expires?) }
- if member.expires?
2022-08-13 15:12:31 +05:30
- preposition = current_user.time_display_relative ? '' : 'on'
= _("Expires %{preposition} %{expires_at}").html_safe % { expires_at: time_ago_with_tooltip(member.expires_at), preposition: preposition }
2016-08-24 12:49:21 +05:30
- else
2019-09-04 21:01:54 +05:30
= image_tag avatar_icon_for_email(member.invite_email, 40), class: "avatar s40 flex-shrink-0 flex-grow-0", alt: ''
2017-09-10 17:25:29 +05:30
.user-info
.member= member.invite_email
.cgray
Invited
- if member.created_by
by
= link_to member.created_by.name, user_path(member.created_by)
= time_ago_with_tooltip(member.created_at)
2016-08-24 12:49:21 +05:30
- if show_roles
2019-09-04 21:01:54 +05:30
.controls.member-controls.align-items-center
= render_if_exists 'shared/members/ee/ldap_tag', can_override: member.can_override?
2021-09-30 23:02:18 +05:30
%span.member-access-text.user-access-role= member.human_access