Sha256: 34156d631c1940c9cf6fee598daa58f6771cb16f0fdca0fc9d40f6ced0328932

Contents?: true

Size: 653 Bytes

Versions: 3

Compression:

Stored size: 653 Bytes

Contents

class ActiveAdmin::Views::Pages::Base < Arbre::HTML::Document

  def build_page_content
    build_flash_messages
    classes = Arbre::HTML::ClassList.new

    classes << 'without_sidebar' if skip_sidebar?
    classes << 'with_sidebar' unless skip_sidebar?
    classes << 'left_sidebar'  if left_sidebar?

    div :id => "active_admin_content", :class => classes do

      build_sidebar unless skip_sidebar? || right_sidebar?
      build_main_content_wrapper
      build_sidebar unless skip_sidebar? || left_sidebar?

    end
  end


  def left_sidebar?
    assigns[:sidebar_position] == :left
  end

  def right_sidebar?
     !left_sidebar?
  end



end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_admin_sidebar-0.0.3 lib/active_admin_sidebar/activeadmin_views_pages_base.rb
active_admin_sidebar-0.0.2 lib/active_admin_sidebar/activeadmin_views_pages_base.rb
active_admin_sidebar-0.0.1 lib/active_admin_sidebar/activeadmin_views_pages_base.rb