Sha256: 30e75270e5022e7323e1f74cb8ac45108063759bad37417d356095692f083296

Contents?: true

Size: 532 Bytes

Versions: 21

Compression:

Stored size: 532 Bytes

Contents

class Sidebars::ConsolidatedPlugin < Sidebars::Plugin
  class << self
    @abstract = true

    def fields
      associated_class.fields
    end

    def default_config
      fields.inject({ }) do |acc, item|
        acc.merge(item.key => item.default)
      end
    end

    def description
      associated_class.description
    end
  end

  def index
    @sidebar   = params['sidebar']
    @sb_config = @sidebar.config
    @sidebar.parse_request(params)
    render :partial => "sidebars/#{@sidebar.short_name}/content"
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
typo-5.5 lib/sidebars/consolidated_plugin.rb
typo-5.4.4 lib/sidebars/consolidated_plugin.rb
typo-5.4.3 lib/sidebars/consolidated_plugin.rb
typo-5.4.2 lib/sidebars/consolidated_plugin.rb
typo-5.4.1 lib/sidebars/consolidated_plugin.rb
typo-5.4 lib/sidebars/consolidated_plugin.rb
typo-4.1.1 lib/sidebars/consolidated_plugin.rb
typo-5.0.2 lib/sidebars/consolidated_plugin.rb
typo-5.0.1 lib/sidebars/consolidated_plugin.rb
typo-4.1 lib/sidebars/consolidated_plugin.rb
typo-5.0.3.98.1 lib/sidebars/consolidated_plugin.rb
typo-5.0 lib/sidebars/consolidated_plugin.rb
typo-5.0.3.98 lib/sidebars/consolidated_plugin.rb
typo-5.1.1 lib/sidebars/consolidated_plugin.rb
typo-5.1.2 lib/sidebars/consolidated_plugin.rb
typo-5.1.3 lib/sidebars/consolidated_plugin.rb
typo-5.1.98 lib/sidebars/consolidated_plugin.rb
typo-5.1 lib/sidebars/consolidated_plugin.rb
typo-5.2 lib/sidebars/consolidated_plugin.rb
typo-5.2.98 lib/sidebars/consolidated_plugin.rb