bootstrap_builders 0.0.17 → 0.0.18
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 +4 -4
- data/lib/bootstrap_builders/panel.rb +7 -3
- data/lib/bootstrap_builders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6c5ec8a294e7091f39424f737c5eff2bbda4eb0
|
|
4
|
+
data.tar.gz: f9573d700d1bffbf1989119c516e91de71470aee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4a35576d2170a82c7eeb84cdc91825acdb6281610b0ce17d9ec8a79b7bb7e8f6a6ee2cbd17efe4e05a747efade9cc63ff0601c8c98370cb2c1cced6a4de4cf1
|
|
7
|
+
data.tar.gz: f997e64f5924398e49e47464ed55f8e4fbfbecd001b618cdd23d3bb1fd9f0e3cfb8d9ca2df99a3eeeafe90a0ca72e205ea931ae2f3b63b348e6b010f8bc6fce1
|
|
@@ -38,7 +38,7 @@ class BootstrapBuilders::Panel
|
|
|
38
38
|
def html
|
|
39
39
|
@panel = HtmlGen::Element.new(:div, inden: " ", classes: container_classes, css: @css, data: @data)
|
|
40
40
|
|
|
41
|
-
add_heading if @title ||
|
|
41
|
+
add_heading if @title || controls?
|
|
42
42
|
|
|
43
43
|
if @table
|
|
44
44
|
add_table
|
|
@@ -62,14 +62,18 @@ private
|
|
|
62
62
|
@heading = @panel.add_ele(:div, classes: ["panel-heading", "clearfix"])
|
|
63
63
|
|
|
64
64
|
if !@title || @title.to_s.strip.empty?
|
|
65
|
-
@heading.add_ele(:div, classes: ["panel-title", "pull-left"], str_html: " ") if
|
|
65
|
+
@heading.add_ele(:div, classes: ["panel-title", "pull-left"], str_html: " ") if controls?
|
|
66
66
|
else
|
|
67
67
|
@heading.add_ele(:div, classes: ["panel-title", "pull-left"], str: @title)
|
|
68
68
|
end
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def add_heading_controls
|
|
72
|
-
@heading.add_ele(:div, classes: ["pull-right"], str_html: controls_content) if
|
|
72
|
+
@heading.add_ele(:div, classes: ["pull-right"], str_html: controls_content) if controls?
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def controls?
|
|
76
|
+
@controls && @controls.any?
|
|
73
77
|
end
|
|
74
78
|
|
|
75
79
|
def controls_content
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bootstrap_builders
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kaspernj
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-09-
|
|
11
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|