<%
  tool_name = Rails.configuration.branding[:application][:name]
  username = @user.name
  helpdesk_email = Rails.configuration.branding[:organisation][:helpdesk_email]
  email_subject = _('Query or feedback related to %{tool_name}') %{ :tool_name => tool_name }

  # Override the default Rails route helper for the contact_us page IF an alternate contact_us url was defined
  # in the branding config file
  contact_us = Rails.application.config.branding[:organisation][:contact_us_url] || contact_us_url
%>
<% FastGettext.with_locale FastGettext.default_locale do %>
  <p>
    <%= _('Welcome to %{tool_name}, %{username}') %{ :tool_name => tool_name, :username => username } %>
  </p>
  <p>
    <%= sanitize(_('%{tool_name} will help you to develop your Data Management Plan. If you have any queries or feedback as you use the tool, please contact us at %{helpdesk_email} or visit %{contact_us}') %{ :tool_name => tool_name, :helpdesk_email => mail_to(helpdesk_email, helpdesk_email, subject: email_subject), :contact_us => link_to(contact_us, contact_us) }) %>
  </p>
  
  <%= render partial: 'email_signature' %>
<% end %>