phantom_helpers 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b68f368476ad6b7cb67c8f87566a775b822290e0
4
- data.tar.gz: f8e6d76fcfb9d5fc9403d4d8afe84b302a8b8fd0
3
+ metadata.gz: c20913b850d99d45a2145e26a599a1aec40d7e67
4
+ data.tar.gz: 3197ae2ccc24ae747a85af1cfe46ca90b97b7887
5
5
  SHA512:
6
- metadata.gz: 25c3a7610cfd2045d0272ab41f8a6da5f61b0467d56078e921a745ab5d0858d41d6222072b64553e4245dbbf6b63c63915b6f7b083946874d5c0decc45c1ff17
7
- data.tar.gz: cb68da221e7cc23cb8aad2fce8a8f36b360ccc9c4cbf98db0071a3ca7cceaf2ebeecd7cb4c301c870fb035d296569d81e8a618a70b885d6574318af6deef851a
6
+ metadata.gz: 8276cabd2bf16e43b0f85f35a7dc68382db5857566d172512f69e7d9f3650c503d2b94419d5905c8eab79cbba00fccc6221e61185952994521086919791efc66
7
+ data.tar.gz: fd119d67445462d1bc292063e7aae001f6af2b0458c55bec36c504ac09799b356d123a689700174b5cb5dbac54f87a58cbec770c811c1e858560aa5ea140983f
@@ -20,32 +20,59 @@ module PhantomHelpers
20
20
  end
21
21
  end
22
22
 
23
- def panel_div(color = 'default', title = nil, footer = nil, &block)
23
+ def panel_div(type: "default", color: "default", title: nil, footer: nil, &block)
24
24
  content_tag :div, class: "row" do
25
25
  content_tag :div, class: "col-md-12" do
26
26
  content_tag :div, class: "panel panel-#{color}" do
27
- [
28
- if title
29
- content_tag :div, class: "panel-heading" do
30
- content_tag :h3, class: "panel-title" do
31
- title
27
+
28
+ case type
29
+ when "default"
30
+ [
31
+ if title
32
+ content_tag :div, class: "panel-heading" do
33
+ content_tag :h3, class: "panel-title" do
34
+ title
35
+ end
36
+ end
37
+ end,
38
+ content_tag(:div, class: "panel-body") do
39
+ block.call
40
+ end,
41
+ if footer
42
+ content_tag :div, class: "panel-footer" do
43
+ footer
32
44
  end
33
45
  end
34
- end,
35
- content_tag(:div, class: "panel-body") do
36
- block.call
37
- end,
38
- if footer
39
- content_tag :div, class: "panel-footer" do
40
- footer
46
+ ].join.html_safe
47
+
48
+ when "custom"
49
+ [
50
+ if title
51
+ content_tag :div, class: "panel-heading" do
52
+ content_tag :h3, class: "panel-title" do
53
+ title
54
+ end
55
+ end
56
+ end,
57
+ capture do
58
+ block.call
59
+ end,
60
+ if footer
61
+ content_tag :div, class: "panel-footer" do
62
+ footer
63
+ end
41
64
  end
42
- end
43
- ].join.html_safe
65
+ ].join.html_safe
66
+
67
+ when "full_custom"
68
+ block.call
69
+ end
70
+
44
71
  end
45
72
  end
46
73
  end
47
74
  end
48
-
75
+
49
76
  def index_body(&block)
50
77
  content_tag :div, class: "row" do
51
78
  content_tag :div, class: "col-md-12" do
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'phantom_helpers'
5
- s.version = '0.0.8'
5
+ s.version = '0.0.9'
6
6
  s.summary = 'Phantom View Helpers'
7
7
  s.description = 'rails helpers for bootstrap 3'
8
8
  s.licenses = ['GNU GPL-3', 'AGPL-3']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phantom_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vassil Kalkov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-07 00:00:00.000000000 Z
13
+ date: 2013-10-14 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: rails helpers for bootstrap 3
16
16
  email: info@genshin.org