moonleerecords/moonlee-website

View on GitHub
app/views/records/events/index.html.slim

Summary

Maintainability
Test Coverage
- unless @events.nil? || @events.empty?
  section.page-section.items-list.events-list
    div.section-heading
      h2.section-title
        = 'Shows'
    - @events.each do |artist, events|
      article.event-box.event-box-artist-header.items-list-group
        div.item-column.column-1-9.event-date-header
        div.item-column.column-7-9.event-artist-name
          = link_to artist.name, records_artist_path(artist), title: artist.name
        div.item-column.column-1-9.event-links-header
      - events.each do |event|
        article.event-box.items-list-group
          div.item-column.column-1-9.event-date
            = localize(event.start_date)
          div.item-column.column-7-9.event-location
            = event_location(event)
          div.item-column.column-1-9.event-links
            - if event.facebook_url
              = link_to fa_icon('facebook-square'),
                       event.facebook_url,
                       class: 'icon-white-link',
                       target: '_blank',
                       title: 'Facebook event'
            - if event.lastfm_url
              = link_to fa_icon('lastfm-square'),
                       event.lastfm_url,
                       class: 'icon-white-link',
                       target: '_blank',
                       title: 'Last.fm event'
            - if event.songkick_url
              = link_to event.songkick_url, class: 'icon-white-link', target: '_blank', title: 'Songkick event' do
                i.fa.fa-custom-songkick