Sha256: 0e40110d7d2c0fbf098da2d200757551c70e22af1548ebec8d9f6dce40e272ae

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

active_admin_sidebar 
====================

easy change sidebar position with activeadmin (tested with activeadmin ~> 1.0.0.pre)


Add including of css file 

  @import "active_admin_sidebar"; 

to the  app/assets/stylesheets/active_admin.css.scss


Changing sidebar position dynamically with before_filter

  # app/admin/posts.rb
  ActiveAdmin.register Post do
    before_filter :left_sidebar!, only: [:show]
  end

  # app/admin/comments.rb
  ActiveAdmin.register Comment do
    before_filter :right_sidebar!
  end



Moving sidebar to the left within all resource (config/initializers/active_admin.rb)


  # == Controller Filters
  #
  # You can add before, after and around filters to all of your
  # Active Admin resources from here.
  #
  config.before_filter do
    left_sidebar!
  end 

Disabling using sidebar layout on dashboards (if you setup sidebar position with initializer)

  ActiveAdmin.register_page "Dashboard" do
    controller {skip_before_filter :left_sidebar!}
    #.....
  end
  
Example

http://oi45.tinypic.com/1zx1a3r.png




Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_admin_sidebar-0.1.0.rc2 README.rdoc
active_admin_sidebar-0.1.0.rc1 README.rdoc
active_admin_sidebar-0.1.0.pre README.rdoc