Sha256: e7e45ab570bdaec009fcc795c13b8b34322908c208af15aa9fbcc54b6231a336

Contents?: true

Size: 932 Bytes

Versions: 10

Compression:

Stored size: 932 Bytes

Contents

# frozen_string_literal: true

module BootstrapLeather
  # Carousels, i.e. slideshows
  module CarouselsHelper
    def carousel(id, items, html_options = {}, &block)
      html_options[:id] = id
      html_options[:data] ||= {}
      html_options[:data][:ride] = 'carousel'
      render(
        partial: 'bootstrap_leather/carousels/carousel',
        locals: {
          id: id, html_options: html_options,
          slides: items.collect { |item| capture(item, &block) }
        }
      )
    end

    def carousel_with_thumbnails(id, items, html_options = {}, &block)
      html_options[:id] = id
      html_options[:data] ||= {}
      html_options[:data][:ride] = 'carousel'
      render(
        partial: 'bootstrap_leather/carousels/carousel_with_thumbnails',
        locals: {
          id: id, html_options: html_options,
          slides: items.collect { |item| capture(item, &block) }
        }
      )
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bootstrap_leather-0.10.14 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.13 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.11 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.10 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.9 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.8 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.7 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.6 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.5 app/helpers/bootstrap_leather/carousels_helper.rb
bootstrap_leather-0.10.4 app/helpers/bootstrap_leather/carousels_helper.rb