2018-03-17 18:26:18 +05:30
|
|
|
- membership_source = local_assigns.fetch(:membership_source)
|
|
|
|
- requesters = local_assigns.fetch(:requesters)
|
2021-01-29 00:20:46 +05:30
|
|
|
- group = local_assigns.fetch(:group)
|
|
|
|
- current_user_is_group_owner = group && group.has_owner?(current_user)
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
- return if requesters.empty?
|
|
|
|
|
2022-08-27 11:52:29 +05:30
|
|
|
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mt-3 gl-mb-5', data: { testid: 'access-requests' } }, body_options: { class: 'gl-p-0' }) do |c|
|
|
|
|
- c.header do
|
|
|
|
= _('Users requesting access to')
|
2018-03-17 18:26:18 +05:30
|
|
|
%strong= membership_source.name
|
2022-01-26 12:08:38 +05:30
|
|
|
= gl_badge_tag requesters.size
|
2021-09-30 23:02:18 +05:30
|
|
|
= render 'shared/members/manage_access_button', path: membership_source.is_a?(Project) ? project_project_members_path(@project, tab: 'access_requests') : group_group_members_path(@group, tab: 'access_requests')
|
2022-08-27 11:52:29 +05:30
|
|
|
- c.body do
|
|
|
|
%ul.content-list.members-list
|
|
|
|
= render partial: 'shared/members/member',
|
|
|
|
collection: requesters, as: :member,
|
|
|
|
locals: { membership_source: membership_source,
|
2021-01-29 00:20:46 +05:30
|
|
|
group: group,
|
|
|
|
current_user_is_group_owner: current_user_is_group_owner }
|