phantom_helpers 0.0.8 → 0.0.9
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/phantom_helpers/view_helpers/html_helper.rb +43 -16
- data/phantom_helpers.gemspec +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: c20913b850d99d45a2145e26a599a1aec40d7e67
|
|
4
|
+
data.tar.gz: 3197ae2ccc24ae747a85af1cfe46ca90b97b7887
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
43
|
-
|
|
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
|
data/phantom_helpers.gemspec
CHANGED
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.
|
|
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-
|
|
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
|