From 277ad2199acf635b32b6aeb6e40e9492cb0a213f Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Mon, 14 Jan 2019 21:39:42 +0000 Subject: Externalize strings from `/app/views/projects/project_members` --- app/views/projects/project_members/index.html.haml | 23 +++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'app/views/projects/project_members/index.html.haml') diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 14ed3345765..242ff91f539 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,39 +1,34 @@ -- page_title "Members" +- page_title _("Members") .row.prepend-top-default .col-lg-12 %h4 - Project members + = _("Project members") - if can?(current_user, :admin_project_member, @project) %p - You can invite a new member to - %strong= @project.name - or invite another group. + = _("You can invite a new member to %{project_name} or invite another group.").html_safe % { project_name: sanitize_project_name(@project.name) } - else %p - Members can be added by project - %i Maintainers - or - %i Owners + = _("Members can be added by project Maintainers or Owners").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 + %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? %li.nav-tab{ role: 'presentation' } - %a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab' }, role: 'tab' } Invite group + %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' + = 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' + = render 'projects/project_members/new_project_group', tab_title: _('Invite group') = render 'shared/members/requests', membership_source: @project, requesters: @requesters .clearfix %h5.member.existing-title - Existing members and groups + = _("Existing members and groups") - if @group_links.any? = render 'projects/project_members/groups', group_links: @group_links -- cgit v1.2.1 From 83fb62d493013973cb90b611d7c741d612ab6caf Mon Sep 17 00:00:00 2001 From: Elias Werberich Date: Mon, 1 Apr 2019 11:07:22 +0200 Subject: Don't sanitize project names on project members page --- app/views/projects/project_members/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/project_members/index.html.haml') diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 242ff91f539..8373903443e 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -6,7 +6,7 @@ = _("Project members") - if can?(current_user, :admin_project_member, @project) %p - = _("You can invite a new member to %{project_name} or invite another group.").html_safe % { project_name: sanitize_project_name(@project.name) } + = _("You can invite a new member to %{project_name} or invite another group.").html_safe % { project_name: sanitize(@project.name, tags: []) } - else %p = _("Members can be added by project Maintainers or Owners").html_safe -- cgit v1.2.1 From 55cccf21258cdc5bb7431e25cd01a089997cd27c Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Tue, 21 May 2019 18:50:06 +0100 Subject: Resolve CE/EE diffs in project members Part of single codebase changes. --- app/views/projects/project_members/index.html.haml | 42 ++++++++++++---------- 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'app/views/projects/project_members/index.html.haml') 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 %{project_name} or invite another group.").html_safe % { project_name: sanitize(@project.name, tags: []) } - - else - %p - = _("Members can be added by project Maintainers or Owners").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 Maintainers or Owners").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 -- cgit v1.2.1