Sha256: 11d9f3236798bb9227aed63d87848875e7a5c79b9cfcddcac3fa59fa91bc49ee

Contents?: true

Size: 777 Bytes

Versions: 6

Compression:

Stored size: 777 Bytes

Contents

module FlexiipHelper

  # Inserts the Flexiip viewer into the page. This method takes an IIP data object (from which the iip request
  # url will be generated), and optionally an Hash with the options for the containing <div> element.
  #
  # == Example
  #
  #  iip_flahs_viewer(flash_data_object, :class => 'viewer', :height => '100%')
  def flexiip_viewer(iip_data, title = '', html_options = {})
    raise(ArgumentError, 'Must pass an iip data object here') unless(iip_data.is_a?(TaliaCore::DataTypes::IipData))
    html_options.to_options!
    html_options[:class] ||= 'iipviewer'
    render :partial => 'shared/flexiip_viewer', :locals => {
      :image_path => h(iip_data.get_iip_root_file_path),
      :options => html_options,
      :title => h(title)
    }
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
muruca_widgets-0.2.6 generators/flexiip_viewer/templates/flexiip_helper.rb
muruca_widgets-0.2.4 generators/flexiip_viewer/templates/flexiip_helper.rb
muruca_widgets-0.2.3 generators/flexiip_viewer/templates/flexiip_helper.rb
muruca_widgets-0.2.2 generators/flexiip_viewer/templates/flexiip_helper.rb
muruca_widgets-0.2.1 generators/flexiip_viewer/templates/flexiip_helper.rb
muruca_widgets-0.2.0 generators/flexiip_viewer/templates/flexiip_helper.rb