decidim-budgets 0.26.5 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/budgets/order_activity_cell.rb +29 -0
  3. data/app/commands/decidim/budgets/add_line_item.rb +4 -2
  4. data/app/commands/decidim/budgets/admin/create_budget.rb +1 -1
  5. data/app/commands/decidim/budgets/admin/create_order_reminders.rb +66 -0
  6. data/app/commands/decidim/budgets/admin/create_project.rb +5 -2
  7. data/app/commands/decidim/budgets/admin/destroy_budget.rb +1 -1
  8. data/app/commands/decidim/budgets/admin/destroy_project.rb +1 -1
  9. data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +6 -6
  10. data/app/commands/decidim/budgets/admin/update_budget.rb +1 -1
  11. data/app/commands/decidim/budgets/admin/update_project.rb +5 -2
  12. data/app/commands/decidim/budgets/admin/update_project_category.rb +48 -0
  13. data/app/commands/decidim/budgets/admin/update_project_scope.rb +54 -0
  14. data/app/commands/decidim/budgets/admin/update_project_selection.rb +56 -0
  15. data/app/commands/decidim/budgets/cancel_order.rb +1 -1
  16. data/app/commands/decidim/budgets/checkout.rb +10 -3
  17. data/app/commands/decidim/budgets/remove_line_item.rb +1 -1
  18. data/app/controllers/decidim/budgets/admin/projects_controller.rb +149 -1
  19. data/app/controllers/decidim/budgets/projects_controller.rb +13 -13
  20. data/app/forms/decidim/budgets/admin/budget_form.rb +2 -2
  21. data/app/forms/decidim/budgets/admin/order_reminder_form.rb +75 -0
  22. data/app/forms/decidim/budgets/admin/project_form.rb +19 -3
  23. data/app/helpers/decidim/budgets/admin/project_bulk_actions_helper.rb +20 -0
  24. data/app/helpers/decidim/budgets/projects_helper.rb +29 -0
  25. data/app/jobs/decidim/budgets/send_vote_reminder_job.rb +16 -0
  26. data/app/mailers/decidim/budgets/vote_reminder_mailer.rb +39 -0
  27. data/app/models/decidim/budgets/order.rb +2 -3
  28. data/app/models/decidim/budgets/project.rb +12 -4
  29. data/app/packs/entrypoints/decidim_budgets_admin.js +1 -0
  30. data/app/packs/src/decidim/budgets/admin/projects.js +143 -0
  31. data/app/permissions/decidim/budgets/admin/permissions.rb +8 -3
  32. data/app/queries/decidim/budgets/filtered_projects.rb +1 -1
  33. data/app/serializers/decidim/budgets/{data_portability_budgets_order_serializer.rb → download_your_data_budgets_order_serializer.rb} +2 -2
  34. data/app/services/decidim/budgets/order_reminder_generator.rb +85 -0
  35. data/app/views/decidim/budgets/admin/budgets/index.html.erb +3 -0
  36. data/app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb +13 -0
  37. data/app/views/decidim/budgets/admin/projects/_form.html.erb +6 -0
  38. data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +50 -0
  39. data/app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb +15 -0
  40. data/app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb +36 -0
  41. data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +15 -0
  42. data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +25 -0
  43. data/app/views/decidim/budgets/admin/projects/index.html.erb +6 -54
  44. data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +26 -0
  45. data/app/views/decidim/budgets/projects/_filters.html.erb +4 -4
  46. data/app/views/decidim/budgets/projects/index.html.erb +28 -1
  47. data/app/views/decidim/budgets/projects/show.html.erb +6 -1
  48. data/app/views/decidim/budgets/vote_reminder_mailer/vote_reminder.html.erb +21 -0
  49. data/config/assets.rb +2 -1
  50. data/config/locales/am-ET.yml +1 -0
  51. data/config/locales/ar.yml +4 -0
  52. data/config/locales/bg.yml +1 -0
  53. data/config/locales/ca.yml +47 -1
  54. data/config/locales/cs.yml +51 -1
  55. data/config/locales/da.yml +1 -0
  56. data/config/locales/de.yml +45 -3
  57. data/config/locales/el.yml +2 -0
  58. data/config/locales/en.yml +46 -1
  59. data/config/locales/eo.yml +1 -0
  60. data/config/locales/es-MX.yml +43 -0
  61. data/config/locales/es-PY.yml +46 -0
  62. data/config/locales/es.yml +48 -2
  63. data/config/locales/et.yml +1 -0
  64. data/config/locales/eu.yml +3 -7
  65. data/config/locales/fi-plain.yml +46 -0
  66. data/config/locales/fi.yml +46 -0
  67. data/config/locales/fr-CA.yml +46 -1
  68. data/config/locales/fr.yml +47 -2
  69. data/config/locales/ga-IE.yml +1 -0
  70. data/config/locales/gl.yml +11 -0
  71. data/config/locales/hr.yml +1 -0
  72. data/config/locales/hu.yml +19 -0
  73. data/config/locales/id-ID.yml +1 -0
  74. data/config/locales/is-IS.yml +2 -1
  75. data/config/locales/it.yml +2 -0
  76. data/config/locales/ja.yml +42 -1
  77. data/config/locales/ko.yml +1 -0
  78. data/config/locales/lb.yml +2 -0
  79. data/config/locales/lt.yml +1 -337
  80. data/config/locales/lv.yml +1 -0
  81. data/config/locales/mt.yml +1 -0
  82. data/config/locales/nl.yml +14 -28
  83. data/config/locales/no.yml +17 -0
  84. data/config/locales/om-ET.yml +1 -0
  85. data/config/locales/pl.yml +2 -0
  86. data/config/locales/pt-BR.yml +3 -1
  87. data/config/locales/pt.yml +2 -0
  88. data/config/locales/ro-RO.yml +2 -3
  89. data/config/locales/ru.yml +1 -0
  90. data/config/locales/si-LK.yml +1 -0
  91. data/config/locales/sk.yml +1 -0
  92. data/config/locales/sl.yml +1 -0
  93. data/config/locales/so-SO.yml +1 -0
  94. data/config/locales/sr-CS.yml +1 -0
  95. data/config/locales/sv.yml +24 -4
  96. data/config/locales/sw-KE.yml +1 -0
  97. data/config/locales/ti-ER.yml +1 -0
  98. data/config/locales/tr-TR.yml +2 -0
  99. data/config/locales/uk.yml +1 -0
  100. data/config/locales/val-ES.yml +1 -0
  101. data/config/locales/vi.yml +1 -0
  102. data/config/locales/zh-CN.yml +1 -0
  103. data/config/locales/zh-TW.yml +1 -0
  104. data/db/migrate/20200804175222_votes_enabled_to_votes_choices.rb +2 -2
  105. data/db/migrate/20220428072638_add_geolocalization_fields_to_projects.rb +9 -0
  106. data/lib/decidim/budgets/admin_engine.rb +3 -0
  107. data/lib/decidim/budgets/component.rb +7 -6
  108. data/lib/decidim/budgets/engine.rb +17 -0
  109. data/lib/decidim/budgets/test/factories.rb +11 -0
  110. data/lib/decidim/budgets/version.rb +1 -1
  111. metadata +38 -22
  112. data/app/services/decidim/budgets/project_search.rb +0 -45
  113. data/config/locales/gn-PY.yml +0 -1
  114. data/config/locales/ka-GE.yml +0 -1
  115. data/config/locales/lo-LA.yml +0 -1
  116. data/config/locales/oc-FR.yml +0 -1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-budgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.5
