bootstrap-helpers 0.1.2 → 0.1.7
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/VERSION +1 -1
- data/bootstrap-helpers.gemspec +2 -2
- data/lib/bootstrap-helpers.rb +10 -5
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/bootstrap-helpers.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bootstrap-helpers"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["mcasimir"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-09-25"
|
13
13
|
s.description = "Rails bootstrap helpers"
|
14
14
|
s.email = "maurizio.cas@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/bootstrap-helpers.rb
CHANGED
@@ -69,8 +69,11 @@ module BootstrapHelpers
|
|
69
69
|
|
70
70
|
end
|
71
71
|
|
72
|
-
def icon(icon_id)
|
73
|
-
|
72
|
+
def icon(icon_id, opts={})
|
73
|
+
opts[:class] ||= ""
|
74
|
+
opts[:class] << " icon icon-#{icon_id}"
|
75
|
+
opts[:class].strip!
|
76
|
+
tag :i, opts
|
74
77
|
end
|
75
78
|
|
76
79
|
# ============
|
@@ -280,15 +283,17 @@ module BootstrapHelpers
|
|
280
283
|
@opts = opts
|
281
284
|
end
|
282
285
|
|
283
|
-
def pane(title, &block)
|
286
|
+
def pane(title, pane_id = nil, &block)
|
284
287
|
css_class = (@first && @opts[:open]) ? 'in' : ''
|
288
|
+
pane_id ||= "#{title.parameterize}_pane"
|
289
|
+
|
285
290
|
@first = false
|
286
291
|
content_tag :div, :class => 'accordion-group' do
|
287
292
|
heading = content_tag :div, :class => 'accordion-heading' do
|
288
|
-
link_to title, "##{
|
293
|
+
link_to title, "##{pane_id}", :class => 'accordion-toggle', :'data-toggle' => 'collapse',
|
289
294
|
:'data-parent' => "##{@opts[:accordion_id]}"
|
290
295
|
end
|
291
|
-
body = content_tag :div, :class => "accordion-body collapse #{css_class}", :id => "#{
|
296
|
+
body = content_tag :div, :class => "accordion-body collapse #{css_class}", :id => "#{pane_id}" do
|
292
297
|
content_tag :div, :class => 'accordion-inner' do
|
293
298
|
capture(&block)
|
294
299
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
segments:
|
90
90
|
- 0
|
91
|
-
hash:
|
91
|
+
hash: 870253676130293577
|
92
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
93
|
none: false
|
94
94
|
requirements:
|