ministryofjustice/prison-visits

View on GitHub
app/views/visitor_mailer/booking_receipt_email.html.haml

Summary

Maintainability
Test Coverage
%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  Dear #{@visit.visitors.first.first_name},

%h1{ style: 'margin:1em 0;font: bold 24px Helvetica, Arial, sans-serif' }
  Your visit is not booked yet
%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  You can check whether your visit has been booked on the #{link_to('visit status page', visit_status_url(@visit.visit_id, state: @token))}.
%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  We'll email you by #{when_to_expect_reply} to confirm the date and time of your visit. Please don't contact us any sooner than that, as we won't be able to comment on booking requests that are being processed.
%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  If you don’t receive a confirmation email by #{when_to_expect_reply}, please check your spam or junk folder for it. You need to do this on a computer or tablet (rather than a smart phone).

%h1{ style: 'margin:1em 0;font: bold 24px Helvetica, Arial, sans-serif' }
  Add this email to your address book
%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  To stop visit confirmation emails going to your spam or junk folder please add no-reply@email.prisonvisits.service.gov.uk to your address book or safe senders list.

%h1{ style: 'margin:1em 0;font: bold 24px Helvetica, Arial, sans-serif' }
  Visit request details
%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  You have requested a visit to #{@visit.prison_name} for #{@visit.visitors.size} #{@visit.visitors.size > 1 ? 'people' : 'person'}:

%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  - @visit.slots.each_with_index do |slot, index|
    - unless index == 0
      %br
    - if slot.date.present?
      - if index == 0
        First choice:
      - else
        Alternative #{index}:
      %strong #{date_and_duration_of_slot(slot)}

%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  Prisoner:
  %strong #{@visit.prisoner.first_name} #{@visit.prisoner.last_initial}.
  %br
  Prisoner number:
  %strong #{@visit.prisoner.number.upcase}

%h1{ style: 'margin:1em 0;font: bold 24px Helvetica, Arial, sans-serif' }
  Cancel this visit request
%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  If you no longer want to visit on this date, #{link_to('you can cancel this visit', visit_status_url(@visit.visit_id, state: @token))}.

%ul
  %li{ style: 'font: 16px Helvetica, Arial, sans-serif' }
    telephone:
    %strong #{prison_phone}
  %li{ style: 'font: 16px Helvetica, Arial, sans-serif' }
    email:
    %strong #{prison_email}

%p{ style: 'margin:1em 0;font: 16px Helvetica, Arial, sans-serif' }
  Need help or want to make a complaint? If you have a question or need any help with the online visits service, please
  = succeed '.' do
    %a{ :href => new_feedback_url } contact us

%p
  %small Visit ID: #{@visit.visit_id}