effective_resources 0.7.9 → 0.7.10
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7c20435511222c5ce79dd666f0316afd80725d7
|
4
|
+
data.tar.gz: 70f5d6058d90bc1a1d0e0464c33b0169066769ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f42d5f5d8bc2818e92e7f242546bdb795a7a62a9d780825e775a49876dc42a515da003e00c9391a22cc72eb5fd404a3ec91d5de2582e86196ab143d9e09fe35
|
7
|
+
data.tar.gz: a5dfe04ab6f0cee8360208feacba38c4c202160ee53efbd5fbaf5564bff6612cfa31a3ac089f47eed9a3a0b8e3c9f589989721f39cde23858daba92bbe33e98d
|
@@ -36,23 +36,25 @@ module EffectiveBootstrap3Helper
|
|
36
36
|
# %p Exports
|
37
37
|
|
38
38
|
# If you pass active 'label' it will make that tab active. Otherwise first.
|
39
|
-
def tabs(active: nil, &block)
|
39
|
+
def tabs(active: nil, panel: {}, list: {}, content: {}, &block)
|
40
40
|
raise 'expected a block' unless block_given?
|
41
41
|
|
42
42
|
@_tab_mode = :panel
|
43
43
|
@_tab_active = (active || :first)
|
44
44
|
|
45
|
-
content_tag(:div, role: 'tabpanel') do
|
46
|
-
content_tag(:ul, class: 'nav nav-tabs', role: 'tablist') { yield } # Yield to tab the first time
|
47
|
-
end + content_tag(:div, class: 'tab-content') do
|
45
|
+
content_tag(:div, {role: 'tabpanel'}.merge(panel)) do
|
46
|
+
content_tag(:ul, {class: 'nav nav-tabs', role: 'tablist'}.merge(list)) { yield } # Yield to tab the first time
|
47
|
+
end + content_tag(:div, {class: 'tab-content'}.merge(content)) do
|
48
48
|
@_tab_mode = :content
|
49
49
|
@_tab_active = (active || :first)
|
50
50
|
yield # Yield tot ab the second time
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
def tab(label, &block)
|
55
|
-
controls
|
54
|
+
def tab(label, controls = nil, &block)
|
55
|
+
controls ||= label.to_s.parameterize.gsub('_', '-')
|
56
|
+
controls = controls[1..-1] if controls[0] == '#'
|
57
|
+
|
56
58
|
active = (@_tab_active == :first || @_tab_active == label)
|
57
59
|
|
58
60
|
@_tab_active = nil if @_tab_active == :first
|
@@ -115,11 +115,11 @@ module EffectiveResourcesHelper
|
|
115
115
|
glyphicon_to('remove', path, {title: 'Remove'}.merge(options))
|
116
116
|
end
|
117
117
|
|
118
|
-
def glyphicon_tag(icon)
|
118
|
+
def glyphicon_tag(icon, options = {})
|
119
119
|
if icon.to_s.start_with?('glyphicon-')
|
120
|
-
content_tag(:span, '', class: "glyphicon #{icon}")
|
120
|
+
content_tag(:span, '', {class: "glyphicon #{icon}"}.merge(options))
|
121
121
|
else
|
122
|
-
content_tag(:span, '', class: "glyphicon glyphicon-#{icon}")
|
122
|
+
content_tag(:span, '', {class: "glyphicon glyphicon-#{icon}"}.merge(options))
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.5.
|
86
|
+
rubygems_version: 2.4.5.1
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: Make any controller an effective resource controller.
|