diff options
Diffstat (limited to 'app/views/projects/project_members')
-rw-r--r-- | app/views/projects/project_members/index.html.haml | 55 |
1 files changed, 38 insertions, 17 deletions
diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index cf39ac4dd56..beb435d268a 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,10 +1,11 @@ - page_title _("Members") - group = @project.group +- vue_project_members_list_enabled = Feature.enabled?(:vue_project_members_list, @project, default_enabled: :yaml) .js-remove-member-modal .row.gl-mt-3 .col-lg-12 - - if invite_members_allowed?(group) + - if can_invite_members_for_project?(@project) .row .col-md-12.col-lg-6.gl-display-flex .gl-flex-direction-column.gl-flex-wrap.align-items-baseline @@ -19,7 +20,7 @@ .col-md-12.col-lg-6 .gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2.gl-mb-3 .js-invite-members-trigger.gl-px-2.gl-sm-w-auto.gl-w-full.gl-mb-4{ data: { classes: 'btn btn-success gl-button gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite members') } } - = render_if_exists 'projects/invite_members_modal', project: @project + = render 'projects/invite_members_modal', project: @project - else - if project_can_be_shared? @@ -31,7 +32,7 @@ %p = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } - - if !invite_members_allowed?(group) && can_manage_project_members?(@project) && project_can_be_shared? + - if !can_invite_members_for_project?(@project) && can_manage_project_members?(@project) && project_can_be_shared? - if !membership_locked? && @project.allowed_to_share_with_group? %ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' } %li.nav-tab{ role: 'presentation' } @@ -74,24 +75,44 @@ %span.badge.badge-pill= @requesters.count .tab-content #tab-members.tab-pane{ class: ('active' unless groups_tab_active?) } - = render 'projects/project_members/team', project: @project, group: group, members: @project_members, current_user_is_group_owner: current_user_is_group_owner?(@project) + - if vue_project_members_list_enabled + .js-project-members-list{ data: project_members_list_data_attributes(@project, @project_members) } + .loading + .spinner.spinner-md + - else + = render 'projects/project_members/team', project: @project, group: group, members: @project_members, current_user_is_group_owner: current_user_is_group_owner?(@project) = paginate @project_members, theme: "gitlab", params: { search_groups: nil } - if show_groups?(@group_links) #tab-groups.tab-pane{ class: ('active' if groups_tab_active?) } - = render 'projects/project_members/groups', group_links: @group_links + - if vue_project_members_list_enabled + .js-project-group-links-list{ data: project_group_links_list_data_attributes(@project, @group_links) } + .loading + .spinner.spinner-md + - else + = render 'projects/project_members/groups', group_links: @group_links - if show_invited_members?(@project, @invited_members) #tab-invited-members.tab-pane - .card.card-without-border - = render 'shared/members/tab_pane/header' do - = render 'shared/members/tab_pane/title' do - = html_escape(_('Members invited to %{strong_start}%{project_name}%{strong_end}')) % { project_name: @project.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - %ul.content-list.members-list - = render partial: 'shared/members/member', collection: @invited_members, as: :member, locals: { membership_source: @project, group: group, current_user_is_group_owner: current_user_is_group_owner?(@project) } + - if vue_project_members_list_enabled + .js-project-invited-members-list{ data: project_members_list_data_attributes(@project, @invited_members) } + .loading + .spinner.spinner-md + - else + .card.card-without-border + = render 'shared/members/tab_pane/header' do + = render 'shared/members/tab_pane/title' do + = html_escape(_('Members invited to %{strong_start}%{project_name}%{strong_end}')) % { project_name: @project.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } + %ul.content-list.members-list + = render partial: 'shared/members/member', collection: @invited_members, as: :member, locals: { membership_source: @project, group: group, current_user_is_group_owner: current_user_is_group_owner?(@project) } - if show_access_requests?(@project, @requesters) #tab-access-requests.tab-pane - .card.card-without-border - = render 'shared/members/tab_pane/header' do - = render 'shared/members/tab_pane/title' do - = html_escape(_('Users requesting access to %{strong_start}%{project_name}%{strong_end}')) % { project_name: @project.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - %ul.content-list.members-list - = render partial: 'shared/members/member', collection: @requesters, as: :member, locals: { membership_source: @project, group: group } + - if vue_project_members_list_enabled + .js-project-access-requests-list{ data: project_members_list_data_attributes(@project, @requesters) } + .loading + .spinner.spinner-md + - else + .card.card-without-border + = render 'shared/members/tab_pane/header' do + = render 'shared/members/tab_pane/title' do + = html_escape(_('Users requesting access to %{strong_start}%{project_name}%{strong_end}')) % { project_name: @project.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } + %ul.content-list.members-list + = render partial: 'shared/members/member', collection: @requesters, as: :member, locals: { membership_source: @project, group: group } |