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: 339e97078108e7d4fbad0dfb86b2dc8a2a4d0d22
4
- data.tar.gz: 4d2b4bcba50f2c9ce67dd093bc7ca11f0578c535
3
+ metadata.gz: 5273128abd9295a41e9e159e782ec89e300ea007
4
+ data.tar.gz: 3c22404dee50c4f4de80ef9f36fa81b7fbaecbbd
5
5
  SHA512:
6
- metadata.gz: 7bf7ae24fa68490735043ea48270c571f747089fe58337a7e9cfcfa8a5ea4303bec9baf4bc95dd999ba97d435dbfaa392de40c4d213191345f97c9657b11238f
7
- data.tar.gz: 34c12fba18edb08e23fb66f383d8d535991da85cd794c2e493015e7cfa4dfb53024a34145afc6ab5c643911a9c49513a58dfbcea9a88ccec5cc6f660af3d16c4
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: '#{I18n.t('model_attributes.'+grid.model_i18n_key.to_s+'.'+attribute.name, default: grid_attributes_i18n_kyes(attribute))}'"
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}'}) ) "
@@ -1,5 +1,5 @@
1
1
  = bootstrap_form_for(:session) do |f|
2
2
  = f.text_field(:username)
3
3
  = f.password_field(:password)
4
- = f.submit
4
+ = f.submit t(:label_login)
5
5
  -# link_to t('label_register'), new_user_path
@@ -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: Přihlášení
62
+ username: Přihlašovací jméno
57
63
  password: Heslo
58
64
 
59
65
  activerecord:
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.1.10'
2
+ VERSION = '0.1.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr