diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/views/shared/members/_member.html.haml | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/views/shared/members/_member.html.haml')
-rw-r--r-- | app/views/shared/members/_member.html.haml | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index 164d38986ec..e294936f82c 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -2,6 +2,9 @@ - show_controls = local_assigns.fetch(:show_controls, true) - force_mobile_view = local_assigns.fetch(:force_mobile_view, false) - member = local_assigns.fetch(:member) +- 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) - user = local_assigns.fetch(:user, member.user) - source = member.source - override = member.try(:override) @@ -25,13 +28,13 @@ = render 'shared/members/its_you_badge', user: user, current_user: current_user - = render_if_exists 'shared/members/ee/license_badge', user: user, group: @group + = render_if_exists 'shared/members/ee/license_badge', user: user, group: group, current_user_is_group_owner: current_user_is_group_owner = render 'shared/members/blocked_badge', user: user = render 'shared/members/two_factor_auth_badge', user: user - - if source.instance_of?(Group) && source != @group + - if source.instance_of?(Group) && source != membership_source · = link_to source.full_name, source, class: "gl-display-inline-block inline-link" @@ -57,10 +60,9 @@ = link_to member.created_by.name, user_path(member.created_by) = time_ago_with_tooltip(member.created_at) - if show_roles - - current_resource = @project || @group .controls.member-controls.align-items-center = render_if_exists 'shared/members/ee/ldap_tag', can_override: member.can_override? - - if show_controls && member.source == current_resource + - if show_controls && member.source == membership_source - if member.can_resend_invite? = link_to sprite_icon('paper-airplane'), polymorphic_path([:resend_invite, member]), @@ -88,7 +90,7 @@ class: ("is-active" if member.access_level == role_id), data: { id: role_id, el_id: dom_id(member), qa_selector: "#{role.downcase}_access_level_link" } = render_if_exists 'shared/members/ee/revert_ldap_group_sync_option', - group: @group, + group: group, member: member, can_override: member.can_override? .clearable-input.member-form-control{ class: [("d-sm-inline-block" unless force_mobile_view)] } @@ -105,12 +107,12 @@ - if member.can_approve? = link_to polymorphic_path([:approve_access_request, member]), method: :post, - class: "btn btn-success align-self-center m-0 mb-2 #{'mb-sm-0 ml-sm-2' unless force_mobile_view}", + class: "btn btn-success btn-icon gl-button align-self-center m-0 mb-2 #{'mb-sm-0 ml-sm-2' unless force_mobile_view}", title: _('Grant access') do %span{ class: ('d-block d-sm-none' unless force_mobile_view) } = _('Grant access') - unless force_mobile_view - = icon('check inverse', class: 'd-none d-sm-block') + = sprite_icon('check', css_class: 'd-none d-sm-block') - if member.can_remove? - if current_user == user @@ -125,8 +127,8 @@ = _("Delete") - unless force_mobile_view = sprite_icon('remove', css_class: 'd-none d-sm-block gl-icon') - = render_if_exists 'shared/members/ee/override_member_buttons', group: @group, member: member, user: user, action: :edit, can_override: member.can_override? + = render_if_exists 'shared/members/ee/override_member_buttons', group: group, member: member, user: user, action: :edit, can_override: member.can_override? - else %span.member-access-text.user-access-role= member.human_access -= render_if_exists 'shared/members/ee/override_member_buttons', group: @group, member: member, user: user, action: :confirm, can_override: member.can_override? += render_if_exists 'shared/members/ee/override_member_buttons', group: group, member: member, user: user, action: :confirm, can_override: member.can_override? |