4
+ version: 0.27.0.rc1
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: 2023-02-13 00:00:00.000000000 Z
13
+ date: 2022-06-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-comments
@@ -18,70 +18,70 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.26.5
21
+ version: 0.27.0.rc1
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.26.5
28
+ version: 0.27.0.rc1
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.26.5
35
+ version: 0.27.0.rc1
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.26.5
42
+ version: 0.27.0.rc1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-admin
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.26.5
49
+ version: 0.27.0.rc1
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.26.5
56
+ version: 0.27.0.rc1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-dev
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.26.5
63
+ version: 0.27.0.rc1
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.26.5
70
+ version: 0.27.0.rc1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-proposals
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.26.5
77
+ version: 0.27.0.rc1
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.26.5
84
+ version: 0.27.0.rc1
85
85
  description: A budgets component for decidim's participatory spaces.
86
86
  email:
87
87
  - josepjaume@gmail.com
@@ -110,6 +110,7 @@ files:
110
110
  - app/cells/decidim/budgets/budgets_list/voted.erb
111
111
  - app/cells/decidim/budgets/budgets_list_cell.rb
112
112
  - app/cells/decidim/budgets/limit_announcement_cell.rb
113
+ - app/cells/decidim/budgets/order_activity_cell.rb
113
114
  - app/cells/decidim/budgets/project_cell.rb
114
115
  - app/cells/decidim/budgets/project_list_item/project_data.erb
115
116
  - app/cells/decidim/budgets/project_list_item/project_image.erb
@@ -128,12 +129,16 @@ files:
128
129
  - app/cells/decidim/budgets/project_votes_count_cell.rb
129
130
  - app/commands/decidim/budgets/add_line_item.rb
