Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-29 03:09:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-29 03:09:37 +0300
commit937f82e11fe1d3970ea3e1f281185e91d8f5102e (patch)
tree9c69e19144f2f9d7d5119496f468aea4f1538137 /app/views/invites
parent583fadea8d738850cbd83dcde1118d3fc3462d61 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/invites')
-rw-r--r--app/views/invites/show.html.haml29
1 files changed, 10 insertions, 19 deletions
diff --git a/app/views/invites/show.html.haml b/app/views/invites/show.html.haml
index 2bcd64d0690..283683511d7 100644
--- a/app/views/invites/show.html.haml
+++ b/app/views/invites/show.html.haml
@@ -2,28 +2,19 @@
%h3.page-title= _("Invitation")
%p
- You have been invited
- - if inviter = @member.created_by
- by
+ = _("You have been invited")
+ - inviter = @member.created_by
+ - if inviter
+ = _("by")
= link_to inviter.name, user_url(inviter)
- to join
- - case @member.source
- - when Project
- - project = @member.source
- project
- %strong
- = link_to project.full_name, project_url(project)
- - when Group
- - group = @member.source
- group
- %strong
- = link_to group.name, group_url(group)
- as #{@member.human_access}.
+ = _("to join %{source_name}") % { source_name: @invite_details[:title] }
+ %strong
+ = link_to @invite_details[:name], @invite_details[:url]
+ = _("as %{role}.") % { role: @member.human_access }
- if member?
%p
- - member_source = @member.source.is_a?(Group) ? _("group") : _("project")
- = _("However, you are already a member of this %{member_source}. Sign in using a different account to accept the invitation.") % { member_source: member_source }
+ = _("However, you are already a member of this %{member_source}. Sign in using a different account to accept the invitation.") % { member_source: @invite_details[:title] }
- if !current_user_matches_invite?
%p
@@ -32,7 +23,7 @@
- link_to_current_user = link_to(current_user.to_reference, user_url(current_user))
= _("Note that this invitation was sent to %{mail_to_invite_email}, but you are signed in as %{link_to_current_user} with email %{mail_to_current_user}.").html_safe % { mail_to_invite_email: mail_to_invite_email, mail_to_current_user: mail_to_current_user, link_to_current_user: link_to_current_user }
-- unless member?
+- if !member?
.actions
= link_to _("Accept invitation"), accept_invite_url(@token), method: :post, class: "btn btn-success"
= link_to _("Decline"), decline_invite_url(@token), method: :post, class: "btn btn-danger gl-ml-3"