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-07 15:09:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-07 15:09:16 +0300
commit0254867cf0f3341fd63cc6da07290f1da91f99ef (patch)
tree4b3fb556c1cb8cde3459e56d58d5e61eb268d9ec /app/views/invites
parentc417764f00abaa5d2224a50b8d43a15e40ef8790 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/invites')
-rw-r--r--app/views/invites/show.html.haml8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/views/invites/show.html.haml b/app/views/invites/show.html.haml
index 30ab5781014..2b1315fc9ce 100644
--- a/app/views/invites/show.html.haml
+++ b/app/views/invites/show.html.haml
@@ -20,21 +20,19 @@
= link_to group.name, group_url(group)
as #{@member.human_access}.
-- is_member = @member.source.users.include?(current_user)
-
-- if is_member
+- 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 }
-- if @member.invite_email != current_user.email
+- if !current_user_matches_invite?
%p
- mail_to_invite_email = mail_to(@member.invite_email)
- mail_to_current_user = mail_to(current_user.email)
- 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 is_member
+- unless 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 prepend-left-10"