diff options
author | Phil Hughes <me@iamphill.com> | 2019-05-28 10:50:15 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-05-28 10:50:15 +0300 |
commit | ff7766b954984f448428cc153351db55029ccc8a (patch) | |
tree | 7f1a1ab27b1020e3f49bf0a0e4261396888de356 /app/views/projects | |
parent | e2126185de91bd14faf08f3c10990c015697147e (diff) | |
parent | 55cccf21258cdc5bb7431e25cd01a089997cd27c (diff) |
Merge branch 'project-members-scb' into 'master'
Resolve CE/EE diffs in project members
Closes gitlab-ee#10496
See merge request gitlab-org/gitlab-ce!28550
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/project_members/index.html.haml | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 8373903443e..cc98ba64f08 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,29 +1,35 @@ - page_title _("Members") +- can_admin_project_members = can?(current_user, :admin_project_member, @project) .row.prepend-top-default .col-lg-12 - %h4 - = _("Project members") - - if can?(current_user, :admin_project_member, @project) - %p - = _("You can invite a new member to <strong>%{project_name}</strong> or invite another group.").html_safe % { project_name: sanitize(@project.name, tags: []) } - - else - %p - = _("Members can be added by project <i>Maintainers</i> or <i>Owners</i>").html_safe + - if project_can_be_shared? + %h4 + = _("Project members") + - if can_admin_project_members + %p= share_project_description(@project) + - else + %p + = _("Members can be added by project <i>Maintainers</i> or <i>Owners</i>").html_safe + .light - - if can?(current_user, :admin_project_member, @project) - %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") - - if @project.allowed_to_share_with_group? + - 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' } %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' }, role: 'tab' }= _("Invite group") - .tab-content.gitlab-tab-content - .tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' } - = render 'projects/project_members/new_project_member', tab_title: _('Invite member') - .tab-pane{ id: 'invite-group-pane', role: 'tabpanel' } - = render 'projects/project_members/new_project_group', tab_title: _('Invite group') + .tab-content.gitlab-tab-content + .tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' } + = render 'projects/project_members/new_project_member', tab_title: _('Invite member') + .tab-pane{ id: 'invite-group-pane', role: 'tabpanel', class: ('active' if membership_locked?) } + = render 'projects/project_members/new_project_group', tab_title: _('Invite group') + - elsif !membership_locked? + .invite-member= render 'projects/project_members/new_project_member', tab_title: _('Invite member') + - elsif @project.allowed_to_share_with_group? + .invite-group= render 'projects/project_members/new_project_group', tab_title: _('Invite group') = render 'shared/members/requests', membership_source: @project, requesters: @requesters .clearfix |