egov_utils 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/egov_utils/grid_helper.rb +4 -0
- data/lib/egov_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cc59966440f42860dfdb2f7df80df6e925f1d39cabf9b87daaeb68e6f31d5c6
|
4
|
+
data.tar.gz: 898c91aae9915d9e2f25205353bdf00cd6a10e2b348e0e332293a4545375c1d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccdf39526da488a8d85b211cd0ca9619a26205caa367f650d0eac1fd9a0e501203cbce50d27c149e42163cac182c1026085c613924a7bf8fdc8081b3df5868ec
|
7
|
+
data.tar.gz: d904c8195a19ab154e3153256559cf95874ba80252cd4e5a3c295d79192d966bcabaaa3bac05708a6ce0e2fc77a871d2612d469272b461805953503d827387d5
|
@@ -34,6 +34,10 @@ module EgovUtils
|
|
34
34
|
s << ", columnTemplate: '<a href=\"#{polymorphic_path(grid.schema.model)}/{id}\">{#{attribute.name}}</div>'" if attribute.name == grid.schema.main_attribute_name
|
35
35
|
if attribute.type == 'list'
|
36
36
|
s << ", format: ( (value) -> I18n.t('#{attribute.attribute_name.i18n_scoped_list_prefix}'+'.'+value, {defaults: $.map( #{attribute.attribute_name.i18n_list_fallback_prefixes.to_json}, (pref, i)-> {scope: (pref + '.' + value)} )}) ) "
|
37
|
+
elsif attribute.type == 'date'
|
38
|
+
s << ", format: ( (value)-> I18n.l('date.formats.default', value) )"
|
39
|
+
elsif attribute.type == 'datetime'
|
40
|
+
s << ", format: ( (value)-> I18n.l('time.formats.default', value) )"
|
37
41
|
end
|
38
42
|
s << "}"
|
39
43
|
end
|
data/lib/egov_utils/version.rb
CHANGED