File tree Expand file tree Collapse file tree 6 files changed +95
-34
lines changed
Expand file tree Collapse file tree 6 files changed +95
-34
lines changed Original file line number Diff line number Diff line change 11active_admin_sidebar
22====================
33
4- easy change sidebar position with activeadmin (tested with active_admin-0.5.0 )
4+ easy change sidebar position with activeadmin (tested with activeadmin ~> 1.0.0.pre )
55
66
77Add including of css file
88
9- @import "active_admin_sidebar/index ";
9+ @import "active_admin_sidebar";
1010
1111to the app/assets/stylesheets/active_admin.css.scss
1212
@@ -15,7 +15,7 @@ Changing sidebar position dynamically with before_filter
1515
1616 # app/admin/posts.rb
1717 ActiveAdmin.register Post do
18- before_filter :left_sidebar!, : only=> [:show]
18+ before_filter :left_sidebar!, only: [:show]
1919 end
2020
2121 # app/admin/comments.rb
@@ -34,7 +34,7 @@ Moving sidebar to the left within all resource (config/initializers/active_admin
3434 # Active Admin resources from here.
3535 #
3636 config.before_filter do
37- left_sidebar! if respond_to?(:left_sidebar!)
37+ left_sidebar!
3838 end
3939
4040Disabling using sidebar layout on dashboards (if you setup sidebar position with initializer)
Original file line number Diff line number Diff line change 1+ body .active_admin #active_admin_content .left_sidebar {
2+ #sidebar {
3+ margin-left :0 ;
4+ }
5+
6+ .paginated_collection_contents {
7+ clear : none ;
8+ float : left ;
9+ width : 100% ;
10+ }
11+
12+ .blank_slate_container {
13+ clear :none ;
14+ }
15+
16+ .columns {
17+ clear : none ;
18+ }
19+
20+ #main_content_wrapper {
21+ float :inherit ;
22+ width :auto ;
23+ margin-left : 298px ;
24+ #main_content {
25+ margin :0 ;
26+ float : inherit ;
27+ .tabs .comments {
28+ .active_admin_comment {
29+ clear : none ;
30+ }
31+ }
32+ }
33+
34+ }
35+
36+
37+
38+
39+ .table_tools :after {
40+ clear : none ;
41+ padding-bottom : 16px ;
42+ }
43+ }
44+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ body .active_admin #active_admin_content .left_sidebar {
2+ #sidebar {
3+ margin-left :0 ;
4+ }
5+
6+ .paginated_collection_contents {
7+ clear : none ;
8+ float : left ;
9+ width : 100% ;
10+ }
11+
12+ .blank_slate_container {
13+ clear :none ;
14+ }
15+
16+ .columns {
17+ clear : none ;
18+ }
19+
20+ #main_content_wrapper {
21+ float :inherit ;
22+ width :auto ;
23+ margin-left : 298px ;
24+ #main_content {
25+ margin :0 ;
26+ float : inherit ;
27+ .tabs .comments {
28+ .active_admin_comment {
29+ clear : none ;
30+ }
31+ }
32+ }
33+
34+ }
35+
36+
37+
38+
39+ .table_tools :after {
40+ clear : none ;
41+ padding-bottom : 16px ;
42+ }
43+ }
44+
Original file line number Diff line number Diff line change 44require 'active_admin_sidebar/positions'
55
66module ActiveAdminSidebar
7+ module Rails
78 class Engine < Rails ::Engine
89 config . after_initialize do
910 ActiveAdmin ::BaseController . send :include , ActiveAdminSidebar ::Positions
1011 end
1112 end
1213end
14+ end
1315
1416
1517
Original file line number Diff line number Diff line change 11module ActiveAdminSidebar
2- VERSION = "0.0.5 "
2+ VERSION = "0.1.0.pre "
33end
You can’t perform that action at this time.
0 commit comments