egov_utils 0.1.10 → 0.1.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5273128abd9295a41e9e159e782ec89e300ea007
|
4
|
+
data.tar.gz: 3c22404dee50c4f4de80ef9f36fa81b7fbaecbbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f8149e1abe6f59ff14b2397412b45ce63f755541841ff27fd071650fb07f6e3de17910c4c45136834a11145ab7a6b315c5efe53913706cb35b7860a608d00b9
|
7
|
+
data.tar.gz: 0a13495910ae508adab7322568217cb31053162ebb85aa245aeac5ea6b10a79cedb838554d6ca1ac1a7505d3432dee1c034ebeeda1c9fe838a51e9f00609f72d
|
@@ -1,10 +1,5 @@
|
|
1
1
|
module EgovUtils
|
2
2
|
module GridHelper
|
3
|
-
def grid_attributes_i18n_kyes(attribute)
|
4
|
-
keys = [ ('activerecord.attributes.'+attribute.model.model_name.i18n_key.to_s+'.'+attribute.name).to_sym ]
|
5
|
-
keys.concat( grid_attributes_i18n_kyes(attribute.attribute) ) if attribute.respond_to?(:attribute)
|
6
|
-
keys
|
7
|
-
end
|
8
3
|
|
9
4
|
def type_for_grid(type)
|
10
5
|
case type
|
@@ -35,7 +30,7 @@ module EgovUtils
|
|
35
30
|
def column_for_grid(grid, attribute)
|
36
31
|
s = "{"
|
37
32
|
s << "field: '#{attribute.name}'"
|
38
|
-
s << ", title: '#{
|
33
|
+
s << ", title: '#{attribute.attribute_name.human}'"
|
39
34
|
s << ", columnTemplate: '<a href=\"#{polymorphic_path(grid.schema.model)}/{id}\">{#{attribute.name}}</div>'" if attribute.name == grid.schema.main_attribute_name
|
40
35
|
if attribute.type == 'list'
|
41
36
|
s << ", format: ( (value) -> I18n.t(value, {scope: 'activerecord.attributes.#{attribute.model.model_name.i18n_key}.#{attribute.name.to_s.pluralize}'}) ) "
|
data/config/locales/cs.yml
CHANGED
@@ -13,6 +13,7 @@ cs:
|
|
13
13
|
label_new: Nový
|
14
14
|
label_edit: Upravit
|
15
15
|
label_profile: Profil
|
16
|
+
label_login: Přihlásit
|
16
17
|
label_logout: Odhlásit
|
17
18
|
|
18
19
|
common_labels:
|
@@ -43,6 +44,11 @@ cs:
|
|
43
44
|
district: Okres
|
44
45
|
region: Kraj
|
45
46
|
country: Země
|
47
|
+
egov_utils/person:
|
48
|
+
fullname: Celé jméno
|
49
|
+
firstname: Jméno
|
50
|
+
lastname: Příjmení
|
51
|
+
birth_date: Datum narození
|
46
52
|
|
47
53
|
|
48
54
|
models_errors: &my_model_errors
|
@@ -53,7 +59,7 @@ cs:
|
|
53
59
|
user:
|
54
60
|
password: Heslo
|
55
61
|
session:
|
56
|
-
username:
|
62
|
+
username: Přihlašovací jméno
|
57
63
|
password: Heslo
|
58
64
|
|
59
65
|
activerecord:
|
data/lib/egov_utils/version.rb
CHANGED