debian-mirror-gitlab/app/views/groups/group_members/index.html.haml

82 lines
4.8 KiB
Text
Raw Normal View History

2021-04-17 20:07:23 +05:30
- add_page_specific_style 'page_bundles/members'
2020-10-24 23:57:45 +05:30
- page_title _('Group members')
2021-06-08 01:23:25 +05:30
- show_invited_members = can_manage_members? && @invited_members.load.any?
- show_access_requests = can_manage_members? && @requesters.load.any?
2020-10-24 23:57:45 +05:30
- invited_active = params[:search_invited].present? || params[:invited_members_page].present?
2014-09-02 18:07:02 +05:30
2020-07-28 23:09:34 +05:30
.js-remove-member-modal
2021-03-08 18:12:59 +05:30
.row.gl-mt-3
.col-lg-12
.gl-display-flex.gl-flex-wrap
2021-06-08 01:23:25 +05:30
- if can_manage_members?
2021-03-08 18:12:59 +05:30
.gl-w-half.gl-xs-w-full
%h4
= _('Group members')
%p
= html_escape(_('You can invite a new member to %{strong_start}%{group_name}%{strong_end}.')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe }
2021-06-08 01:23:25 +05:30
- if Feature.enabled?(:invite_members_group_modal, @group)
2021-03-08 18:12:59 +05:30
.gl-w-half.gl-xs-w-full
2021-04-17 20:07:23 +05:30
.gl-display-flex.gl-flex-wrap.gl-justify-content-end.gl-mb-3
.js-invite-group-trigger{ data: { classes: 'gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite a group') } }
.js-invite-members-trigger{ data: { variant: 'success', classes: 'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', display_text: _('Invite members') } }
2021-03-11 19:13:27 +05:30
= render 'groups/invite_members_modal', group: @group
2021-06-08 01:23:25 +05:30
- if can_manage_members? && Feature.disabled?(:invite_members_group_modal, @group)
2021-03-08 18:12:59 +05:30
%hr.gl-mt-4
%ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' }
%li.nav-tab{ role: 'presentation' }
%a.nav-link.active{ href: '#invite-member-pane', id: 'invite-member-tab', data: { toggle: 'tab' }, role: 'tab' }= _('Invite member')
%li.nav-tab{ role: 'presentation' }
%a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab', qa_selector: 'invite_group_tab' }, role: 'tab' }= _('Invite group')
.tab-content.gitlab-tab-content
.tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' }
= render_invite_member_for_group(@group, @group_member.access_level)
.tab-pane{ id: 'invite-group-pane', role: 'tabpanel' }
= render 'shared/members/invite_group', submit_url: group_group_links_path(@group), access_levels: GroupMember.access_level_roles, default_access_level: @group_member.access_level, group_link_field: 'shared_with_group_id', group_access_field: 'shared_group_access'
2015-04-26 12:48:37 +05:30
2021-03-08 18:12:59 +05:30
= render_if_exists 'groups/group_members/ldap_sync'
2019-09-04 21:01:54 +05:30
2021-03-08 18:12:59 +05:30
%ul.nav-links.mobile-separator.nav.nav-tabs
2019-10-12 21:52:04 +05:30
%li.nav-item
2021-03-08 18:12:59 +05:30
= link_to '#tab-members', class: ['nav-link', ('active' unless invited_active)], data: { toggle: 'tab' } do
2019-10-12 21:52:04 +05:30
%span
2021-03-08 18:12:59 +05:30
= _('Members')
2021-04-29 21:17:54 +05:30
%span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= @members.total_count
2021-06-08 01:23:25 +05:30
- if @group.shared_with_group_links.present?
2021-03-08 18:12:59 +05:30
%li.nav-item
= link_to '#tab-groups', class: ['nav-link'] , data: { toggle: 'tab', qa_selector: 'groups_list_tab' } do
%span
= _('Groups')
2021-04-29 21:17:54 +05:30
%span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= @group.shared_with_group_links.count
2021-03-08 18:12:59 +05:30
- if show_invited_members
%li.nav-item
= link_to '#tab-invited-members', class: ['nav-link', ('active' if invited_active)], data: { toggle: 'tab' } do
%span
= _('Invited')
2021-04-29 21:17:54 +05:30
%span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= @invited_members.total_count
2021-03-08 18:12:59 +05:30
- if show_access_requests
%li.nav-item
= link_to '#tab-access-requests', class: 'nav-link', data: { toggle: 'tab' } do
%span
= _('Access requests')
2021-04-29 21:17:54 +05:30
%span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= @requesters.count
2021-03-08 18:12:59 +05:30
.tab-content
#tab-members.tab-pane{ class: ('active' unless invited_active) }
2021-06-08 01:23:25 +05:30
.js-group-members-list{ data: { members_data: group_members_list_data_json(@group, @members, { param_name: :page, params: { invited_members_page: nil, search_invited: nil } }) } }
2021-03-08 18:12:59 +05:30
.loading
2021-06-08 01:23:25 +05:30
.gl-spinner.gl-spinner-md
- if @group.shared_with_group_links.present?
2021-03-08 18:12:59 +05:30
#tab-groups.tab-pane
2021-06-08 01:23:25 +05:30
.js-group-group-links-list{ data: { members_data: group_group_links_list_data_json(@group) } }
2021-03-08 18:12:59 +05:30
.loading
2021-06-08 01:23:25 +05:30
.gl-spinner.gl-spinner-md
2021-03-08 18:12:59 +05:30
- if show_invited_members
#tab-invited-members.tab-pane{ class: ('active' if invited_active) }
2021-06-08 01:23:25 +05:30
.js-group-invited-members-list{ data: { members_data: group_members_list_data_json(@group, @invited_members, { param_name: :invited_members_page, params: { page: nil } }) } }
2021-01-29 00:20:46 +05:30
.loading
2021-06-08 01:23:25 +05:30
.gl-spinner.gl-spinner-md
2021-03-08 18:12:59 +05:30
- if show_access_requests
#tab-access-requests.tab-pane
2021-06-08 01:23:25 +05:30
.js-group-access-requests-list{ data: { members_data: group_members_list_data_json(@group, @requesters) } }
2021-03-08 18:12:59 +05:30
.loading
2021-06-08 01:23:25 +05:30
.gl-spinner.gl-spinner-md