bhm-admin 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@
14
14
  = yield :extra_head
15
15
 
16
16
  %body
17
- #container
17
+ #container{:class => container_classes_css}
18
18
  %header= render :partial => 'admin/shared/header'
19
19
  = flash_messages :alert, :notice
20
20
 
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bhm-admin}
8
- s.version = "0.3.5"
8
+ s.version = "0.3.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Darcy Laycock"]
12
- s.date = %q{2010-12-21}
12
+ s.date = %q{2011-04-15}
13
13
  s.description = %q{Provides a reasonably dynamic and simple to use admin area for Rails 3 application. Built on a bunch of open source libraries.}
14
14
  s.email = %q{sutto@sutto.net}
15
15
  s.extra_rdoc_files = [
@@ -67,7 +67,7 @@ Gem::Specification.new do |s|
67
67
  ]
68
68
  s.homepage = %q{http://github.com/YouthTree/bhm-admin}
69
69
  s.require_paths = ["lib"]
70
- s.rubygems_version = %q{1.3.7}
70
+ s.rubygems_version = %q{1.6.2}
71
71
  s.summary = %q{General Admin Area stuff extracted from the big-help-mob web application.}
72
72
  s.test_files = [
73
73
  "test/helper.rb",
@@ -75,7 +75,6 @@ Gem::Specification.new do |s|
75
75
  ]
76
76
 
77
77
  if s.respond_to? :specification_version then
78
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
79
78
  s.specification_version = 3
80
79
 
81
80
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -19,3 +19,9 @@ $ninesixty-columns: 24
19
19
 
20
20
  footer, #flash-messages
21
21
  +grid-width(24)
22
+
23
+ #container.full-width
24
+ #content
25
+ +grid-width(24)
26
+ #sidebar
27
+ display: none
@@ -2,18 +2,18 @@ require 'active_support'
2
2
 
3
3
  module BHM
4
4
  module Admin
5
-
6
- VERSION = "0.3.5".freeze
7
-
5
+
6
+ VERSION = "0.3.6".freeze
7
+
8
8
  # Helpers for use in the admin area.
9
9
  autoload :SidebarHelper, 'bhm/admin/sidebar_helper'
10
10
  autoload :PresentationHelper, 'bhm/admin/presentation_helper'
11
11
  autoload :NestedFormHelper, 'bhm/admin/nested_form_helper'
12
- autoload :AttrAccessibleScoping, 'bhm/admin/attr_accessible_scoping'
13
-
12
+ autoload :AttrAccessibleScoping, 'bhm/admin/attr_accessible_scoping'
13
+
14
14
  class << self; attr_accessor :site_name; end
15
15
  self.site_name ||= "Your Website"
16
-
16
+
17
17
  def self.t(*args)
18
18
  options = args.extract_options!
19
19
  options[:scope] = ["bhm.admin", options.delete(:scope)].flatten.compact.join(".")
@@ -21,19 +21,19 @@ module BHM
21
21
  args << options
22
22
  ::I18n.t(*args)
23
23
  end
24
-
24
+
25
25
  def self.root
26
26
  @_bhm_admin_root ||= Pathname(__FILE__).dirname.dirname.dirname
27
27
  end
28
-
28
+
29
29
  def self.helper_classes
30
30
  [SidebarHelper, PresentationHelper, NestedFormHelper]
31
31
  end
32
-
32
+
33
33
  def self.disable_attr_accessible(&blk)
34
34
  AttrAccessibleScoping.disable(&blk)
35
35
  end
36
-
36
+
37
37
  def self.silence_attr_accessible(&blk)
38
38
  AttrAccessibleScoping.silence(&blk)
39
39
  end
@@ -49,6 +49,6 @@ module BHM
49
49
  # Hook into rails.
50
50
  require 'bhm/admin/engine' if defined?(Rails::Engine)
51
51
  require 'bhm/admin/compass_framework' if defined?(Compass)
52
-
52
+
53
53
  end
54
54
  end
@@ -1,11 +1,23 @@
1
1
  module BHM
2
2
  module Admin
3
3
  module SidebarHelper
4
-
4
+
5
+ def container_classes
6
+ @container_classes ||= []
7
+ end
8
+
9
+ def container_classes_css
10
+ container_classes.uniq.join(' ').presence
11
+ end
12
+
5
13
  def hide_sidebar!
6
14
  content_for :sidebar, '&nbsp;'.html_safe
7
15
  end
8
-
16
+
17
+ def full_width_page!
18
+ container_classes << 'full-width'
19
+ end
20
+
9
21
  def collection_sidebar
10
22
  sidebar_menu(parent_sidebar_content + resources_sidebar_content)
11
23
  end
@@ -43,7 +55,7 @@ module BHM
43
55
  def current_parent_name
44
56
  sidebar_klass_name(parent_class).titleize
45
57
  end
46
-
58
+
47
59
  def parent_sidebar_content
48
60
  with_safe_buffer do |content|
49
61
  if respond_to?(:parent?) && parent?
@@ -69,7 +81,7 @@ module BHM
69
81
  :confirm => BHM::Admin.t("confirmation.destroy", :object_name => name))
70
82
  end
71
83
  end
72
-
84
+
73
85
  def with_safe_buffer(&blk)
74
86
  ActiveSupport::SafeBuffer.new.tap(&blk)
75
87
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bhm-admin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 5
10
- version: 0.3.5
9
+ - 6
10
+ version: 0.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darcy Laycock
@@ -15,14 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-21 00:00:00 +08:00
18
+ date: 2011-04-15 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
22
  type: :runtime
24
- name: will_paginate
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
26
24
  none: false
27
25
  requirements:
28
26
  - - ">="
@@ -31,12 +29,12 @@ dependencies:
31
29
  segments:
32
30
  - 0
33
31
  version: "0"
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
32
+ version_requirements: *id001
33
+ name: will_paginate
36
34
  prerelease: false
35
+ - !ruby/object:Gem::Dependency
37
36
  type: :runtime
38
- name: inherited_resources
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ requirement: &id002 !ruby/object:Gem::Requirement
40
38
  none: false
41
39
  requirements:
42
40
  - - ">="
@@ -45,12 +43,12 @@ dependencies:
45
43
  segments:
46
44
  - 0
47
45
  version: "0"
48
- requirement: *id002
49
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *id002
47
+ name: inherited_resources
50
48
  prerelease: false
49
+ - !ruby/object:Gem::Dependency
51
50
  type: :runtime
52
- name: show_for
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
51
+ requirement: &id003 !ruby/object:Gem::Requirement
54
52
  none: false
55
53
  requirements:
56
54
  - - ">="
@@ -59,29 +57,30 @@ dependencies:
59
57
  segments:
60
58
  - 0
61
59
  version: "0"
62
- requirement: *id003
63
- - !ruby/object:Gem::Dependency
60
+ version_requirements: *id003
61
+ name: show_for
64
62
  prerelease: false
63
+ - !ruby/object:Gem::Dependency
65
64
  type: :runtime
66
- name: compass
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
65
+ requirement: &id004 !ruby/object:Gem::Requirement
68
66
  none: false
69
67
  requirements:
70
68
  - - ">="
71
69
  - !ruby/object:Gem::Version
72
- hash: 977940509
70
+ hash: 15424189
73
71
  segments:
74
72
  - 0
75
73
  - 10
76
74
  - 0
77
- - rc4
75
+ - rc
76
+ - 4
78
77
  version: 0.10.0.rc4
79
- requirement: *id004
80
- - !ruby/object:Gem::Dependency
78
+ version_requirements: *id004
79
+ name: compass
81
80
  prerelease: false
81
+ - !ruby/object:Gem::Dependency
82
82
  type: :runtime
83
- name: fancy-buttons
84
- version_requirements: &id005 !ruby/object:Gem::Requirement
83
+ requirement: &id005 !ruby/object:Gem::Requirement
85
84
  none: false
86
85
  requirements:
87
86
  - - ">="
@@ -90,12 +89,12 @@ dependencies:
90
89
  segments:
91
90
  - 0
92
91
  version: "0"
93
- requirement: *id005
94
- - !ruby/object:Gem::Dependency
92
+ version_requirements: *id005
93
+ name: fancy-buttons
95
94
  prerelease: false
95
+ - !ruby/object:Gem::Dependency
96
96
  type: :runtime
97
- name: compass-960-plugin
98
- version_requirements: &id006 !ruby/object:Gem::Requirement
97
+ requirement: &id006 !ruby/object:Gem::Requirement
99
98
  none: false
100
99
  requirements:
101
100
  - - ">="
@@ -104,12 +103,12 @@ dependencies:
104
103
  segments:
105
104
  - 0
106
105
  version: "0"
107
- requirement: *id006
108
- - !ruby/object:Gem::Dependency
106
+ version_requirements: *id006
107
+ name: compass-960-plugin
109
108
  prerelease: false
109
+ - !ruby/object:Gem::Dependency
110
110
  type: :runtime
111
- name: compass-colors
112
- version_requirements: &id007 !ruby/object:Gem::Requirement
111
+ requirement: &id007 !ruby/object:Gem::Requirement
113
112
  none: false
114
113
  requirements:
115
114
  - - ">="
@@ -118,12 +117,12 @@ dependencies:
118
117
  segments:
119
118
  - 0
120
119
  version: "0"
121
- requirement: *id007
122
- - !ruby/object:Gem::Dependency
120
+ version_requirements: *id007
121
+ name: compass-colors
123
122
  prerelease: false
123
+ - !ruby/object:Gem::Dependency
124
124
  type: :runtime
125
- name: jammit
126
- version_requirements: &id008 !ruby/object:Gem::Requirement
125
+ requirement: &id008 !ruby/object:Gem::Requirement
127
126
  none: false
128
127
  requirements:
129
128
  - - ">="
@@ -132,12 +131,12 @@ dependencies:
132
131
  segments:
133
132
  - 0
134
133
  version: "0"
135
- requirement: *id008
136
- - !ruby/object:Gem::Dependency
134
+ version_requirements: *id008
135
+ name: jammit
137
136
  prerelease: false
137
+ - !ruby/object:Gem::Dependency
138
138
  type: :runtime
139
- name: will_paginate
140
- version_requirements: &id009 !ruby/object:Gem::Requirement
139
+ requirement: &id009 !ruby/object:Gem::Requirement
141
140
  none: false
142
141
  requirements:
143
142
  - - ">="
@@ -146,12 +145,12 @@ dependencies:
146
145
  segments:
147
146
  - 0
148
147
  version: "0"
149
- requirement: *id009
150
- - !ruby/object:Gem::Dependency
148
+ version_requirements: *id009
149
+ name: will_paginate
151
150
  prerelease: false
151
+ - !ruby/object:Gem::Dependency
152
152
  type: :development
153
- name: shoulda
154
- version_requirements: &id010 !ruby/object:Gem::Requirement
153
+ requirement: &id010 !ruby/object:Gem::Requirement
155
154
  none: false
156
155
  requirements:
157
156
  - - ">="
@@ -160,7 +159,9 @@ dependencies:
160
159
  segments:
161
160
  - 0
162
161
  version: "0"
163
- requirement: *id010
162
+ version_requirements: *id010
163
+ name: shoulda
164
+ prerelease: false
164
165
  description: Provides a reasonably dynamic and simple to use admin area for Rails 3 application. Built on a bunch of open source libraries.
165
166
  email: sutto@sutto.net
166
167
  executables: []
@@ -248,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
249
  requirements: []
249
250
 
250
251
  rubyforge_project:
251
- rubygems_version: 1.3.7
252
+ rubygems_version: 1.6.2
252
253
  signing_key:
253
254
  specification_version: 3
254
255
  summary: General Admin Area stuff extracted from the big-help-mob web application.