Sha256: 8f593c77f4d0f35ade424c573144164988e1c5e7650f5f23bf8d690c25e5d22d

Contents?: true

Size: 660 Bytes

Versions: 5

Compression:

Stored size: 660 Bytes

Contents

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

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

    if skip_sidebar?
      classes << 'without_sidebar'
    else
      classes << 'with_sidebar'
      classes << 'left_sidebar' if left_sidebar?
    end



    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

5 entries across 5 versions & 1 rubygems

Version Path
active_admin_sidebar-0.1.0.rc2 lib/active_admin_sidebar/activeadmin_views_pages_base.rb
active_admin_sidebar-0.1.0.rc1 lib/active_admin_sidebar/activeadmin_views_pages_base.rb
active_admin_sidebar-0.1.0.pre lib/active_admin_sidebar/activeadmin_views_pages_base.rb
active_admin_sidebar-0.0.5 lib/active_admin_sidebar/activeadmin_views_pages_base.rb
active_admin_sidebar-0.0.4 lib/active_admin_sidebar/activeadmin_views_pages_base.rb