hacken-in/hacken-in

View on GitHub
app/views/events/_venue.html.haml

Summary

Maintainability
Test Coverage
- unless event.venue.nil?
  %address.event-venue{ itemscope: true, itemprop: 'location', itemtype: 'http://schema.org/Place' }
    - if event.venue.url.blank?
      = event.venue.location
    - else
      = link_to event.venue.location, event.venue.url, itemprop: 'url'
    %br
    - if event.venue_info.present?
      = event.venue_info
      %br
    %span{ itemscope: true, itemprop: 'address', itemtype: 'http://schema.org/PostalAddress' }
      %span{ itemprop: 'streetAddress' }
        = event.venue.street
      %br
      %span{ itemprop: 'postalCode' }
        = event.venue.zipcode
      %span{ itemprop: 'addressLocality' }
        = event.venue.city