yaks-html 0.8.3 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yaks/format/html.rb +10 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed93c7c669916c02044d83a3551c54ae5bfe3453
|
4
|
+
data.tar.gz: b65cb8b1b64bfb732fd7d7a64e7839035ed07a7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f434db45836fa126ffb99da5416d98d43ffeb4448d32bf252a1c533336ab5872d0f48787f391df2c055597ab26e240c1b11c9584e50095c16bbb7651607d294
|
7
|
+
data.tar.gz: d29d68208ab4b5688cf34b6709ef9c7f228b4a8fde9885e76c6d393962ae78335e02cc7827326818a72514ae2ee3270f268e4426ecca0b2482fb2bc5d15d5e32
|
data/lib/yaks/format/html.rb
CHANGED
@@ -97,8 +97,11 @@ module Yaks
|
|
97
97
|
form = form.attr('enctype', form_control.media_type) if form_control.media_type
|
98
98
|
|
99
99
|
rows = form_control.fields.map(&method(:render_field))
|
100
|
+
rows << H[:tr, H[:td], H[:td, H[:input, {type: 'submit'}]]]
|
100
101
|
|
101
|
-
|
102
|
+
H[:div,
|
103
|
+
H[:h4, form_control.title || form_control.name.to_s],
|
104
|
+
form.content(H[:table, rows])]
|
102
105
|
end
|
103
106
|
|
104
107
|
def render_field(field)
|
@@ -127,7 +130,12 @@ module Yaks
|
|
127
130
|
end
|
128
131
|
|
129
132
|
def render_fieldset(fieldset)
|
130
|
-
|
133
|
+
legend = fieldset.fields.select {|field|field.type == :legend}.first
|
134
|
+
legend = legend ? legend.name : ''
|
135
|
+
|
136
|
+
H[:tr,
|
137
|
+
H[:th, legend],
|
138
|
+
H[:td, H[:fieldset, H[:table, fieldset.fields.map(&method(:render_field))]]]]
|
131
139
|
end
|
132
140
|
|
133
141
|
def render_select_options(options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaks-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arne Brasseur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yaks
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.9.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hexp
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|