Class: SirTrevorRails::Blocks::SolrDocumentsCarouselBlock

Inherits:
SolrDocumentsBlock show all
Defined in:
app/models/sir_trevor_rails/blocks/solr_documents_carousel_block.rb

Overview

Carousel with documents and text block

Constant Summary

Constants inherited from SirTrevorRails::Block

SirTrevorRails::Block::DEFAULT_FORMAT

Instance Attribute Summary

Attributes inherited from SolrDocumentsBlock

#solr_helper

Attributes inherited from SirTrevorRails::Block

#parent, #type

Instance Method Summary collapse

Methods inherited from SolrDocumentsBlock

alt_text?, #document_caption, #documents, #documents?, #each_document, #null_display_field_class, #primary_caption?, #primary_caption_field, #secondary_caption?, #secondary_caption_field, #show_primary_caption?, #show_secondary_caption?, #with_solr_helper, #zpr_link?

Methods included from Displayable

#item_ids, #items, #ordered_items

Methods included from Textable

#content_align, #text, #text?, #text_align

Methods inherited from SirTrevorRails::Block

#alt_text?, alt_text?, #as_json, block_class, block_class!, custom_block_type_alt_text_settings, custom_block_types, #format, from_hash, #initialize, #to_partial_path, type_klass

Constructor Details

This class inherits a constructor from SirTrevorRails::Block

Instance Method Details

#autoplay?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/models/sir_trevor_rails/blocks/solr_documents_carousel_block.rb', line 12

def autoplay?
  send(:'auto-play-images') == 'true'
end

#intervalObject



16
17
18
19
20
21
22
# File 'app/models/sir_trevor_rails/blocks/solr_documents_carousel_block.rb', line 16

def interval
  if autoplay?
    send(:'auto-play-images-interval')
  else
    false
  end
end

#max_heightObject



8
9
10
# File 'app/models/sir_trevor_rails/blocks/solr_documents_carousel_block.rb', line 8

def max_height
  send(:'max-height')
end