2019-03-02 22:35:43 +05:30
- page_title _("Members")
2019-09-04 21:01:54 +05:30
- can_admin_project_members = can?(current_user, :admin_project_member, @project)
2021-01-29 00:20:46 +05:30
- group = @project.group
2017-09-10 17:25:29 +05:30
2020-07-28 23:09:34 +05:30
.js-remove-member-modal
.row.gl-mt-3
2017-09-10 17:25:29 +05:30
.col-lg-12
2019-09-04 21:01:54 +05:30
- if project_can_be_shared?
%h4
= _("Project members")
- if can_admin_project_members
%p= share_project_description(@project)
- else
%p
2020-10-24 23:57:45 +05:30
= 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 }
2019-09-04 21:01:54 +05:30
2017-09-10 17:25:29 +05:30
.light
2019-09-04 21:01:54 +05:30
- if can_admin_project_members && project_can_be_shared?
- if !membership_locked? && @project.allowed_to_share_with_group?
%ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' }
2018-11-08 19:23:39 +05:30
%li.nav-tab{ role: 'presentation' }
2019-09-04 21:01:54 +05:30
%a.nav-link.active{ href: '#invite-member-pane', id: 'invite-member-tab', data: { toggle: 'tab' }, role: 'tab' }= _("Invite member")
%li.nav-tab{ role: 'presentation', class: ('active' if membership_locked?) }
2019-12-04 20:38:33 +05:30
%a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab', qa_selector: 'invite_group_tab' }, role: 'tab' }= _("Invite group")
2017-09-10 17:25:29 +05:30
2019-09-04 21:01:54 +05:30
.tab-content.gitlab-tab-content
.tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' }
2020-03-13 15:44:24 +05:30
= render 'shared/members/invite_member', submit_url: project_project_members_path(@project), access_levels: ProjectMember.access_level_roles, default_access_level: @project_member.access_level, can_import_members?: can_import_members?, import_path: import_project_project_members_path(@project)
2019-09-04 21:01:54 +05:30
.tab-pane{ id: 'invite-group-pane', role: 'tabpanel', class: ('active' if membership_locked?) }
2020-03-13 15:44:24 +05:30
= render 'shared/members/invite_group', submit_url: project_group_links_path(@project), access_levels: ProjectGroupLink.access_options, default_access_level: ProjectGroupLink.default_access, group_link_field: 'link_group_id', group_access_field: 'link_group_access'
2019-09-04 21:01:54 +05:30
- elsif !membership_locked?
2020-03-13 15:44:24 +05:30
.invite-member= render 'shared/members/invite_member', submit_url: project_project_members_path(@project), access_levels: ProjectMember.access_level_roles, default_access_level: @project_member.access_level, can_import_members?: can_import_members?, import_path: import_project_project_members_path(@project)
2019-09-04 21:01:54 +05:30
- elsif @project.allowed_to_share_with_group?
2020-03-13 15:44:24 +05:30
.invite-group= render 'shared/members/invite_group', access_levels: ProjectGroupLink.access_options, default_access_level: ProjectGroupLink.default_access, submit_url: project_group_links_path(@project), group_link_field: 'link_group_id', group_access_field: 'link_group_access'
2017-09-10 17:25:29 +05:30
2021-01-29 00:20:46 +05:30
= render 'shared/members/requests', membership_source: @project, group: group, requesters: @requesters
2017-09-10 17:25:29 +05:30
.clearfix
%h5.member.existing-title
2019-03-02 22:35:43 +05:30
= _("Existing members and groups")
2017-09-10 17:25:29 +05:30
- if @group_links.any?
= render 'projects/project_members/groups', group_links: @group_links
2021-01-29 00:20:46 +05:30
= render 'projects/project_members/team', project: @project, group: group, members: @project_members
2017-09-10 17:25:29 +05:30
= paginate @project_members, theme: "gitlab"