debian-mirror-gitlab/app/views/projects/project_members/index.html.haml

90 lines
5.3 KiB
Text
Raw Normal View History

2021-04-17 20:07:23 +05:30
- add_page_specific_style 'page_bundles/members'
2019-03-02 22:35:43 +05:30
- page_title _("Members")
2017-09-10 17:25:29 +05:30
2020-07-28 23:09:34 +05:30
.row.gl-mt-3
2017-09-10 17:25:29 +05:30
.col-lg-12
2021-11-11 11:23:49 +05:30
- if can_invite_members_for_project?(@project)
2021-03-08 18:12:59 +05:30
.row
.col-md-12.col-lg-6.gl-display-flex
.gl-flex-direction-column.gl-flex-wrap.align-items-baseline
%h4
= _("Project members")
.gl-justify-content-bottom.gl-display-flex.align-items-center
2021-10-27 15:23:28 +05:30
- if can?(current_user, :admin_project_member, @project)
2021-03-08 18:12:59 +05:30
%p= share_project_description(@project)
- else
%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 }
.col-md-12.col-lg-6
2021-04-17 20:07:23 +05:30
.gl-display-flex.gl-flex-wrap.gl-justify-content-end
2021-10-27 15:23:28 +05:30
- if can_admin_project_member?(@project)
2021-11-11 11:23:49 +05:30
.js-import-a-project-modal{ data: { project_id: @project.id, project_name: @project.name } }
2021-06-08 01:23:25 +05:30
- if @project.allowed_to_share_with_group?
.js-invite-group-trigger{ data: { classes: 'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', display_text: _('Invite a group') } }
2022-04-04 11:22:00 +05:30
= render 'projects/invite_groups_modal', project: @project
2021-10-27 15:23:28 +05:30
- if can_admin_project_member?(@project)
2021-09-04 01:27:46 +05:30
.js-invite-members-trigger{ data: { variant: 'success',
classes: 'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3',
trigger_source: 'project-members-page',
display_text: _('Invite members') } }
2021-03-11 19:13:27 +05:30
= render 'projects/invite_members_modal', project: @project
2019-09-04 21:01:54 +05:30
2021-03-08 18:12:59 +05:30
- else
- if project_can_be_shared?
%h4
= _("Project members")
2021-10-27 15:23:28 +05:30
- if can?(current_user, :admin_project_member, @project)
2021-03-08 18:12:59 +05:30
%p= share_project_description(@project)
- else
%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 }
2017-09-10 17:25:29 +05:30
2022-04-04 11:22:00 +05:30
- if Feature.disabled?(:invite_members_group_modal, @project.group, default_enabled: :yaml) && can?(current_user, :admin_project_member, @project) && project_can_be_shared?
2021-03-08 18:12:59 +05:30
- if !membership_locked? && @project.allowed_to_share_with_group?
%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', class: ('active' if membership_locked?) }
%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
2021-03-08 18:12:59 +05:30
.tab-content.gitlab-tab-content
.tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' }
2021-10-27 15:23:28 +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_admin_project_member?(@project),
import_path: import_project_project_members_path(@project)
2021-03-08 18:12:59 +05:30
.tab-pane{ id: 'invite-group-pane', role: 'tabpanel', class: ('active' if membership_locked?) }
2021-10-27 15:23:28 +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',
2022-04-04 11:22:00 +05:30
groups_select_tag_data: { min_access_level: Gitlab::Access::GUEST, skip_groups: @skip_groups }
2021-03-08 18:12:59 +05:30
- elsif !membership_locked?
2021-10-27 15:23:28 +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_admin_project_member?(@project),
import_path: import_project_project_members_path(@project)
2021-03-08 18:12:59 +05:30
- elsif @project.allowed_to_share_with_group?
2021-10-27 15:23:28 +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',
2022-04-04 11:22:00 +05:30
groups_select_tag_data: { min_access_level: Gitlab::Access::GUEST, skip_groups: @skip_groups }
2021-09-04 01:27:46 +05:30
.js-project-members-list-app{ data: { members_data: project_members_app_data_json(@project,
members: @project_members,
group_links: @group_links,
invited: @invited_members,
access_requests: @requesters) } }
.loading
.gl-spinner.gl-spinner-md