diff options
Diffstat (limited to 'app/views/groups/group_members/index.html.haml')
-rw-r--r-- | app/views/groups/group_members/index.html.haml | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 106a7832cc7..45488791272 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -1,27 +1,26 @@ - add_page_specific_style 'page_bundles/members' - page_title _('Group members') -- can_manage_members = can?(current_user, :admin_group_member, @group) -- show_invited_members = can_manage_members && @invited_members.exists? -- show_access_requests = can_manage_members && @requesters.exists? +- show_invited_members = can_manage_members? && @invited_members.load.any? +- show_access_requests = can_manage_members? && @requesters.load.any? - invited_active = params[:search_invited].present? || params[:invited_members_page].present? .js-remove-member-modal .row.gl-mt-3 .col-lg-12 .gl-display-flex.gl-flex-wrap - - if can_manage_members + - if can_manage_members? .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 } - - if can_invite_members_for_group?(@group) + - if Feature.enabled?(:invite_members_group_modal, @group) .gl-w-half.gl-xs-w-full .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') } } = render 'groups/invite_members_modal', group: @group - - if can_manage_members && !can_invite_members_for_group?(@group) + - if can_manage_members? && Feature.disabled?(:invite_members_group_modal, @group) %hr.gl-mt-4 %ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' } %li.nav-tab{ role: 'presentation' } @@ -42,7 +41,7 @@ %span = _('Members') %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= @members.total_count - - if @group.shared_with_group_links.any? + - if @group.shared_with_group_links.present? %li.nav-item = link_to '#tab-groups', class: ['nav-link'] , data: { toggle: 'tab', qa_selector: 'groups_list_tab' } do %span @@ -62,23 +61,21 @@ %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= @requesters.count .tab-content #tab-members.tab-pane{ class: ('active' unless invited_active) } - .js-group-members-list{ data: group_members_list_data_attributes(@group, @members) } + .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 } }) } } .loading - .spinner.spinner-md - = paginate @members, theme: 'gitlab', params: { invited_members_page: nil, search_invited: nil } - - if @group.shared_with_group_links.any? + .gl-spinner.gl-spinner-md + - if @group.shared_with_group_links.present? #tab-groups.tab-pane - .js-group-group-links-list{ data: group_group_links_list_data_attributes(@group) } + .js-group-group-links-list{ data: { members_data: group_group_links_list_data_json(@group) } } .loading - .spinner.spinner-md + .gl-spinner.gl-spinner-md - if show_invited_members #tab-invited-members.tab-pane{ class: ('active' if invited_active) } - .js-group-invited-members-list{ data: group_members_list_data_attributes(@group, @invited_members) } + .js-group-invited-members-list{ data: { members_data: group_members_list_data_json(@group, @invited_members, { param_name: :invited_members_page, params: { page: nil } }) } } .loading - .spinner.spinner-md - = paginate @invited_members, param_name: 'invited_members_page', theme: 'gitlab', params: { page: nil } + .gl-spinner.gl-spinner-md - if show_access_requests #tab-access-requests.tab-pane - .js-group-access-requests-list{ data: group_members_list_data_attributes(@group, @requesters) } + .js-group-access-requests-list{ data: { members_data: group_members_list_data_json(@group, @requesters) } } .loading - .spinner.spinner-md + .gl-spinner.gl-spinner-md |