debian-mirror-gitlab/app/views/invites/show.html.haml

30 lines
1.4 KiB
Text
Raw Normal View History

2019-02-15 15:39:39 +05:30
- page_title _("Invitation")
%h3.page-title= _("Invitation")
2015-04-26 12:48:37 +05:30
%p
2020-10-24 23:57:45 +05:30
= _("You have been invited")
- inviter = @member.created_by
- if inviter
= _("by")
2015-04-26 12:48:37 +05:30
= link_to inviter.name, user_url(inviter)
2020-10-24 23:57:45 +05:30
= _("to join %{source_name}") % { source_name: @invite_details[:title] }
%strong
= link_to @invite_details[:name], @invite_details[:url]
= _("as %{role}.") % { role: @member.human_access }
2015-04-26 12:48:37 +05:30
2020-07-28 23:09:34 +05:30
- if member?
2015-04-26 12:48:37 +05:30
%p
2020-10-24 23:57:45 +05:30
= _("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] }
2017-08-17 22:00:37 +05:30
2020-07-28 23:09:34 +05:30
- if !current_user_matches_invite?
2017-08-17 22:00:37 +05:30
%p
2019-02-15 15:39:39 +05:30
- 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 }
2017-08-17 22:00:37 +05:30
2020-10-24 23:57:45 +05:30
- if !member?
2015-04-26 12:48:37 +05:30
.actions
2021-01-29 00:20:46 +05:30
= link_to _("Accept invitation"), accept_invite_url(@token), method: :post, class: "btn gl-button btn-success"
2021-01-03 14:25:43 +05:30
= link_to _("Decline"), decline_invite_url(@token), method: :post, class: "btn gl-button btn-danger gl-ml-3"