2015-04-30 13:06:18 -04:00
- page_title "Invitation"
2015-04-10 09:22:31 -04:00
%h3.page-title Invitation
%p
You have been invited
- if inviter = @member.created_by
by
= link_to inviter.name, user_url(inviter)
2016-11-28 15:18:48 -05:00
to join
2015-04-10 09:22:31 -04:00
- case @member.source
- when Project
- project = @member.source
project
%strong
2017-06-29 13:06:35 -04:00
= link_to project.name_with_namespace, project_url(project)
2015-04-10 09:22:31 -04:00
- when Group
- group = @member.source
group
%strong
= link_to group.name, group_url(group)
as #{@member.human_access}.
2016-11-28 15:18:48 -05:00
- is_member = @member.source.users.include?(current_user)
- if is_member
2015-04-10 09:22:31 -04:00
%p
However, you are already a member of this #{@member.source.is_a?(Group) ? "group" : "project"}.
Sign in using a different account to accept the invitation.
2016-11-28 15:18:48 -05:00
- if @member.invite_email != current_user.email
%p
Note that this invitation was sent to #{mail_to @member.invite_email}, but you are signed in as #{link_to current_user.to_reference, user_url(current_user)} with email #{mail_to current_user.email}.
- unless is_member
2015-04-10 09:22:31 -04:00
.actions
= link_to "Accept invitation", accept_invite_url(@token), method: :post, class: "btn btn-success"
2015-04-10 10:37:02 -04:00
= link_to "Decline", decline_invite_url(@token), method: :post, class: "btn btn-danger prepend-left-10"