130
131
  - app/commands/decidim/budgets/admin/create_budget.rb
132
+ - app/commands/decidim/budgets/admin/create_order_reminders.rb
131
133
  - app/commands/decidim/budgets/admin/create_project.rb
132
134
  - app/commands/decidim/budgets/admin/destroy_budget.rb
133
135
  - app/commands/decidim/budgets/admin/destroy_project.rb
134
136
  - app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb
135
137
  - app/commands/decidim/budgets/admin/update_budget.rb
136
138
  - app/commands/decidim/budgets/admin/update_project.rb
139
+ - app/commands/decidim/budgets/admin/update_project_category.rb
140
+ - app/commands/decidim/budgets/admin/update_project_scope.rb
141
+ - app/commands/decidim/budgets/admin/update_project_selection.rb
137
142
  - app/commands/decidim/budgets/cancel_order.rb
138
143
  - app/commands/decidim/budgets/checkout.rb
139
144
  - app/commands/decidim/budgets/remove_line_item.rb
@@ -153,21 +158,27 @@ files:
153
158
  - app/controllers/decidim/budgets/projects_controller.rb
154
159
  - app/forms/decidim/budgets/admin/budget_form.rb
155
160
  - app/forms/decidim/budgets/admin/component_form.rb
161
+ - app/forms/decidim/budgets/admin/order_reminder_form.rb
156
162
  - app/forms/decidim/budgets/admin/project_form.rb
157
163
  - app/forms/decidim/budgets/admin/project_import_proposals_form.rb
158
164
  - app/helpers/decidim/budgets/admin/application_helper.rb
159
165
  - app/helpers/decidim/budgets/admin/filterable_helper.rb
166
+ - app/helpers/decidim/budgets/admin/project_bulk_actions_helper.rb
160
167
  - app/helpers/decidim/budgets/application_helper.rb
161
168
  - app/helpers/decidim/budgets/projects_helper.rb
162
169
  - app/jobs/decidim/budgets/send_order_summary_job.rb
170
+ - app/jobs/decidim/budgets/send_vote_reminder_job.rb
163
171
  - app/mailers/decidim/budgets/order_summary_mailer.rb
172
+ - app/mailers/decidim/budgets/vote_reminder_mailer.rb
164
173
  - app/models/decidim/budgets/application_record.rb
165
174
  - app/models/decidim/budgets/budget.rb
166
175
  - app/models/decidim/budgets/line_item.rb
167
176
  - app/models/decidim/budgets/order.rb
168
177
  - app/models/decidim/budgets/project.rb
169
178
  - app/packs/entrypoints/decidim_budgets.js
179
+ - app/packs/entrypoints/decidim_budgets_admin.js
170
180
  - app/packs/images/decidim/budgets/decidim_budgets.svg
181
+ - app/packs/src/decidim/budgets/admin/projects.js
171
182
  - app/packs/src/decidim/budgets/exit_handler.js
172
183
  - app/packs/src/decidim/budgets/progressFixed.js
173
184
  - app/packs/src/decidim/budgets/projects.js
@@ -182,17 +193,24 @@ files:
182
193
  - app/queries/decidim/budgets/filtered_projects.rb
183
194
  - app/queries/decidim/budgets/metrics/budget_followers_metric_measure.rb
184
195
  - app/queries/decidim/budgets/metrics/budget_participants_metric_measure.rb
185
- - app/serializers/decidim/budgets/data_portability_budgets_order_serializer.rb
186
- - app/services/decidim/budgets/project_search.rb
196
+ - app/serializers/decidim/budgets/download_your_data_budgets_order_serializer.rb
197
+ - app/services/decidim/budgets/order_reminder_generator.rb
187
198
  - app/views/decidim/budgets/admin/budgets/_form.html.erb
188
199
  - app/views/decidim/budgets/admin/budgets/edit.html.erb
189
200
  - app/views/decidim/budgets/admin/budgets/index.html.erb
190
201
  - app/views/decidim/budgets/admin/budgets/new.html.erb
202
+ - app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb
191
203
  - app/views/decidim/budgets/admin/projects/_form.html.erb
204
+ - app/views/decidim/budgets/admin/projects/_project-tr.html.erb
205
+ - app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb
206
+ - app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb
207
+ - app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb
208
+ - app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb
192
209
  - app/views/decidim/budgets/admin/projects/edit.html.erb
193
210
  - app/views/decidim/budgets/admin/projects/index.html.erb
194
211
  - app/views/decidim/budgets/admin/projects/new.html.erb
195
212
  - app/views/decidim/budgets/admin/projects/proposals_picker.html.erb
