sibu 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/sibu/pages_helper.rb +7 -3
- data/lib/sibu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a342b61a67c0e4b5181984f617ab47635611dd6a
|
4
|
+
data.tar.gz: 545735764452344e08b8c66845e948d4d569447f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18fddf4a252bf6243e3020c4082c10da885f343881dc4abbc4c0c05d894dc4885c0ad21970bc002eba918c73a25029fec34cc863df165530303dfbca512b1633
|
7
|
+
data.tar.gz: 48d28a56d1a239fda2b8ea17ba654ebff2f2ec5c6dd4181c7080ffda0bdc58d6102b198c2c024ce9e80e58b17dfbf01b6f50cc9f454eff99196a397c770d50f4
|
@@ -169,10 +169,14 @@ module Sibu
|
|
169
169
|
end
|
170
170
|
|
171
171
|
def form_label(elt, html_opts = {}, &block)
|
172
|
-
|
172
|
+
t_id = elt.is_a?(Hash) ? elt["id"] : elt
|
173
|
+
defaults = {"id" => t_id, "text" => Sibu::DEFAULT_TEXT}
|
173
174
|
content = defaults.merge(elt.is_a?(Hash) ? elt : (select_element(elt) || {}))
|
174
|
-
|
175
|
-
|
175
|
+
@sb_section = (@sb_section || []) + [t_id]
|
176
|
+
html_opts.merge!({data: {id: @sb_section[1..-1].join('|'), type: "text"}}) if action_name != 'show'
|
177
|
+
html_output = content_tag(:label, raw(content["text"]).html_safe, html_opts)
|
178
|
+
@sb_section -= [t_id]
|
179
|
+
html_output
|
176
180
|
end
|
177
181
|
|
178
182
|
def form_input(elt, html_opts = {})
|
data/lib/sibu/version.rb
CHANGED