Module: BootstrapLeather::CarouselsHelper

Included in:
ApplicationHelper
Defined in:
app/helpers/bootstrap_leather/carousels_helper.rb

Overview

Carousels, i.e. slideshows

Instance Method Summary collapse

Instance Method Details



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/helpers/bootstrap_leather/carousels_helper.rb', line 6

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


19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/helpers/bootstrap_leather/carousels_helper.rb', line 19

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