openaustralia/planningalerts

View on GitHub
app/views/alert_mailer/_application.html.haml

Summary

Maintainability
Test Coverage
.box.application
  %table
    %tr
      %td.address{ colspan: "2" }
        = link_to application.address, application_url_with_tracking(id: application.id)
    %tr
      %td{ colspan: "2" }
        = distance_and_heading_in_words(alert.location, application.location)
    - if application.location
      %tr
        - if Flipper.enabled?(:disable_streetview_in_emails, alert.user)
          %td.map
            = google_static_map(application, size: "300x150", key: :email)
        - else
          %td.map
            = google_static_map(application, size: "150x150", key: :email)
          %td.streetview
            = google_static_streetview(application, size: "150x150", key: :email)
    %tr
      %td.description{ colspan: "2" }
        = application.description
    %tr
      %td{ colspan: "2" }
        = link_to "Add your own comment", new_comment_url_with_tracking(id: application.id)