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

41 lines
1.6 KiB
Text
Raw Normal View History

2018-12-23 12:14:25 +05:30
- page_title _("Invitation")
%h3.page-title= _("Invitation")
2015-04-26 12:48:37 +05:30
%p
You have been invited
- if inviter = @member.created_by
by
= link_to inviter.name, user_url(inviter)
2017-08-17 22:00:37 +05:30
to join
2015-04-26 12:48:37 +05:30
- case @member.source
- when Project
- project = @member.source
project
%strong
2018-03-27 19:54:05 +05:30
= link_to project.full_name, project_url(project)
2015-04-26 12:48:37 +05:30
- when Group
- group = @member.source
group
%strong
= link_to group.name, group_url(group)
as #{@member.human_access}.
2017-08-17 22:00:37 +05:30
- is_member = @member.source.users.include?(current_user)
- if is_member
2015-04-26 12:48:37 +05:30
%p
2018-12-23 12:14:25 +05:30
- 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 }
2017-08-17 22:00:37 +05:30
- if @member.invite_email != current_user.email
%p
2018-12-23 12:14:25 +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
- unless is_member
2015-04-26 12:48:37 +05:30
.actions
2018-12-23 12:14:25 +05:30
= 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"