active_admin_sidebar 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc
CHANGED
@@ -4,7 +4,7 @@ active_admin_sidebar
|
|
4
4
|
easy change sidebar position with activeadmin
|
5
5
|
|
6
6
|
|
7
|
-
|
7
|
+
to change sidebar position dynamically with before_filter
|
8
8
|
|
9
9
|
# app/admin/posts.rb
|
10
10
|
ActiveAdmin.register Post do
|
@@ -18,7 +18,7 @@ easy change sidebar position with activeadmin
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
|
21
|
+
to move sidebar to left within all resource (config/initializers/active_admin.rb)
|
22
22
|
|
23
23
|
|
24
24
|
# == Controller Filters
|
@@ -28,8 +28,13 @@ easy change sidebar position with activeadmin
|
|
28
28
|
#
|
29
29
|
config.before_filter :left_sidebar!
|
30
30
|
|
31
|
+
to disable using sidebar layout on dashboards (if you setup sidebar position with initializer)
|
31
32
|
|
32
|
-
|
33
|
+
ActiveAdmin.register_page "Dashboard" do
|
34
|
+
controller {skip_before_filter :left_sidebar!}
|
35
|
+
#.....
|
36
|
+
end
|
37
|
+
|
33
38
|
Add including of css file
|
34
39
|
|
35
40
|
@import "active_admin_sidebar";
|
@@ -38,6 +43,9 @@ to the app/assets/stylesheets/active_admin.css.scss
|
|
38
43
|
|
39
44
|
|
40
45
|
|
46
|
+
|
47
|
+
|
48
|
+
|
41
49
|
http://oi45.tinypic.com/1zx1a3r.png
|
42
50
|
|
43
51
|
|
@@ -4,9 +4,14 @@ class ActiveAdmin::Views::Pages::Base < Arbre::HTML::Document
|
|
4
4
|
build_flash_messages
|
5
5
|
classes = Arbre::HTML::ClassList.new
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
if skip_sidebar?
|
8
|
+
classes << 'without_sidebar'
|
9
|
+
else
|
10
|
+
classes << 'with_sidebar'
|
11
|
+
classes << 'left_sidebar' if left_sidebar?
|
12
|
+
end
|
13
|
+
|
14
|
+
|
10
15
|
|
11
16
|
div :id => "active_admin_content", :class => classes do
|
12
17
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_admin_sidebar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activeadmin
|
16
|
-
requirement: &
|
16
|
+
requirement: &70364282264380 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70364282264380
|
25
25
|
description: extension for activeadmin gem to manage sidebar
|
26
26
|
email:
|
27
27
|
- fedoronchuk@gmail.com
|