213
+ - app/views/decidim/budgets/admin/projects/update_attribute.js.erb
196
214
  - app/views/decidim/budgets/admin/proposals_imports/new.html.erb
197
215
  - app/views/decidim/budgets/budgets/index.html.erb
198
216
  - app/views/decidim/budgets/line_items/update_budget.js.erb
@@ -214,6 +232,7 @@ files:
214
232
  - app/views/decidim/budgets/projects/index.html.erb
215
233
  - app/views/decidim/budgets/projects/index.js.erb
216
234
  - app/views/decidim/budgets/projects/show.html.erb
235
+ - app/views/decidim/budgets/vote_reminder_mailer/vote_reminder.html.erb
217
236
  - config/assets.rb
218
237
  - config/locales/am-ET.yml
219
238
  - config/locales/ar-SA.yml
@@ -245,7 +264,6 @@ files:
245
264
  - config/locales/fr.yml
246
265
  - config/locales/ga-IE.yml
247
266
  - config/locales/gl.yml
248
- - config/locales/gn-PY.yml
249
267
  - config/locales/hr-HR.yml
250
268
  - config/locales/hr.yml
251
269
  - config/locales/hu.yml
@@ -254,12 +272,10 @@ files:
254
272
  - config/locales/is.yml
255
273
  - config/locales/it.yml
256
274
  - config/locales/ja.yml
257
- - config/locales/ka-GE.yml
258
275
  - config/locales/ko-KR.yml
259
276
  - config/locales/ko.yml
260
277
  - config/locales/lb-LU.yml
261
278
  - config/locales/lb.yml
262
- - config/locales/lo-LA.yml
263
279
  - config/locales/lt-LT.yml
264
280
  - config/locales/lt.yml
265
281
  - config/locales/lv.yml
@@ -267,7 +283,6 @@ files:
267
283
  - config/locales/mt.yml
268
284
  - config/locales/nl.yml
269
285
  - config/locales/no.yml
270
- - config/locales/oc-FR.yml
271
286
  - config/locales/om-ET.yml
272
287
  - config/locales/pl.yml
273
288
  - config/locales/pt-BR.yml
@@ -309,6 +324,7 @@ files:
309
324
  - db/migrate/20200804175222_votes_enabled_to_votes_choices.rb
310
325
  - db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb
311
326
  - db/migrate/20210310120613_add_followable_counter_cache_to_budgets.rb
327
+ - db/migrate/20220428072638_add_geolocalization_fields_to_projects.rb
312
328
  - lib/decidim/api/budget_type.rb
313
329
  - lib/decidim/api/budgets_type.rb
314
330
  - lib/decidim/api/project_type.rb
@@ -339,14 +355,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
339
355
  requirements:
340
356
  - - ">="
341
357
  - !ruby/object:Gem::Version
342
- version: '2.7'
358
+ version: '3.0'
343
359
  required_rubygems_version: !ruby/object:Gem::Requirement
344
360
  requirements:
345
- - - ">="
361
+ - - ">"
346
362
  - !ruby/object:Gem::Version
347
- version: '0'
363
+ version: 1.3.1
348
364
  requirements: []
349
- rubygems_version: 3.1.6
365
+ rubygems_version: 3.2.22
350
366
  signing_key:
351
367
  specification_version: 4
352
368
  summary: Decidim budgets module
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Budgets
5
- # This class handles search and filtering of projects. Needs a
6
- # `current_component` param with a `Decidim::Component` in order to
7
- # find the projects.
8
- class ProjectSearch < ResourceSearch
9
- text_search_fields :title, :description
10
-
11
- # Public: Initializes the service.
12
- # component - A Decidim::Component to get the projects from.
13
- def initialize(options = {})
14
- super(Project.all, options)
15
- end
16
-
17
- # Creates the SearchLight base query.
18
- def base_query
19
- raise "Missing budget" unless budget
20
- raise "Missing component" unless component
21
-
22
- @scope.where(budget: budget)
23
- end
24
-
25
- # Returns the random projects for the current page.
26
- def results
27
- Project.where(id: super.pluck(:id)).includes([:scope, :component, :attachments, :category])
28
- end
29
-
30
- def search_status
31
- return query if status.member?("all")
32
-
33
- apply_scopes(%w(selected not_selected), status)
34
- end
35
-
36
- private
37
-
38
- # Private: Since budget is not used by a search method we need
39
- # to define the method manually.
40
- def budget
41
- options[:budget]
42
- end
43
- end
44
- end
45
- end
@@ -1 +0,0 @@
1
- gn:
@@ -1 +0,0 @@
1
- ka:
@@ -1 +0,0 @@
1
- lo:
@@ -1 +0,0 @@
1
- oc: