egov_utils 0.3.4 → 0.3.5

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
  SHA256:
3
- metadata.gz: 674e8db7ce7f9de0944efee865134ecde920a578b259c23ce74370ba4ba35ada
4
- data.tar.gz: cfd4672a9a481389924b9dc69f485bcedbcd824ca4ed5969d6825a2d09b3e5ea
3
+ metadata.gz: acf5bd44813cae1b6c97885e2f27aba3d08faea4990dff99b9cf8994947a536d
4
+ data.tar.gz: e43919a3145c54fc669e361414a4564474716f32484527c85bb7f5e2de104040
5
5
  SHA512:
6
- metadata.gz: 6cd772c57e1c3e27f6f3281238e2e317c01fae05fc6027398a828b6a5281b0c99edb0a7269c4fd0cb8862b090275057ff9041aa4b58b7fd6980150bb524df024
7
- data.tar.gz: 5ead03e0f48e6da8aa5293786f3019e4668b6b30f2a81e03a58647506a03717b79c75318d63e9c0d89baa33d8a27c07fc00b60c72f65d8a4a73ff18c275438e0
6
+ metadata.gz: e7388fc75b848b7112ccff83e2a82f8837baf3e3eda7c4173e4fd2c8bc2ac9419080718711691d178161e267dc593cc4580558013e59c2b8e77af8103c4fc0a9
7
+ data.tar.gz: 448aee3484f8a498aca7b4a84810059f354aa2573435a703b434d163d97806bdd10e707d28d78f1e21ae8a655f242abca7b9bd1a88541ed80a489197783fe939
@@ -23,4 +23,5 @@
23
23
  //= require egov_utils/roles
24
24
  //= require egov_utils/file_uid
25
25
  //= require clipboard
26
+ //= require vue
26
27
  //= require cookies_eu
@@ -86,12 +86,12 @@ $ ->
86
86
  success()
87
87
  return
88
88
  error(xhr)
89
- # remove: (items, success, error) ->
90
- # $.ajax(
91
- # type: "DELETE"
92
- # url: "<%= polymorphic_path(schema.model) %>/" + items[0].data.id + '.json'
93
- # dataType: 'json'
94
- # ).then(success, error)
89
+ remove: (items, success, error) ->
90
+ $.ajax(
91
+ type: "DELETE"
92
+ url: "<%= polymorphic_path(schema.model) %>/" + items[0].data.id + '.json'
93
+ dataType: 'json'
94
+ ).then(success, error)
95
95
  operations: ['sort', 'skip', 'take']
96
96
 
97
97
  $('#<%= grid_id %>').shieldGrid({
@@ -118,9 +118,9 @@ $ ->
118
118
  {cls: 'btn btn-sm btn-primary', caption: '<%= t('label_edit') %>', click: editRecord},
119
119
  <% end %>
120
120
  <%= additional_grid_edit_buttons(schema) %>
121
- # <% if can?(:destroy, schema.model) %>
122
- # {commandName: 'delete', caption: '<%= t('label_delete') %>'}
123
- # <% end %>
121
+ <% if local_assigns.fetch(:allow_delete, false) && can?(:destroy, schema.model) %>
122
+ {commandName: 'delete', caption: '<%= t('label_delete') %>'}
123
+ <% end %>
124
124
  ]
125
125
  }
126
126
  <% end %>
@@ -129,7 +129,11 @@ $ ->
129
129
  multiple: false
130
130
  editing:
131
131
  enabled: <%= can?(:update, schema.model) || can?(:destroy, schema.model) %>
132
- type: 'row'
132
+ type: 'row',
133
+ confirmation:
134
+ "delete":
135
+ enabled: true
136
+ template: "<%= t('confirm_destroy', subject: '{'+schema.main_attribute_name+'}') %>"
133
137
  <% if local_assigns[:detail_for] %>
134
138
  events:
135
139
  detailCreated: detailCreated
@@ -3,9 +3,11 @@
3
3
  .col-12= form.select :person_type, enum_values_for_select(person.class, :person_type), {}, class: 'person-type-toggle'
4
4
  .natural_person.row
5
5
  = form.fields_for(:natural_person, person.natural_person || EgovUtils::NaturalPerson.new) do |fields|
