johnrees/fablabs

View on GitHub
app/views/labs/_lab.html.haml

Summary

Maintainability
Test Coverage
- cache ["v1-#{I18n.locale}", lab] do
  = content_tag_for :div, lab, class: 'media', itemscope: true, itemtype: "http://data-vocabulary.org/Organization" do
    .img
      = link_to lab do
        = image_tag lab.avatar.thumb('100x100#').url, class: 'med avatar', itemprop: "logo"
    .ml-2
      = link_to lab, class: 'name' do
        %span.name{itemprop: "name"}= lab
      %span.url.microdata{itemprop: "url"}= lab_url(lab, {locale: nil})
      .lab-location
        - if lab.short_address(!params[:country]).present?
          = icon "map-marker"
          %span.short_address{itemprop: "addressLocality"}= lab.short_address(!params[:country])
          %span.microdata.country{itemprop: "country"}= lab.country_code
    .ml-auto
      = link_to lab do
        = image_tag ("icons/arrow-right.svg"), class: 'arrow'