<%
tool_name = Rails.configuration.branding[:application][:name]
sender_name = @resource.invited_by.name(false)
link = accept_invitation_url(@resource, :invitation_token => @token)
helpdesk_email = Rails.configuration.branding[:organisation][:helpdesk_email]
contact_us = (Rails.configuration.branding[:organisation][:contact_us_url] || contact_us_url)
email_subject = _('Query or feedback related to %{tool_name}') %{ :tool_name => tool_name }
user_name = User.find_by(email: @resource.email).nil? ? @resource.email : User.find_by(email: @resource.email).name(false)
inviter_name = @resource.invited_by.name(false) + '( ' + @resource.invited_by.name(true) + " )"
%>
<% FastGettext.with_locale FastGettext.default_locale do %>
<p>
<%= _('Hello %{user_name}') % { :user_name => user_name } %>
</p>
<p>
<%= _("Your colleague %{inviter_name} has invited you to contribute to their Data Management Plan in %{tool_name}") % {
tool_name: tool_name,
inviter_name: inviter_name
} %>
</p>
<p>
<%= sanitize(_('%{click_here} to accept the invitation, (or copy %{link} into your browser). If you don\'t want to accept the invitation, please ignore this email.') % {
click_here: link_to(_('Click here'), link), link: link
}) %>
</p>
<%= render partial: 'email_signature' %>
<% end %>