6
- .col-12.col-sm-6= fields.text_field(:firstname)
7
- .col-12.col-sm-6= fields.text_field(:lastname)
8
- .col-12.col-sm-6= fields.date_field(:birth_date, min: Date.new(1920, 1, 1), max: Date.today, data: {'date-view-mode' => 'decades', 'date-use-current' => false, 'date-view-date' => Date.new(1950, 1, 1).to_s })
6
+ .col-12.col-md-2= fields.text_field(:title)
7
+ .col-12.col-md-4= fields.text_field(:firstname)
8
+ .col-12.col-md-4= fields.text_field(:lastname)
9
+ .col-12.col-md-2= fields.text_field(:higher_title)
10
+ .col-12.col-md-6= fields.date_field(:birth_date, min: Date.new(1920, 1, 1), max: Date.today, data: {'date-view-mode' => 'decades', 'date-use-current' => false, 'date-view-date' => Date.new(1950, 1, 1).to_s })
9
11
  .col-12.col-sm-6= fields.text_field(:birth_place)
10
12
  .legal_person.row
11
13
  = form.fields_for(:legal_person, person.legal_person || EgovUtils::LegalPerson.new) do |fields|
@@ -30,6 +30,8 @@ cs:
30
30
  ministery_justice_name: Ministerstvo spravedlnosti ČR
31
31
  label_no_records: Žádné záznamy k zobrazení
32
32
 
33
+ confirm_destroy: "Opravdu chcete smazat %{subject}?"
34
+
33
35
  notice_account_invalid_credentials: Přihlašovací údaje jsou nesprávné
34
36
  notice_onthefly_failure: Nemáte oprávnění k přístupu do aplikace
35
37
  notice_account_pending: Váš účet čeká na schválení/ověření
@@ -42,6 +44,7 @@ cs:
42
44
  error_password_expired: Platnost vašeho hesla vypršela. Prosím změňte ho.
43
45
  warning_password_not_changed: Heslo nebylo změněno, zadali jste všechna hesla správně?
44
46
 
47
+
45
48
  label_approve: Schválit
46
49
  label_new: Nový
47
50
  label_create: Vytvořit
@@ -118,6 +121,8 @@ cs:
118
121
  birth_date: Datum narození
119
122
  birth_place: Místo narození
120
123
  residence: Bydliště
124
+ title: Tituly před
125
+ higher_title: Tituly za
121
126
  egov_utils/legal_person:
122
127
  name: Název
123
128
  ico: IČO
@@ -0,0 +1,6 @@
1
+ class AddTitlesToNaturalPeople < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :egov_utils_natural_people, :title, :string
4
+ add_column :egov_utils_natural_people, :higher_title, :string
5
+ end
6
+ end
@@ -11,6 +11,7 @@ require 'azahara_schema_currency'
11
11
  require 'font-awesome-sass'
12
12
  require 'modernizr-rails'
13
13
  require 'clipboard/rails'
14
+ require 'vuejs-rails'
14
15
 
15
16
  require 'cookies_eu'
16
17
 
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.3.4'
2
+ VERSION = '0.3.5'
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.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
@@ -318,6 +318,20 @@ dependencies:
318
318
  - - "~>"
319
319
  - !ruby/object:Gem::Version
320
320
  version: '1.7'
321
+ - !ruby/object:Gem::Dependency
322
+ name: vuejs-rails
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - "~>"
326
+ - !ruby/object:Gem::Version
327
+ version: '2.5'
328
+ type: :runtime
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - "~>"
333
+ - !ruby/object:Gem::Version
334
+ version: '2.5'
321
335
  - !ruby/object:Gem::Dependency
322
336
  name: azahara_schema
323
337
  requirement: !ruby/object:Gem::Requirement
@@ -508,6 +522,7 @@ files:
508
522
  - db/migrate/20180403133155_create_egov_utils_people_base.rb
509
523
  - db/migrate/20180403141531_join_people_tables.rb
510
524
  - db/migrate/20180403150556_create_egov_utils_legal_people.rb
525
+ - db/migrate/20180424143207_add_titles_to_natural_people.rb
511
526
  - lib/azahara_schema_currency.rb
512
527
  - lib/azahara_schema_currency/association_attribute_patch.rb
513
528
  - lib/azahara_schema_currency/attribute_formatter_patch.rb