Sha256: d08ec620faedd91cfc5b9e33b559a5762a7dcaf47fc80e0b70109b65380d798d

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

- if product.videos.present?
  - product.videos.each do |video|
    - if video.display_option == 'thumbnail'
      .grid__cell
        .product-details__alt-image
          = link_to(product_video_path(product.id, video.id), class: 'product-details__alt-image-link', target: '_blank', rel: 'noopener', data: { dialog_button: { dialog_options: { ui_dialog_options: { dialog_class: 'ui-dialog-video' } } }.to_json }) do
            .product-video.product-video--thumbnail
              = inline_svg('workarea/storefront/icons/video_play.svg', class: 'svg-icon product-video__play-icon', title: t('workarea.storefront.products.watch_this_video'))
              - if video.thumbnail.present?
                = image_tag(video.thumbnail.process(:small_thumb).url, alt: t('workarea.storefront.products.watch_this_video'), class: 'product-video__thumbnail')
              - else
                = image_tag(product_image_url(product.images.first, :small_thumb), alt: t('workarea.storefront.products.watch_this_video'), class: 'product-video__thumbnail')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
workarea-product_videos-1.3.0 app/views/workarea/storefront/products/_video_thumbnail.html.haml
workarea-product_videos-1.2.3 app/views/workarea/storefront/products/_video_thumbnail.html.haml
workarea-product_videos-1.2.2 app/views/workarea/storefront/products/_video_thumbnail.html.haml