decidim-participatory_processes 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/participatory_processes/process_m/footer.erb +3 -3
  3. data/app/cells/decidim/participatory_processes/process_m_cell.rb +19 -0
  4. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +3 -3
  5. data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +10 -5
  6. data/app/controllers/decidim/participatory_processes/admin/participatory_process_exports_controller.rb +4 -0
  7. data/app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb +2 -1
  8. data/app/controllers/decidim/participatory_processes/{participatory_process_widgets_controller.rb → widgets_controller.rb} +2 -2
  9. data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +5 -6
  10. data/app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb +4 -1
  11. data/app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb +3 -0
  12. data/app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb +8 -2
  13. data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +11 -0
  14. data/app/models/decidim/participatory_process.rb +13 -1
  15. data/app/models/decidim/participatory_process_group.rb +5 -0
  16. data/app/models/decidim/participatory_process_step.rb +3 -0
  17. data/app/queries/decidim/participatory_processes/stats_participants_count.rb +6 -4
  18. data/app/serializers/decidim/participatory_processes/participatory_process_importer.rb +6 -4
  19. data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb +9 -4
  20. data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +1 -1
  21. data/app/views/layouts/decidim/participatory_process.html.erb +1 -0
  22. data/config/locales/am-ET.yml +1 -0
  23. data/config/locales/bg.yml +19 -0
  24. data/config/locales/ca.yml +4 -1
  25. data/config/locales/cs.yml +3 -0
  26. data/config/locales/da.yml +1 -0
  27. data/config/locales/en.yml +3 -0
  28. data/config/locales/eo.yml +1 -0
  29. data/config/locales/es-MX.yml +3 -0
  30. data/config/locales/es-PY.yml +3 -0
  31. data/config/locales/es.yml +5 -2
  32. data/config/locales/et.yml +1 -0
  33. data/config/locales/fr-CA.yml +3 -0
  34. data/config/locales/fr.yml +9 -6
  35. data/config/locales/hr.yml +1 -0
  36. data/config/locales/is.yml +215 -0
  37. data/config/locales/it.yml +2 -2
  38. data/config/locales/ja-JP.yml +122 -122
  39. data/config/locales/ja.yml +445 -0
  40. data/config/locales/ko-KR.yml +1 -0
  41. data/config/locales/ko.yml +1 -0
  42. data/config/locales/lt.yml +1 -0
  43. data/config/locales/{lv-LV.yml → lv.yml} +0 -0
  44. data/config/locales/mt.yml +1 -0
  45. data/config/locales/om-ET.yml +1 -0
  46. data/config/locales/pl.yml +152 -152
  47. data/config/locales/sl.yml +4 -0
  48. data/config/locales/so-SO.yml +1 -0
  49. data/config/locales/sv.yml +5 -2
  50. data/config/locales/ti-ER.yml +1 -0
  51. data/config/locales/vi-VN.yml +1 -0
  52. data/config/locales/vi.yml +1 -0
  53. data/config/locales/zh-CN.yml +445 -0
  54. data/config/locales/zh-TW.yml +1 -0
  55. data/db/migrate/20201006072346_fix_attachments_titles.rb +38 -0
  56. data/lib/decidim/participatory_processes/admin_engine.rb +1 -0
  57. data/lib/decidim/participatory_processes/engine.rb +1 -1
  58. data/lib/decidim/participatory_processes/participatory_space.rb +11 -11
  59. data/lib/decidim/participatory_processes/test/factories.rb +3 -3
  60. data/lib/decidim/participatory_processes/version.rb +1 -1
  61. metadata +32 -12
@@ -0,0 +1 @@
1
+ zh-TW:
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ class FixAttachmentsTitles < ActiveRecord::Migration[5.2]
4
+ def up
5
+ reset_column_information
6
+
7
+ PaperTrail.request(enabled: false) do
8
+ Decidim::Attachment.find_each do |attachment|
9
+ next if attachment.title.is_a?(Hash) && attachment.description.is_a?(Hash)
10
+
11
+ attached_to = attachment.attached_to
12
+ locale = attached_to.try(:locale).presence ||
13
+ attached_to.try(:default_locale).presence ||
14
+ attached_to.try(:organization).try(:default_locale).presence ||
15
+ Decidim.default_locale
16
+
17
+ # rubocop:disable Rails/SkipsModelValidations
18
+ attachment.update_columns(
19
+ title: {
20
+ locale => attachment.title
21
+ },
22
+ description: {
23
+ locale => attachment.description
24
+ }
25
+ )
26
+ # rubocop:enable Rails/SkipsModelValidations
27
+ end
28
+ end
29
+
30
+ reset_column_information
31
+ end
32
+
33
+ def down; end
34
+
35
+ def reset_column_information
36
+ Decidim::Attachment.reset_column_information
37
+ end
38
+ end
@@ -49,6 +49,7 @@ module Decidim
49
49
  member do
50
50
  put :publish
51
51
  put :unpublish
52
+ get :share
52
53
  end
53
54
  resources :exports, only: :create
54
55
  end
@@ -32,7 +32,7 @@ module Decidim
32
32
  resources :participatory_processes, only: [:index, :show], param: :slug, path: "processes" do
33
33
  get "all-metrics", on: :member
34
34
  resources :participatory_process_steps, only: [:index], path: "steps"
35
- resource :participatory_process_widget, only: :show, path: "embed"
35
+ resource :widget, only: :show, path: "embed"
36
36
  end
37
37
 
38
38
  scope "/processes/:participatory_process_slug/f/:component_id" do
@@ -71,8 +71,8 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
71
71
  description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
72
72
  Decidim::Faker::Localized.paragraph(3)
73
73
  end,
74
- hero_image: File.new(File.join(seeds_root, "city.jpeg")),
75
- organization: organization
74
+ organization: organization,
75
+ hero_image: File.new(File.join(seeds_root, "city.jpeg")) # Keep after organization
76
76
  )
77
77
  end
78
78
 
@@ -88,11 +88,11 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
88
88
  description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
89
89
  Decidim::Faker::Localized.paragraph(3)
90
90
  end,
91
- hero_image: File.new(File.join(seeds_root, "city.jpeg")),
92
- banner_image: File.new(File.join(seeds_root, "city2.jpeg")),
91
+ organization: organization,
92
+ hero_image: File.new(File.join(seeds_root, "city.jpeg")), # Keep after organization
93
+ banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
93
94
  promoted: true,
94
95
  published_at: 2.weeks.ago,
95
- organization: organization,
96
96
  meta_scope: Decidim::Faker::Localized.word,
97
97
  developer_group: Decidim::Faker::Localized.sentence(1),
98
98
  local_area: Decidim::Faker::Localized.sentence(2),
@@ -159,23 +159,23 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
159
159
  Decidim::Attachment.create!(
160
160
  title: Decidim::Faker::Localized.sentence(2),
161
161
  description: Decidim::Faker::Localized.sentence(5),
162
- file: File.new(File.join(seeds_root, "Exampledocument.pdf")),
163
162
  attachment_collection: attachment_collection,
164
- attached_to: process
163
+ attached_to: process,
164
+ file: File.new(File.join(seeds_root, "Exampledocument.pdf")) # Keep after attached_to
165
165
  )
166
166
 
167
167
  Decidim::Attachment.create!(
168
168
  title: Decidim::Faker::Localized.sentence(2),
169
169
  description: Decidim::Faker::Localized.sentence(5),
170
- file: File.new(File.join(seeds_root, "city.jpeg")),
171
- attached_to: process
170
+ attached_to: process,
171
+ file: File.new(File.join(seeds_root, "city.jpeg")) # Keep after attached_to
172
172
  )
173
173
 
174
174
  Decidim::Attachment.create!(
175
175
  title: Decidim::Faker::Localized.sentence(2),
176
176
  description: Decidim::Faker::Localized.sentence(5),
177
- file: File.new(File.join(seeds_root, "Exampledocument.pdf")),
178
- attached_to: process
177
+ attached_to: process,
178
+ file: File.new(File.join(seeds_root, "Exampledocument.pdf")) # Keep after attached_to
179
179
  )
180
180
 
181
181
  2.times do
@@ -16,10 +16,10 @@ FactoryBot.define do
16
16
  subtitle { generate_localized_title }
17
17
  short_description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
18
18
  description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
19
- hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
20
- banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") }
21
- published_at { Time.current }
22
19
  organization
20
+ hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after organization
21
+ banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") } # Keep after organization
22
+ published_at { Time.current }
23
23
  meta_scope { Decidim::Faker::Localized.word }
24
24
  developer_group { generate_localized_title }
25
25
  local_area { generate_localized_title }
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-participatory_processes version.
5
5
  module ParticipatoryProcesses
6
6
  def self.version
7
- "0.22.0"
7
+ "0.23.0"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-participatory_processes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-01 00:00:00.000000000 Z
13
+ date: 2020-11-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,42 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.22.0
21
+ version: 0.23.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.22.0
28
+ version: 0.23.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-admin
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.22.0
35
+ version: 0.23.0
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.22.0
42
+ version: 0.23.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-dev
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.22.0
49
+ version: 0.23.0
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.22.0
56
+ version: 0.23.0
57
57
  description: Participatory processes component for decidim.
58
58
  email:
59
59
  - josepjaume@gmail.com
@@ -137,8 +137,8 @@ files:
137
137
  - app/controllers/decidim/participatory_processes/application_controller.rb
138
138
  - app/controllers/decidim/participatory_processes/participatory_process_groups_controller.rb
139
139
  - app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
140
- - app/controllers/decidim/participatory_processes/participatory_process_widgets_controller.rb
141
140
  - app/controllers/decidim/participatory_processes/participatory_processes_controller.rb
141
+ - app/controllers/decidim/participatory_processes/widgets_controller.rb
142
142
  - app/events/decidim/participatory_process_role_assigned_event.rb
143
143
  - app/events/decidim/participatory_process_step_activated_event.rb
144
144
  - app/events/decidim/participatory_process_step_changed_event.rb
@@ -242,22 +242,27 @@ files:
242
242
  - app/views/layouts/decidim/admin/participatory_process_groups.html.erb
243
243
  - app/views/layouts/decidim/admin/participatory_processes.html.erb
244
244
  - app/views/layouts/decidim/participatory_process.html.erb
245
+ - config/locales/am-ET.yml
245
246
  - config/locales/ar-SA.yml
246
247
  - config/locales/ar.yml
247
248
  - config/locales/bg-BG.yml
249
+ - config/locales/bg.yml
248
250
  - config/locales/ca.yml
249
251
  - config/locales/cs-CZ.yml
250
252
  - config/locales/cs.yml
251
253
  - config/locales/da-DK.yml
254
+ - config/locales/da.yml
252
255
  - config/locales/de.yml
253
256
  - config/locales/el-GR.yml
254
257
  - config/locales/el.yml
255
258
  - config/locales/en.yml
256
259
  - config/locales/eo-UY.yml
260
+ - config/locales/eo.yml
257
261
  - config/locales/es-MX.yml
258
262
  - config/locales/es-PY.yml
259
263
  - config/locales/es.yml
260
264
  - config/locales/et-EE.yml
265
+ - config/locales/et.yml
261
266
  - config/locales/eu.yml
262
267
  - config/locales/fi-pl.yml
263
268
  - config/locales/fi-plain.yml
@@ -267,16 +272,24 @@ files:
267
272
  - config/locales/ga-IE.yml
268
273
  - config/locales/gl.yml
269
274
  - config/locales/hr-HR.yml
275
+ - config/locales/hr.yml
270
276
  - config/locales/hu.yml
271
277
  - config/locales/id-ID.yml
272
278
  - config/locales/is-IS.yml
279
+ - config/locales/is.yml
273
280
  - config/locales/it.yml
274
281
  - config/locales/ja-JP.yml
282
+ - config/locales/ja.yml
283
+ - config/locales/ko-KR.yml
284
+ - config/locales/ko.yml
275
285
  - config/locales/lt-LT.yml
276
- - config/locales/lv-LV.yml
286
+ - config/locales/lt.yml
287
+ - config/locales/lv.yml
277
288
  - config/locales/mt-MT.yml
289
+ - config/locales/mt.yml
278
290
  - config/locales/nl.yml
279
291
  - config/locales/no.yml
292
+ - config/locales/om-ET.yml
280
293
  - config/locales/pl.yml
281
294
  - config/locales/pt-BR.yml
282
295
  - config/locales/pt.yml
@@ -285,10 +298,16 @@ files:
285
298
  - config/locales/sk-SK.yml
286
299
  - config/locales/sk.yml
287
300
  - config/locales/sl.yml
301
+ - config/locales/so-SO.yml
288
302
  - config/locales/sr-CS.yml
289
303
  - config/locales/sv.yml
304
+ - config/locales/ti-ER.yml
290
305
  - config/locales/tr-TR.yml
291
306
  - config/locales/uk.yml
307
+ - config/locales/vi-VN.yml
308
+ - config/locales/vi.yml
309
+ - config/locales/zh-CN.yml
310
+ - config/locales/zh-TW.yml
292
311
  - db/migrate/20161005130108_add_participatory_processes.rb
293
312
  - db/migrate/20161010102356_translate_processes.rb
294
313
  - db/migrate/20161011125616_add_hero_image_to_processes.rb
@@ -327,6 +346,7 @@ files:
327
346
  - db/migrate/20200320105908_index_foreign_keys_in_decidim_attachments.rb
328
347
  - db/migrate/20200320105924_index_foreign_keys_in_decidim_participatory_process_user_roles.rb
329
348
  - db/migrate/20200320105925_index_foreign_keys_in_decidim_participatory_processes.rb
349
+ - db/migrate/20201006072346_fix_attachments_titles.rb
330
350
  - db/seeds/Exampledocument.pdf
331
351
  - db/seeds/city.jpeg
332
352
  - db/seeds/city2.jpeg
@@ -351,14 +371,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
371
  requirements:
352
372
  - - ">="
353
373
  - !ruby/object:Gem::Version
354
- version: '2.5'
374
+ version: '2.6'
355
375
  required_rubygems_version: !ruby/object:Gem::Requirement
356
376
  requirements:
357
377
  - - ">="
358
378
  - !ruby/object:Gem::Version
359
379
  version: '0'
360
380
  requirements: []
361
- rubygems_version: 3.1.2
381
+ rubygems_version: 3.0.3
362
382
  signing_key:
363
383
  specification_version: 4
364
384
  summary: Decidim participatory processes module