2021-03-11 12:09:28 +00:00
- add_page_specific_style 'page_bundles/members'
2019-01-14 21:39:42 +00:00
- page_title _("Members")
2017-07-07 14:40:41 +00:00
2022-05-20 15:09:10 +00:00
= render_if_exists 'projects/free_user_cap_alert', project: @project
2022-03-30 21:09:29 +00:00
2020-06-26 06:09:03 +00:00
.row.gl-mt-3
2017-07-05 19:17:02 +00:00
.col-lg-12
2022-06-23 15:09:32 +00:00
.gl-display-flex.gl-flex-wrap
- if can_invite_members_for_project?(@project)
2021-01-13 12:10:27 +00:00
%h4
= _("Project members")
2022-06-23 15:09:32 +00:00
%p.gl-w-full.order-md-1
= project_member_header_subtext(@project)
.gl-display-flex.gl-flex-wrap.gl-align-items-flex-start.gl-ml-auto.gl-md-w-auto.gl-w-full.gl-mt-3
- invite_group_top_margin = ''
- if can_admin_project_member?(@project)
2022-07-07 15:08:37 +00:00
.js-import-project-members-trigger{ data: { classes: 'gl-md-w-auto gl-w-full' } }
.js-import-project-members-modal{ data: { project_id: @project.id, project_name: @project.name } }
2022-06-23 15:09:32 +00:00
- invite_group_top_margin = 'gl-md-mt-0 gl-mt-3'
- if @project.allowed_to_share_with_group?
.js-invite-group-trigger{ data: { classes: "gl-md-w-auto gl-w-full gl-md-ml-3 #{invite_group_top_margin}", display_text: _('Invite a group') } }
= render 'projects/invite_groups_modal', project: @project
- if can_admin_project_member?(@project)
.js-invite-members-trigger{ data: { variant: 'confirm',
classes: 'gl-md-w-auto gl-w-full gl-md-ml-3 gl-md-mt-0 gl-mt-3',
trigger_source: 'project-members-page',
display_text: _('Invite members') } }
= render 'projects/invite_members_modal', project: @project
- else
- if project_can_be_shared?
%h4
= _("Project members")
- if can?(current_user, :admin_project_member, @project)
%p.gl-w-full
= project_member_header_subtext(@project)
- else
%p.gl-w-full
= 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 }
2021-01-13 12:10:27 +00:00
2021-05-20 00:10:36 +00:00
.js-project-members-list-app{ data: { members_data: project_members_app_data_json(@project,
members: @project_members,
invited: @invited_members,
2022-06-30 03:08:59 +00:00
access_requests: @requesters,
include_relations: @include_relations,
search: params[:search_groups]) } }
2022-03-07 12:16:11 +00:00
= gl_loading_icon(css_class: 'gl-my-5', size: 'md')