decidim-budgets 0.26.4 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) 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 +46 -0
  54. data/config/locales/cs.yml +50 -0
  55. data/config/locales/da.yml +1 -0
  56. data/config/locales/de.yml +43 -2
  57. data/config/locales/el.yml +1 -0
  58. data/config/locales/en.yml +45 -0
  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 +46 -0
  63. data/config/locales/et.yml +1 -0
  64. data/config/locales/eu.yml +1 -0
  65. data/config/locales/fi-plain.yml +46 -0
  66. data/config/locales/fi.yml +46 -0
  67. data/config/locales/fr-CA.yml +45 -0
  68. data/config/locales/fr.yml +46 -1
  69. data/config/locales/ga-IE.yml +1 -0
  70. data/config/locales/gl.yml +10 -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 +1 -0
  76. data/config/locales/ja.yml +41 -0
  77. data/config/locales/ko.yml +1 -0
  78. data/config/locales/lb.yml +1 -0
  79. data/config/locales/lt.yml +1 -338
  80. data/config/locales/lv.yml +1 -0
  81. data/config/locales/mt.yml +1 -0
  82. data/config/locales/nl.yml +13 -28
  83. data/config/locales/no.yml +16 -0
  84. data/config/locales/om-ET.yml +1 -0
  85. data/config/locales/pl.yml +1 -0
  86. data/config/locales/pt-BR.yml +2 -1
  87. data/config/locales/pt.yml +1 -0
  88. data/config/locales/ro-RO.yml +1 -1
  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 +22 -0
  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 +1 -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 -21
  112. data/app/services/decidim/budgets/project_search.rb +0 -45
  113. data/config/locales/gn-PY.yml +0 -1
  114. data/config/locales/lo-LA.yml +0 -1
  115. data/config/locales/oc-FR.yml +0 -1
@@ -1 +1,2 @@
1
+ ---
1
2
  zh-TW:
@@ -14,7 +14,7 @@ class VotesEnabledToVotesChoices < ActiveRecord::Migration[5.2]
14
14
  new_steps_settings = component["settings"]["steps"].each_with_object({}) do |(step, config), new_config|
15
15
  votes_value = config["votes_enabled"] ? "enabled" : "disabled"
16
16
 
17
- new_config[step] = config.merge("votes": votes_value).except("votes_enabled")
17
+ new_config[step] = config.merge(votes: votes_value).except("votes_enabled")
18
18
  new_config
19
19
  end
20
20
  component["settings"]["steps"] = new_steps_settings
@@ -22,7 +22,7 @@ class VotesEnabledToVotesChoices < ActiveRecord::Migration[5.2]
22
22
  elsif default_step.present?
23
23
  votes_value = component["settings"]["default_step"]["votes_enabled"] ? "enabled" : "disabled"
24
24
 
25
- new_default_step_settings = component["settings"]["default_step"].merge("votes": votes_value).except("votes_enabled")
25
+ new_default_step_settings = component["settings"]["default_step"].merge(votes: votes_value).except("votes_enabled")
26
26
  component["settings"]["default_step"] = new_default_step_settings
27
27
  component.save!
28
28
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddGeolocalizationFieldsToProjects < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_budgets_projects, :address, :text
6
+ add_column :decidim_budgets_projects, :latitude, :float
7
+ add_column :decidim_budgets_projects, :longitude, :float
8
+ end
9
+ end
@@ -15,6 +15,9 @@ module Decidim
15
15
  resources :budgets do
16
16
  resources :projects do
17
17
  collection do
18
+ post :update_category
19
+ post :update_scope
20
+ post :update_selected
18
21
  resource :proposals_import, only: [:new, :create]
19
22
  end
20
23
  end
@@ -46,7 +46,7 @@ Decidim.register_component(:budgets) do |component|
46
46
 
47
47
  component.register_stat :orders_count do |components, start_at, end_at|
48
48
  budgets = Decidim::Budgets::Budget.where(component: components)
