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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86af43be2744904728e7bcf4695eafcb4c735674
4
- data.tar.gz: ec12f0941810f4f603d11299d87e2e857e8caafc
3
+ metadata.gz: f6c5ec8a294e7091f39424f737c5eff2bbda4eb0
4
+ data.tar.gz: f9573d700d1bffbf1989119c516e91de71470aee
5
5
  SHA512:
6
- metadata.gz: 74b8839a01f9b473c6296a366e4e4677b68d82a4b82ea31187d18b55ff7e7bfe1252a8a28735b741b540c641cec18f6ae17ce84bfb45d4b36b77ec71d93b3e7e
7
- data.tar.gz: 34cb7316f6a42ee7a591cedfcdf229fd7b1b82b98b0210264b687481586eaf4b77defa25cf2ff9e02e2132ccd7d3f8cd374d7534d805842891114af37626d4a8
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 || @controls
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 @controls
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 @controls
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
@@ -1,3 +1,3 @@
1
1
  module BootstrapBuilders
2
- VERSION = "0.0.17".freeze
2
+ VERSION = "0.0.18".freeze
3
3
  end
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.17
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-12 00:00:00.000000000 Z
11
+ date: 2016-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails