ministryofjustice/prison-visits

View on GitHub
app/views/visits/show.html.haml

Summary

Maintainability
Test Coverage
- content_for :header, 'Your request is being processed'
= render partial: 'analytics'

.Grid
  .Grid-2-3
    %p
      %strong Your visit is not booked yet:
      you'll get an email to
      = mail_to visit.visitors.first.email
      by
      = when_to_expect_reply
      to confirm the date and time of your visit.
      If you don't get a confirmation email, please
      = conditional_text prison_phone, 'call ', ' or'
      email us at #{prison_email_link}.

.Grid
  .Grid-2-3
    %dl
      %dt Your visit
      %dd
        %ul.unstyled-list.visit-times
          - visit.slots.each_with_index do |slot, index|
            - if slot.date.present?
              %li
                - if index == 0
                  First choice:
                - else
                  Alternative #{index}:
                %strong= date_and_duration_of_slot(slot)

.Grid
  .Grid-1-3
    %dl
      %dt Location
      %dd.h3
        %strong
          = visit.prison_name
          %br
          = prison_address

    %p.map-link= link_to 'View on Google maps', "http://google.com/maps?q=#{prison_postcode}", :rel => 'external'

  .Grid-1-3
    %dl
      - if prison_phone.present?
        %dt Tel
        %dd.h3
          %strong= prison_phone
        %br

      - if prison_email.present?
        %dt Email
        %dd
          %strong= prison_email_link

  .Grid-1-3
    %p.visible--js-enabled= link_to 'Print this page', '#', :class => 'print-link'

.Grid#info
  .Grid-1-3
    %nav
      = render 'content/confirmation_page_nav'

  .Grid-2-3

    = render 'content/confirmation_page'

    .footnote
      %p Take a moment to #{link_to('rate this service', 'http://www.gov.uk/done/prison-visits')}.