49
- orders = Decidim::Budgets::Order.where(component: budgets)
49
+ orders = Decidim::Budgets::Order.where(budget: budgets)
50
50
  orders = orders.where("created_at >= ?", start_at) if start_at.present?
51
51
  orders = orders.where("created_at <= ?", end_at) if end_at.present?
52
52
  orders.count
@@ -90,6 +90,7 @@ Decidim.register_component(:budgets) do |component|
90
90
  settings.attribute :vote_selected_projects_maximum, type: :integer, default: 1
91
91
  settings.attribute :comments_enabled, type: :boolean, default: true
92
92
  settings.attribute :comments_max_length, type: :integer, required: false
93
+ settings.attribute :geocoding_enabled, type: :boolean, default: false
93
94
  settings.attribute :resources_permissions_enabled, type: :boolean, default: true
94
95
  settings.attribute :announcement, type: :text, translated: true, editor: true
95
96
 
@@ -123,7 +124,7 @@ Decidim.register_component(:budgets) do |component|
123
124
  settings: {
124
125
  landing_page_content: landing_page_content,
125
126
  more_information_modal: Decidim::Faker::Localized.paragraph(sentence_count: 4),
126
- workflow: Decidim::Budgets.workflows.keys.sample
127
+ workflow: %w(one random all).sample
127
128
  }
128
129
  )
129
130
 
@@ -148,7 +149,7 @@ Decidim.register_component(:budgets) do |component|
148
149
  description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
149
150
  Decidim::Faker::Localized.paragraph(sentence_count: 3)
150
151
  end,
151
- budget_amount: Faker::Number.number(digits: 8)
152
+ budget_amount: Faker::Number.between(from: Integer(budget.total_budget * 0.7), to: budget.total_budget)
152
153
  )
153
154
 
