Sha256: ccae15c44c61fe28999f6f1d8893954a14940895bc96287f9c6ae5930bed2042

Contents?: true

Size: 800 Bytes

Versions: 20

Compression:

Stored size: 800 Bytes

Contents

require 'omf-web/tab/abstract_service'
require 'omf-web/widget/abstract_widget'

module OMF::Web::Tab::TwoColumn
  
  class TwoColumnService < OMF::Web::Tab::AbstractService
    
    def initialize(tab_id, opts)
      super
      debug "New TwoColumn Service: #{opts.inspect}"
      @lwidgets = (opts[:left] || []).collect do |wd| 
        OMF::Web::Widget::AbstractWidget.create_widget(wd) 
      end
      @rwidgets = (opts[:right] || []).collect do |wd| 
        OMF::Web::Widget::AbstractWidget.create_widget(wd)
      end
    end 
    
    def show(req, opts)
      OMF::Web::Theme.require 'two_column_page'
      page = OMF::Web::Theme::TwoColumnPage.new(@lwidgets, @rwidgets, opts.merge(@opts))
      [page.to_html, 'text/html']
    end

  end # TwoColumn
  
  
end # OMF::Web::Tab::TwoColumn

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
omf_web-1.2.9 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.8 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.7 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.6 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.5 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.4 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.3 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.2 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.1 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.2.0 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-1.0.0 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.9 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.8 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.7 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.6 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.5 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.4 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.3 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9.1 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb
omf_web-0.9 lib/omf-web/UNUSED/tab/two_column/two_column_service.rb