summaryrefslogtreecommitdiff
path: root/app/views/invites/show.html.haml
blob: 37143799132e45389b1d3e84c8e06ad4f7db7dc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
- page_title _("Invitation")
%h3.page-title= _("Invitation")

%p
  = _("You have been invited")
  - inviter = @member.created_by
  - if inviter
    = _("by")
    = link_to inviter.name, user_url(inviter)
  = _("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
    = _("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
    - 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 }

- if !member?
  .actions
    = link_to _("Accept invitation"), accept_invite_url(@token, new_user_invite: params[:new_user_invite]), method: :post, class: "btn gl-button btn-success"
    = link_to _("Decline"), decline_invite_url(@token), method: :post, class: "btn gl-button btn-danger gl-ml-3"