154
155
  attachment_collection = Decidim::AttachmentCollection.create!(
@@ -163,7 +164,7 @@ Decidim.register_component(:budgets) do |component|
163
164
  attachment_collection: attachment_collection,
164
165
  attached_to: project,
165
166
  content_type: "application/pdf",
166
- file: ActiveStorage::Blob.create_after_upload!(
167
+ file: ActiveStorage::Blob.create_and_upload!(
167
168
  io: File.open(File.join(__dir__, "seeds", "Exampledocument.pdf")),
168
169
  filename: "Exampledocument.pdf",
169
170
  content_type: "application/pdf",
@@ -175,7 +176,7 @@ Decidim.register_component(:budgets) do |component|
175
176
  description: Decidim::Faker::Localized.sentence(word_count: 5),
176
177
  attached_to: project,
177
178
  content_type: "image/jpeg",
178
- file: ActiveStorage::Blob.create_after_upload!(
179
+ file: ActiveStorage::Blob.create_and_upload!(
179
180
  io: File.open(File.join(__dir__, "seeds", "city.jpeg")),
180
181
  filename: "city.jpeg",
181
182
  content_type: "image/jpeg",
@@ -187,7 +188,7 @@ Decidim.register_component(:budgets) do |component|
187
188
  description: Decidim::Faker::Localized.sentence(word_count: 5),
188
189
  attached_to: project,
189
190
  content_type: "application/pdf",
190
- file: ActiveStorage::Blob.create_after_upload!(
191
+ file: ActiveStorage::Blob.create_and_upload!(
191
192
  io: File.open(File.join(__dir__, "seeds", "Exampledocument.pdf")),
192
193
  filename: "Exampledocument.pdf",
193
194
  content_type: "application/pdf",
@@ -42,6 +42,23 @@ module Decidim
42
42
  initializer "decidim_budgets.webpacker.assets_path" do
43
43
  Decidim.register_assets_path File.expand_path("app/packs", root)
44
44
  end
45
+
46
+ initializer "decidim_budgets.register_reminders" do
47
+ Decidim.reminders_registry.register(:orders) do |reminder_registry|
48
+ reminder_registry.generator_class_name = "Decidim::Budgets::OrderReminderGenerator"
49
+ reminder_registry.form_class_name = "Decidim::Budgets::Admin::OrderReminderForm"
50
+ reminder_registry.command_class_name = "Decidim::Budgets::Admin::CreateOrderReminders"
51
+
52
+ reminder_registry.settings do |settings|
53
+ settings.attribute :reminder_times, type: :array, default: [2.hours, 1.week, 2.weeks]
54
+ end
55
+
56
+ reminder_registry.messages do |msg|
57
+ msg.set(:title) { |count: 0| I18n.t("decidim.budgets.admin.reminders.orders.title", count: count) }
58
+ msg.set(:description) { I18n.t("decidim.budgets.admin.reminders.orders.description") }
59
+ end
60
+ end
61
+ end
45
62
  end
46
63
  end
47
64
  end
@@ -12,6 +12,14 @@ FactoryBot.define do
12
12
  manifest_name { :budgets }
13
13
  participatory_space { create(:participatory_process, :with_steps, organization: organization) }
14
14
 
15
+ trait :with_geocoding_enabled do
16
+ settings do
17
+ {
18
+ geocoding_enabled: true
19
+ }
20
+ end
21
+ end
22
+
15
23
  trait :with_vote_threshold_percent do
16
24
  transient do
17
25
  vote_rule_threshold_percent_enabled { true }
@@ -120,6 +128,9 @@ FactoryBot.define do
120
128
  factory :project, class: "Decidim::Budgets::Project" do
121
129
  title { generate_localized_title }
122
130
  description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
131
+ address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
132
+ latitude { Faker::Address.latitude }
133
+ longitude { Faker::Address.longitude }
123
134
  budget_amount { Faker::Number.number(digits: 8) }
124
135
  budget { create(:budget) }
125
136
 
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-budgets version.
5
5
  module Budgets
6
6
  def self.version
7
- "0.26.4"
7
+ "0.27.0.rc1"
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-budgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.4
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: 2022-11-15 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.4
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.4
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.4
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.4
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.4
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.4
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.4
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.4
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.4
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.4
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
@@ -258,7 +276,6 @@ files:
258
276
  - config/locales/ko.yml
259
277
  - config/locales/lb-LU.yml
260
278
  - config/locales/lb.yml
261
- - config/locales/lo-LA.yml
262
279
  - config/locales/lt-LT.yml
263
280
  - config/locales/lt.yml
264
281
  - config/locales/lv.yml
@@ -266,7 +283,6 @@ files:
266
283
  - config/locales/mt.yml
267
284
  - config/locales/nl.yml
268
285
  - config/locales/no.yml
269
- - config/locales/oc-FR.yml
270
286
  - config/locales/om-ET.yml
271
287
  - config/locales/pl.yml
272
288
  - config/locales/pt-BR.yml
@@ -308,6 +324,7 @@ files:
308
324
  - db/migrate/20200804175222_votes_enabled_to_votes_choices.rb
309
325
  - db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb
310
326
  - db/migrate/20210310120613_add_followable_counter_cache_to_budgets.rb
327
+ - db/migrate/20220428072638_add_geolocalization_fields_to_projects.rb
311
328
  - lib/decidim/api/budget_type.rb
312
329
  - lib/decidim/api/budgets_type.rb
313
330
  - lib/decidim/api/project_type.rb
@@ -338,14 +355,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
355
  requirements:
339
356
  - - ">="
340
357
  - !ruby/object:Gem::Version
341
- version: '2.7'
358
+ version: '3.0'
342
359
  required_rubygems_version: !ruby/object:Gem::Requirement
343
360
  requirements:
344
- - - ">="
361
+ - - ">"
345
362
  - !ruby/object:Gem::Version
346
- version: '0'
363
+ version: 1.3.1
347
364
  requirements: []
348
- rubygems_version: 3.1.6
365
+ rubygems_version: 3.2.22
349
366
  signing_key:
350
367
  specification_version: 4
351
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
- lo:
@@ -1 +0,0 @@
1
- oc: