decidim-accountability 0.22.0 → 0.23.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/decidim/accountability/results_controller.rb +0 -1
  3. data/app/forms/decidim/accountability/admin/result_form.rb +3 -9
  4. data/app/helpers/decidim/accountability/admin/application_helper.rb +13 -0
  5. data/app/helpers/decidim/accountability/application_helper.rb +1 -1
  6. data/app/models/decidim/accountability/result.rb +4 -1
  7. data/app/models/decidim/accountability/status.rb +3 -0
  8. data/app/models/decidim/accountability/timeline_entry.rb +3 -0
  9. data/app/services/decidim/accountability/result_search.rb +2 -20
  10. data/app/services/decidim/accountability/result_stats_calculator.rb +1 -1
  11. data/app/views/decidim/accountability/admin/results/_form.html.erb +2 -2
  12. data/app/views/decidim/accountability/admin/results/index.html.erb +2 -0
  13. data/app/views/decidim/accountability/results/_scope_filters.html.erb +1 -1
  14. data/app/views/decidim/accountability/results/_stats_box.html.erb +0 -1
  15. data/config/locales/am-ET.yml +1 -0
  16. data/config/locales/bg.yml +226 -0
  17. data/config/locales/ca.yml +16 -13
  18. data/config/locales/cs.yml +22 -19
  19. data/config/locales/da.yml +202 -0
  20. data/config/locales/de.yml +21 -18
  21. data/config/locales/el.yml +1 -0
  22. data/config/locales/en.yml +3 -0
  23. data/config/locales/eo.yml +1 -0
  24. data/config/locales/es-MX.yml +3 -0
  25. data/config/locales/es-PY.yml +3 -0
  26. data/config/locales/es.yml +15 -12
  27. data/config/locales/et.yml +1 -0
  28. data/config/locales/eu.yml +8 -8
  29. data/config/locales/fi-plain.yml +3 -0
  30. data/config/locales/fi.yml +3 -0
  31. data/config/locales/fr-CA.yml +4 -0
  32. data/config/locales/fr.yml +4 -0
  33. data/config/locales/gl.yml +24 -1
  34. data/config/locales/hr.yml +1 -0
  35. data/config/locales/hu.yml +1 -0
  36. data/config/locales/is-IS.yml +29 -0
  37. data/config/locales/is.yml +177 -0
  38. data/config/locales/it.yml +3 -0
  39. data/config/locales/ja-JP.yml +2 -1
  40. data/config/locales/ja.yml +224 -0
  41. data/config/locales/ko-KR.yml +1 -0
  42. data/config/locales/ko.yml +1 -0
  43. data/config/locales/lt.yml +1 -0
  44. data/config/locales/{lv-LV.yml → lv.yml} +0 -0
  45. data/config/locales/mt.yml +1 -0
  46. data/config/locales/nl.yml +12 -9
  47. data/config/locales/no.yml +2 -0
  48. data/config/locales/om-ET.yml +1 -0
  49. data/config/locales/pl.yml +38 -35
  50. data/config/locales/pt.yml +1 -0
  51. data/config/locales/ro-RO.yml +1 -0
  52. data/config/locales/si-LK.yml +28 -0
  53. data/config/locales/sk.yml +16 -0
  54. data/config/locales/sl.yml +1 -0
  55. data/config/locales/so-SO.yml +1 -0
  56. data/config/locales/sv.yml +3 -0
  57. data/config/locales/sw-KE.yml +1 -0
  58. data/config/locales/ti-ER.yml +1 -0
  59. data/config/locales/tr-TR.yml +37 -14
  60. data/config/locales/vi-VN.yml +1 -0
  61. data/config/locales/vi.yml +1 -0
  62. data/config/locales/zh-CN.yml +223 -0
  63. data/config/locales/zh-TW.yml +1 -0
  64. data/db/migrate/20200827154103_add_commentable_counter_cache_to_results.rb +9 -0
  65. data/lib/decidim/accountability/component.rb +6 -1
  66. data/lib/decidim/accountability/engine.rb +0 -1
  67. data/lib/decidim/accountability/test/factories.rb +3 -1
  68. data/lib/decidim/accountability/version.rb +1 -1
  69. metadata +49 -27
  70. data/app/controllers/decidim/accountability/result_widgets_controller.rb +0 -19
@@ -0,0 +1 @@
1
+ zh-TW:
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddCommentableCounterCacheToResults < ActiveRecord::Migration[5.2]
4
+ def change
5
+ add_column :decidim_accountability_results, :comments_count, :integer, null: false, default: 0, index: true
6
+ Decidim::Accountability::Result.reset_column_information
7
+ Decidim::Accountability::Result.find_each(&:update_comments_count)
8
+ end
9
+ end
@@ -22,7 +22,10 @@ Decidim.register_component(:accountability) do |component|
22
22
  end
23
23
 
24
24
  component.settings(:global) do |settings|
25
+ settings.attribute :scopes_enabled, type: :boolean, default: true
26
+ settings.attribute :scope_id, type: :scope
25
27
  settings.attribute :comments_enabled, type: :boolean, default: true
28
+ settings.attribute :comments_max_length, type: :integer, required: false
26
29
  settings.attribute :intro, type: :text, translated: true, editor: true
27
30
  settings.attribute :categories_label, type: :string, translated: true, editor: true
28
31
  settings.attribute :subcategories_label, type: :string, translated: true, editor: true
@@ -67,7 +70,9 @@ Decidim.register_component(:accountability) do |component|
67
70
  categories_label: Decidim::Faker::Localized.word,
68
71
  subcategories_label: Decidim::Faker::Localized.word,
69
72
  heading_parent_level_results: Decidim::Faker::Localized.word,
70
- heading_leaf_level_results: Decidim::Faker::Localized.word
73
+ heading_leaf_level_results: Decidim::Faker::Localized.word,
74
+ scopes_enabled: true,
75
+ scope_id: participatory_space.scope&.id
71
76
  }
72
77
  }
73
78
 
@@ -13,7 +13,6 @@ module Decidim
13
13
 
14
14
  routes do
15
15
  resources :results, only: [:index, :show] do
16
- resource :result_widget, only: :show, path: "embed"
17
16
  resources :versions, only: [:show, :index]
18
17
  end
19
18
  root to: "results#home"
@@ -17,7 +17,9 @@ FactoryBot.define do
17
17
  categories_label: Decidim::Faker::Localized.word,
18
18
  subcategories_label: Decidim::Faker::Localized.word,
19
19
  heading_parent_level_results: Decidim::Faker::Localized.word,
20
- heading_leaf_level_results: Decidim::Faker::Localized.word
20
+ heading_leaf_level_results: Decidim::Faker::Localized.word,
21
+ scopes_enabled: true,
22
+ scope_id: participatory_space.scope&.id
21
23
  }
22
24
  end
23
25
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-accountability version.
5
5
  module Accountability
6
6
  def self.version
7
- "0.22.0"
7
+ "0.23.3"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-accountability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
8
8
  - Marc Riera Casals
9
9
  - Oriol Gual Oliva
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-01 00:00:00.000000000 Z
13
+ date: 2021-02-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-comments
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.22.0
21
+ version: 0.23.3
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.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-core
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.3
36
36
  type: :runtime
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.3
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: kaminari
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -80,98 +80,98 @@ dependencies:
80
80
  requirements:
81
81
  - - '='
82
82
  - !ruby/object:Gem::Version
83
- version: 0.22.0
83
+ version: 0.23.3
84
84
  type: :development
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - '='
89
89
  - !ruby/object:Gem::Version
90
- version: 0.22.0
90
+ version: 0.23.3
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: decidim-assemblies
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - '='
96
96
  - !ruby/object:Gem::Version
97
- version: 0.22.0
97
+ version: 0.23.3
98
98
  type: :development
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 0.22.0
104
+ version: 0.23.3
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: decidim-comments
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.22.0
111
+ version: 0.23.3
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 0.22.0
118
+ version: 0.23.3
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: decidim-dev
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - '='
124
124
  - !ruby/object:Gem::Version
125
- version: 0.22.0
125
+ version: 0.23.3
126
126
  type: :development
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - '='
131
131
  - !ruby/object:Gem::Version
132
- version: 0.22.0
132
+ version: 0.23.3
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: decidim-meetings
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - '='
138
138
  - !ruby/object:Gem::Version
139
- version: 0.22.0
139
+ version: 0.23.3
140
140
  type: :development
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - '='
145
145
  - !ruby/object:Gem::Version
146
- version: 0.22.0
146
+ version: 0.23.3
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: decidim-participatory_processes
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - '='
152
152
  - !ruby/object:Gem::Version
153
- version: 0.22.0
153
+ version: 0.23.3
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - '='
159
159
  - !ruby/object:Gem::Version
160
- version: 0.22.0
160
+ version: 0.23.3
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: decidim-proposals
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - '='
166
166
  - !ruby/object:Gem::Version
167
- version: 0.22.0
167
+ version: 0.23.3
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - '='
173
173
  - !ruby/object:Gem::Version
174
- version: 0.22.0
174
+ version: 0.23.3
175
175
  description: An accountability component for decidim's participatory spaces.
176
176
  email:
177
177
  - josepjaume@gmail.com
@@ -214,7 +214,6 @@ files:
214
214
  - app/controllers/decidim/accountability/admin/statuses_controller.rb
215
215
  - app/controllers/decidim/accountability/admin/timeline_entries_controller.rb
216
216
  - app/controllers/decidim/accountability/application_controller.rb
217
- - app/controllers/decidim/accountability/result_widgets_controller.rb
218
217
  - app/controllers/decidim/accountability/results_controller.rb
219
218
  - app/controllers/decidim/accountability/versions_controller.rb
220
219
  - app/events/decidim/accountability/proposal_linked_event.rb
@@ -222,6 +221,7 @@ files:
222
221
  - app/forms/decidim/accountability/admin/result_form.rb
223
222
  - app/forms/decidim/accountability/admin/status_form.rb
224
223
  - app/forms/decidim/accountability/admin/timeline_entry_form.rb
224
+ - app/helpers/decidim/accountability/admin/application_helper.rb
225
225
  - app/helpers/decidim/accountability/application_helper.rb
226
226
  - app/helpers/decidim/accountability/breadcrumb_helper.rb
227
227
  - app/jobs/application_job.rb
@@ -284,22 +284,27 @@ files:
284
284
  - app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_results.html.erb
285
285
  - app/views/decidim/participatory_processes/participatory_process_groups/_result.html.erb
286
286
  - app/views/decidim/participatory_spaces/_result.html.erb
287
+ - config/locales/am-ET.yml
287
288
  - config/locales/ar-SA.yml
288
289
  - config/locales/ar.yml
289
290
  - config/locales/bg-BG.yml
291
+ - config/locales/bg.yml
290
292
  - config/locales/ca.yml
291
293
  - config/locales/cs-CZ.yml
292
294
  - config/locales/cs.yml
293
295
  - config/locales/da-DK.yml
296
+ - config/locales/da.yml
294
297
  - config/locales/de.yml
295
298
  - config/locales/el-GR.yml
296
299
  - config/locales/el.yml
297
300
  - config/locales/en.yml
298
301
  - config/locales/eo-UY.yml
302
+ - config/locales/eo.yml
299
303
  - config/locales/es-MX.yml
300
304
  - config/locales/es-PY.yml
301
305
  - config/locales/es.yml
302
306
  - config/locales/et-EE.yml
307
+ - config/locales/et.yml
303
308
  - config/locales/eu.yml
304
309
  - config/locales/fi-pl.yml
305
310
  - config/locales/fi-plain.yml
@@ -309,28 +314,44 @@ files:
309
314
  - config/locales/ga-IE.yml
310
315
  - config/locales/gl.yml
311
316
  - config/locales/hr-HR.yml
317
+ - config/locales/hr.yml
312
318
  - config/locales/hu.yml
313
319
  - config/locales/id-ID.yml
314
320
  - config/locales/is-IS.yml
321
+ - config/locales/is.yml
315
322
  - config/locales/it.yml
316
323
  - config/locales/ja-JP.yml
324
+ - config/locales/ja.yml
325
+ - config/locales/ko-KR.yml
326
+ - config/locales/ko.yml
317
327
  - config/locales/lt-LT.yml
318
- - config/locales/lv-LV.yml
328
+ - config/locales/lt.yml
329
+ - config/locales/lv.yml
319
330
  - config/locales/mt-MT.yml
331
+ - config/locales/mt.yml
320
332
  - config/locales/nl.yml
321
333
  - config/locales/no.yml
334
+ - config/locales/om-ET.yml
322
335
  - config/locales/pl.yml
323
336
  - config/locales/pt-BR.yml
324
337
  - config/locales/pt.yml
325
338
  - config/locales/ro-RO.yml
326
339
  - config/locales/ru.yml
340
+ - config/locales/si-LK.yml
327
341
  - config/locales/sk-SK.yml
328
342
  - config/locales/sk.yml
329
343
  - config/locales/sl.yml
344
+ - config/locales/so-SO.yml
330
345
  - config/locales/sr-CS.yml
331
346
  - config/locales/sv.yml
347
+ - config/locales/sw-KE.yml
348
+ - config/locales/ti-ER.yml
332
349
  - config/locales/tr-TR.yml
333
350
  - config/locales/uk.yml
351
+ - config/locales/vi-VN.yml
352
+ - config/locales/vi.yml
353
+ - config/locales/zh-CN.yml
354
+ - config/locales/zh-TW.yml
334
355
  - db/migrate/20170425154712_create_accountability_statuses.rb
335
356
  - db/migrate/20170426104125_create_accountability_results.rb
336
357
  - db/migrate/20170508104902_add_description_and_progress_to_statuses.rb
@@ -342,6 +363,7 @@ files:
342
363
  - db/migrate/20180508170210_add_weight_to_results.rb
343
364
  - db/migrate/20180508170647_add_external_id_to_results.rb
344
365
  - db/migrate/20200320105903_index_foreign_keys_in_decidim_accountability_results.rb
366
+ - db/migrate/20200827154103_add_commentable_counter_cache_to_results.rb
345
367
  - lib/decidim/accountability.rb
346
368
  - lib/decidim/accountability/admin.rb
347
369
  - lib/decidim/accountability/admin_engine.rb
@@ -355,7 +377,7 @@ homepage: https://github.com/decidim/decidim
355
377
  licenses:
356
378
  - AGPL-3.0
357
379
  metadata: {}
358
- post_install_message:
380
+ post_install_message:
359
381
  rdoc_options: []
360
382
  require_paths:
361
383
  - lib
@@ -363,15 +385,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
363
385
  requirements:
364
386
  - - ">="
365
387
  - !ruby/object:Gem::Version
366
- version: '2.5'
388
+ version: '2.6'
367
389
  required_rubygems_version: !ruby/object:Gem::Requirement
368
390
  requirements:
369
391
  - - ">="
370
392
  - !ruby/object:Gem::Version
371
393
  version: '0'
372
394
  requirements: []
373
- rubygems_version: 3.1.2
374
- signing_key:
395
+ rubygems_version: 3.0.3
396
+ signing_key:
375
397
  specification_version: 4
376
398
  summary: Decidim accountability module
377
399
  test_files: []
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Accountability
5
- class ResultWidgetsController < Decidim::WidgetsController
6
- helper_method :model
7
-
8
- private
9
-
10
- def model
11
- @model ||= Result.where(component: params[:component_id]).find(params[:result_id])
12
- end
13
-
14
- def iframe_url
15
- @iframe_url ||= result_result_widget_url(model)
16
- end
17
- end
18
- end
19
- end