decidim-budgets 0.27.10 → 0.28.0.rc4
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheets/decidim/budgets/budget/_budget-vote-button.scss +5 -5
- data/app/cells/decidim/budgets/base_cell.rb +1 -1
- data/app/cells/decidim/budgets/budget_cell.rb +6 -1
- data/app/cells/decidim/budgets/budget_information_modal/show.erb +14 -26
- data/app/cells/decidim/budgets/budget_list_item/projects_count.erb +6 -0
- data/app/cells/decidim/budgets/budget_list_item/show.erb +35 -30
- data/app/cells/decidim/budgets/budget_list_item/vote_action.erb +13 -0
- data/app/cells/decidim/budgets/budget_list_item_cell.rb +24 -1
- data/app/cells/decidim/budgets/budget_metadata_cell.rb +29 -0
- data/app/cells/decidim/budgets/budget_s_cell.rb +15 -0
- data/app/cells/decidim/budgets/budgets_header/show.erb +2 -6
- data/app/cells/decidim/budgets/budgets_list/card_list.erb +8 -13
- data/app/cells/decidim/budgets/budgets_list/main_list.erb +5 -0
- data/app/cells/decidim/budgets/budgets_list/show.erb +12 -16
- data/app/cells/decidim/budgets/budgets_list/voted.erb +8 -44
- data/app/cells/decidim/budgets/budgets_list_cell.rb +34 -0
- data/app/cells/decidim/budgets/limit_announcement/show.erb +3 -0
- data/app/cells/decidim/budgets/limit_announcement_cell.rb +2 -2
- data/app/cells/decidim/budgets/order_activity_cell.rb +1 -4
- data/app/cells/decidim/budgets/project_cell.rb +6 -1
- data/app/cells/decidim/budgets/project_l/extra_data.erb +6 -0
- data/app/cells/decidim/budgets/project_l/metadata.erb +4 -0
- data/app/cells/decidim/budgets/project_l_cell.rb +38 -0
- data/app/cells/decidim/budgets/project_metadata_cell.rb +78 -0
- data/app/cells/decidim/budgets/project_s_cell.rb +21 -0
- data/app/cells/decidim/budgets/project_tags/show.erb +1 -0
- data/app/cells/decidim/budgets/project_vote_button/show.erb +21 -15
- data/app/cells/decidim/budgets/project_vote_button_cell.rb +69 -1
- data/app/cells/decidim/budgets/project_voted_hint_cell.rb +1 -1
- data/app/cells/decidim/budgets/project_votes_count_cell.rb +9 -8
- data/app/commands/decidim/budgets/admin/create_project.rb +0 -1
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +1 -1
- data/app/commands/decidim/budgets/admin/update_project.rb +1 -2
- data/app/commands/decidim/budgets/admin/update_project_scope.rb +1 -1
- data/app/commands/decidim/budgets/admin/update_project_selection.rb +1 -1
- data/app/commands/decidim/budgets/admin/update_projects_budget.rb +57 -0
- data/app/controllers/concerns/decidim/budgets/admin/filterable.rb +1 -1
- data/app/controllers/concerns/decidim/budgets/needs_current_order.rb +2 -2
- data/app/controllers/decidim/budgets/admin/budgets_controller.rb +5 -5
- data/app/controllers/decidim/budgets/admin/projects_controller.rb +52 -10
- data/app/controllers/decidim/budgets/admin/proposals_imports_controller.rb +1 -1
- data/app/controllers/decidim/budgets/application_controller.rb +0 -4
- data/app/controllers/decidim/budgets/budgets_controller.rb +9 -0
- data/app/controllers/decidim/budgets/line_items_controller.rb +10 -16
- data/app/controllers/decidim/budgets/orders_controller.rb +7 -2
- data/app/controllers/decidim/budgets/projects_controller.rb +51 -4
- data/app/forms/decidim/budgets/admin/project_form.rb +1 -1
- data/app/helpers/decidim/budgets/application_helper.rb +4 -0
- data/app/helpers/decidim/budgets/projects_helper.rb +89 -33
- data/app/jobs/decidim/budgets/send_vote_reminder_job.rb +1 -1
- data/app/mailers/decidim/budgets/order_summary_mailer.rb +1 -1
- data/app/mailers/decidim/budgets/vote_reminder_mailer.rb +1 -1
- data/app/models/decidim/budgets/budget.rb +1 -0
- data/app/models/decidim/budgets/project.rb +17 -7
- data/app/packs/entrypoints/decidim_budgets.js +2 -0
- data/app/packs/src/decidim/budgets/exit_handler.js +11 -8
- data/app/packs/src/decidim/budgets/progressFixed.js +25 -11
- data/app/packs/src/decidim/budgets/projects.js +15 -10
- data/app/packs/stylesheets/budgets.scss +273 -0
- data/app/presenters/decidim/budgets/admin_log/budget_presenter.rb +2 -2
- data/app/presenters/decidim/budgets/admin_log/project_presenter.rb +2 -2
- data/app/services/decidim/budgets/order_reminder_generator.rb +4 -4
- data/app/views/decidim/budgets/admin/budgets/_form.html.erb +17 -12
- data/app/views/decidim/budgets/admin/budgets/edit.html.erb +16 -6
- data/app/views/decidim/budgets/admin/budgets/index.html.erb +58 -64
- data/app/views/decidim/budgets/admin/budgets/new.html.erb +16 -6
- data/app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb +19 -10
- data/app/views/decidim/budgets/admin/projects/_form.html.erb +31 -35
- data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +15 -13
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_budget-change.html.erb +22 -0
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb +3 -3
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb +8 -2
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +3 -3
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +5 -8
- data/app/views/decidim/budgets/admin/projects/edit.html.erb +16 -6
- data/app/views/decidim/budgets/admin/projects/index.html.erb +26 -31
- data/app/views/decidim/budgets/admin/projects/new.html.erb +16 -6
- data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +8 -4
- data/app/views/decidim/budgets/admin/proposals_imports/new.html.erb +40 -28
- data/app/views/decidim/budgets/budgets/index.html.erb +21 -3
- data/app/views/decidim/budgets/budgets/index.js.erb +6 -0
- data/app/views/decidim/budgets/line_items/update_budget.js.erb +21 -11
- data/app/views/decidim/budgets/projects/_addition_selector.html.erb +16 -0
- data/app/views/decidim/budgets/projects/_budget_confirm.html.erb +42 -31
- data/app/views/decidim/budgets/projects/_budget_excess.html.erb +12 -12
- data/app/views/decidim/budgets/projects/_budget_summary.html.erb +2 -75
- data/app/views/decidim/budgets/projects/_exit_modal.html.erb +15 -18
- data/app/views/decidim/budgets/projects/_linked_projects.html.erb +3 -12
- data/app/views/decidim/budgets/projects/_order.html.erb +1 -0
- data/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb +10 -0
- data/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb +113 -0
- data/app/views/decidim/budgets/projects/_order_total_budget.html.erb +6 -7
- data/app/views/decidim/budgets/projects/_project.html.erb +2 -1
- data/app/views/decidim/budgets/projects/_project_budget_button.html.erb +11 -19
- data/app/views/decidim/budgets/projects/_projects.html.erb +8 -6
- data/app/views/decidim/budgets/projects/_projects_count.html.erb +5 -0
- data/app/views/decidim/budgets/projects/_projects_list.html.erb +3 -0
- data/app/views/decidim/budgets/projects/index.html.erb +58 -55
- data/app/views/decidim/budgets/projects/index.js.erb +5 -4
- data/app/views/decidim/budgets/projects/show.html.erb +78 -51
- data/config/assets.rb +0 -1
- data/config/locales/ar.yml +0 -50
- data/config/locales/bg.yml +0 -381
- data/config/locales/ca.yml +75 -84
- data/config/locales/cs.yml +73 -82
- data/config/locales/de.yml +76 -85
- data/config/locales/el.yml +34 -72
- data/config/locales/en.yml +79 -88
- data/config/locales/es-MX.yml +73 -82
- data/config/locales/es-PY.yml +73 -82
- data/config/locales/es.yml +75 -84
- data/config/locales/eu.yml +74 -86
- data/config/locales/fi-plain.yml +75 -84
- data/config/locales/fi.yml +79 -88
- data/config/locales/fr-CA.yml +74 -86
- data/config/locales/fr.yml +78 -90
- data/config/locales/ga-IE.yml +0 -12
- data/config/locales/gl.yml +0 -58
- data/config/locales/hu.yml +58 -81
- data/config/locales/id-ID.yml +0 -38
- data/config/locales/is-IS.yml +0 -22
- data/config/locales/it.yml +0 -84
- data/config/locales/ja.yml +69 -81
- data/config/locales/ko.yml +0 -54
- data/config/locales/lb.yml +0 -85
- data/config/locales/lt.yml +59 -82
- data/config/locales/lv.yml +0 -44
- data/config/locales/nl.yml +0 -96
- data/config/locales/no.yml +0 -84
- data/config/locales/pl.yml +0 -167
- data/config/locales/pt-BR.yml +9 -141
- data/config/locales/pt.yml +0 -85
- data/config/locales/ro-RO.yml +0 -95
- data/config/locales/ru.yml +0 -41
- data/config/locales/sk.yml +0 -44
- data/config/locales/sq-AL.yml +0 -52
- data/config/locales/sr-CS.yml +0 -4
- data/config/locales/sv.yml +42 -150
- data/config/locales/tr-TR.yml +2 -82
- data/config/locales/uk.yml +0 -41
- data/config/locales/zh-CN.yml +0 -65
- data/config/locales/zh-TW.yml +13 -59
- data/lib/decidim/budgets/admin_engine.rb +3 -2
- data/lib/decidim/budgets/component.rb +4 -90
- data/lib/decidim/budgets/engine.rb +30 -10
- data/lib/decidim/budgets/project_serializer.rb +3 -3
- data/lib/decidim/budgets/seeds.rb +69 -0
- data/lib/decidim/budgets/test/factories.rb +23 -37
- data/lib/decidim/budgets/version.rb +1 -1
- data/lib/decidim/budgets/workflows/base.rb +1 -1
- metadata +46 -42
- data/app/cells/decidim/budgets/budget_m/data.erb +0 -12
- data/app/cells/decidim/budgets/budget_m/footer.erb +0 -5
- data/app/cells/decidim/budgets/budget_m_cell.rb +0 -16
- data/app/cells/decidim/budgets/project_list_item/project_data.erb +0 -19
- data/app/cells/decidim/budgets/project_list_item/project_image.erb +0 -5
- data/app/cells/decidim/budgets/project_list_item/project_text.erb +0 -23
- data/app/cells/decidim/budgets/project_list_item/show.erb +0 -5
- data/app/cells/decidim/budgets/project_list_item_cell.rb +0 -70
- data/app/cells/decidim/budgets/project_m/data.erb +0 -12
- data/app/cells/decidim/budgets/project_m/footer.erb +0 -5
- data/app/cells/decidim/budgets/project_m_cell.rb +0 -22
- data/app/packs/stylesheets/decidim/budgets/_budgets.scss +0 -3
- data/app/packs/stylesheets/decidim/budgets/budget/_budget-list.scss +0 -198
- data/app/packs/stylesheets/decidim/budgets/budget/_budget-meter.scss +0 -83
- data/app/packs/stylesheets/decidim/budgets/budget/_progress.scss +0 -19
- data/app/views/decidim/budgets/admin/projects/proposals_picker.html.erb +0 -1
- data/app/views/decidim/budgets/projects/_filters.html.erb +0 -30
- data/app/views/decidim/budgets/projects/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/budgets/projects/_order_progress.html.erb +0 -32
- data/app/views/decidim/budgets/projects/_order_selected_projects.html.erb +0 -27
- data/config/locales/he-IL.yml +0 -1
- data/decidim-budgets.gemspec +0 -34
- data/lib/decidim/budgets/seeds/city.jpeg +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "decidim/components/namer"
|
3
4
|
require "decidim/faker/localized"
|
4
5
|
require "decidim/dev"
|
5
6
|
|
@@ -8,12 +9,9 @@ require "decidim/participatory_processes/test/factories"
|
|
8
9
|
|
9
10
|
FactoryBot.define do
|
10
11
|
factory :budgets_component, parent: :component do
|
11
|
-
|
12
|
-
skip_injection { false }
|
13
|
-
end
|
14
|
-
name { generate_component_name(participatory_space.organization.available_locales, :budgets, skip_injection: skip_injection) }
|
12
|
+
name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :budgets).i18n_name }
|
15
13
|
manifest_name { :budgets }
|
16
|
-
participatory_space { create(:participatory_process, :with_steps,
|
14
|
+
participatory_space { create(:participatory_process, :with_steps, organization:) }
|
17
15
|
|
18
16
|
trait :with_geocoding_enabled do
|
19
17
|
settings do
|
@@ -33,10 +31,10 @@ FactoryBot.define do
|
|
33
31
|
|
34
32
|
settings do
|
35
33
|
{
|
36
|
-
vote_rule_threshold_percent_enabled
|
37
|
-
vote_rule_minimum_budget_projects_enabled
|
34
|
+
vote_rule_threshold_percent_enabled:,
|
35
|
+
vote_rule_minimum_budget_projects_enabled:,
|
38
36
|
vote_rule_selected_projects_enabled: vote_rule_projects_enabled,
|
39
|
-
vote_threshold_percent:
|
37
|
+
vote_threshold_percent:
|
40
38
|
}
|
41
39
|
end
|
42
40
|
end
|
@@ -51,10 +49,10 @@ FactoryBot.define do
|
|
51
49
|
|
52
50
|
settings do
|
53
51
|
{
|
54
|
-
vote_rule_threshold_percent_enabled
|
55
|
-
vote_rule_minimum_budget_projects_enabled
|
52
|
+
vote_rule_threshold_percent_enabled:,
|
53
|
+
vote_rule_minimum_budget_projects_enabled:,
|
56
54
|
vote_rule_selected_projects_enabled: vote_rule_projects_enabled,
|
57
|
-
vote_minimum_budget_projects_number:
|
55
|
+
vote_minimum_budget_projects_number:
|
58
56
|
}
|
59
57
|
end
|
60
58
|
end
|
@@ -70,8 +68,8 @@ FactoryBot.define do
|
|
70
68
|
|
71
69
|
settings do
|
72
70
|
{
|
73
|
-
vote_rule_threshold_percent_enabled
|
74
|
-
vote_rule_minimum_budget_projects_enabled
|
71
|
+
vote_rule_threshold_percent_enabled:,
|
72
|
+
vote_rule_minimum_budget_projects_enabled:,
|
75
73
|
vote_rule_selected_projects_enabled: vote_rule_projects_enabled,
|
76
74
|
vote_selected_projects_minimum: vote_minimum_budget_projects_number,
|
77
75
|
vote_selected_projects_maximum: vote_maximum_budget_projects_number
|
@@ -112,13 +110,10 @@ FactoryBot.define do
|
|
112
110
|
end
|
113
111
|
|
114
112
|
factory :budget, class: "Decidim::Budgets::Budget" do
|
115
|
-
|
116
|
-
|
117
|
-
end
|
118
|
-
title { generate_localized_title(:budget_title, skip_injection: skip_injection) }
|
119
|
-
description { generate_localized_description(:budget_description, skip_injection: skip_injection) }
|
113
|
+
title { generate_localized_title }
|
114
|
+
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
120
115
|
total_budget { 100_000_000 }
|
121
|
-
component { create(:budgets_component
|
116
|
+
component { create(:budgets_component) }
|
122
117
|
|
123
118
|
trait :with_projects do
|
124
119
|
transient do
|
@@ -126,22 +121,19 @@ FactoryBot.define do
|
|
126
121
|
end
|
127
122
|
|
128
123
|
after(:create) do |budget, evaluator|
|
129
|
-
create_list(:project, evaluator.projects_number,
|
124
|
+
create_list(:project, evaluator.projects_number, budget:)
|
130
125
|
end
|
131
126
|
end
|
132
127
|
end
|
133
128
|
|
134
129
|
factory :project, class: "Decidim::Budgets::Project" do
|
135
|
-
|
136
|
-
|
137
|
-
end
|
138
|
-
title { generate_localized_title(:project_title, skip_injection: skip_injection) }
|
139
|
-
description { generate_localized_description(:project_description, skip_injection: skip_injection) }
|
130
|
+
title { generate_localized_title }
|
131
|
+
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
140
132
|
address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
|
141
133
|
latitude { Faker::Address.latitude }
|
142
134
|
longitude { Faker::Address.longitude }
|
143
135
|
budget_amount { Faker::Number.number(digits: 8) }
|
144
|
-
budget { create(:budget
|
136
|
+
budget { create(:budget) }
|
145
137
|
|
146
138
|
trait :selected do
|
147
139
|
selected_at { Time.current }
|
@@ -153,17 +145,14 @@ FactoryBot.define do
|
|
153
145
|
end
|
154
146
|
|
155
147
|
after :create do |project, evaluator|
|
156
|
-
project.attachments = create_list(:attachment, evaluator.photos_number, :with_image, attached_to: project
|
148
|
+
project.attachments = create_list(:attachment, evaluator.photos_number, :with_image, attached_to: project)
|
157
149
|
end
|
158
150
|
end
|
159
151
|
end
|
160
152
|
|
161
153
|
factory :order, class: "Decidim::Budgets::Order" do
|
162
|
-
|
163
|
-
|
164
|
-
end
|
165
|
-
budget { create(:budget, skip_injection: skip_injection) }
|
166
|
-
user { create(:user, organization: component.organization, skip_injection: skip_injection) }
|
154
|
+
budget { create(:budget) }
|
155
|
+
user { create(:user, organization: component.organization) }
|
167
156
|
|
168
157
|
trait :with_projects do
|
169
158
|
transient do
|
@@ -172,17 +161,14 @@ FactoryBot.define do
|
|
172
161
|
|
173
162
|
after(:create) do |order, evaluator|
|
174
163
|
project_budget = (order.maximum_budget / evaluator.projects_number).to_i
|
175
|
-
order.projects << create_list(:project, evaluator.projects_number, budget_amount: project_budget, budget: order.budget
|
164
|
+
order.projects << create_list(:project, evaluator.projects_number, budget_amount: project_budget, budget: order.budget)
|
176
165
|
order.save!
|
177
166
|
end
|
178
167
|
end
|
179
168
|
end
|
180
169
|
|
181
170
|
factory :line_item, class: "Decidim::Budgets::LineItem" do
|
182
|
-
transient do
|
183
|
-
skip_injection { false }
|
184
|
-
end
|
185
171
|
order
|
186
|
-
project { create(:project, budget: order.budget
|
172
|
+
project { create(:project, budget: order.budget) }
|
187
173
|
end
|
188
174
|
end
|
@@ -123,7 +123,7 @@ module Decidim
|
|
123
123
|
|
124
124
|
def orders
|
125
125
|
@orders ||= Decidim::Budgets::Order.includes(:projects).where(decidim_user_id: user, decidim_budgets_budget_id: budgets).map do |order|
|
126
|
-
[order.decidim_budgets_budget_id, { order
|
126
|
+
[order.decidim_budgets_budget_id, { order:, status: order.checked_out? ? :voted : :progress }] if order.projects.any?
|
127
127
|
end.compact.to_h
|
128
128
|
end
|
129
129
|
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.
|
4
|
+
version: 0.28.0.rc4
|
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:
|
13
|
+
date: 2023-12-11 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.
|
21
|
+
version: 0.28.0.rc4
|
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.
|
28
|
+
version: 0.28.0.rc4
|
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.
|
35
|
+
version: 0.28.0.rc4
|
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.
|
42
|
+
version: 0.28.0.rc4
|
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.
|
49
|
+
version: 0.28.0.rc4
|
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.
|
56
|
+
version: 0.28.0.rc4
|
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.
|
63
|
+
version: 0.28.0.rc4
|
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.
|
70
|
+
version: 0.28.0.rc4
|
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.
|
77
|
+
version: 0.28.0.rc4
|
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.
|
84
|
+
version: 0.28.0.rc4
|
85
85
|
description: A budgets component for decidim's participatory spaces.
|
86
86
|
email:
|
87
87
|
- josepjaume@gmail.com
|
@@ -98,28 +98,28 @@ files:
|
|
98
98
|
- app/cells/decidim/budgets/budget_cell.rb
|
99
99
|
- app/cells/decidim/budgets/budget_information_modal/show.erb
|
100
100
|
- app/cells/decidim/budgets/budget_information_modal_cell.rb
|
101
|
+
- app/cells/decidim/budgets/budget_list_item/projects_count.erb
|
101
102
|
- app/cells/decidim/budgets/budget_list_item/show.erb
|
103
|
+
- app/cells/decidim/budgets/budget_list_item/vote_action.erb
|
102
104
|
- app/cells/decidim/budgets/budget_list_item_cell.rb
|
103
|
-
- app/cells/decidim/budgets/
|
104
|
-
- app/cells/decidim/budgets/
|
105
|
-
- app/cells/decidim/budgets/budget_m_cell.rb
|
105
|
+
- app/cells/decidim/budgets/budget_metadata_cell.rb
|
106
|
+
- app/cells/decidim/budgets/budget_s_cell.rb
|
106
107
|
- app/cells/decidim/budgets/budgets_header/show.erb
|
107
108
|
- app/cells/decidim/budgets/budgets_header_cell.rb
|
108
109
|
- app/cells/decidim/budgets/budgets_list/card_list.erb
|
110
|
+
- app/cells/decidim/budgets/budgets_list/main_list.erb
|
109
111
|
- app/cells/decidim/budgets/budgets_list/show.erb
|
110
112
|
- app/cells/decidim/budgets/budgets_list/voted.erb
|
111
113
|
- app/cells/decidim/budgets/budgets_list_cell.rb
|
114
|
+
- app/cells/decidim/budgets/limit_announcement/show.erb
|
112
115
|
- app/cells/decidim/budgets/limit_announcement_cell.rb
|
113
116
|
- app/cells/decidim/budgets/order_activity_cell.rb
|
114
117
|
- app/cells/decidim/budgets/project_cell.rb
|
115
|
-
- app/cells/decidim/budgets/
|
116
|
-
- app/cells/decidim/budgets/
|
117
|
-
- app/cells/decidim/budgets/
|
118
|
-
- app/cells/decidim/budgets/
|
119
|
-
- app/cells/decidim/budgets/
|
120
|
-
- app/cells/decidim/budgets/project_m/data.erb
|
121
|
-
- app/cells/decidim/budgets/project_m/footer.erb
|
122
|
-
- app/cells/decidim/budgets/project_m_cell.rb
|
118
|
+
- app/cells/decidim/budgets/project_l/extra_data.erb
|
119
|
+
- app/cells/decidim/budgets/project_l/metadata.erb
|
120
|
+
- app/cells/decidim/budgets/project_l_cell.rb
|
121
|
+
- app/cells/decidim/budgets/project_metadata_cell.rb
|
122
|
+
- app/cells/decidim/budgets/project_s_cell.rb
|
123
123
|
- app/cells/decidim/budgets/project_selected_status_cell.rb
|
124
124
|
- app/cells/decidim/budgets/project_tags/show.erb
|
125
125
|
- app/cells/decidim/budgets/project_tags_cell.rb
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- app/commands/decidim/budgets/admin/update_project_category.rb
|
140
140
|
- app/commands/decidim/budgets/admin/update_project_scope.rb
|
141
141
|
- app/commands/decidim/budgets/admin/update_project_selection.rb
|
142
|
+
- app/commands/decidim/budgets/admin/update_projects_budget.rb
|
142
143
|
- app/commands/decidim/budgets/cancel_order.rb
|
143
144
|
- app/commands/decidim/budgets/checkout.rb
|
144
145
|
- app/commands/decidim/budgets/remove_line_item.rb
|
@@ -182,10 +183,7 @@ files:
|
|
182
183
|
- app/packs/src/decidim/budgets/exit_handler.js
|
183
184
|
- app/packs/src/decidim/budgets/progressFixed.js
|
184
185
|
- app/packs/src/decidim/budgets/projects.js
|
185
|
-
- app/packs/stylesheets/
|
186
|
-
- app/packs/stylesheets/decidim/budgets/budget/_budget-list.scss
|
187
|
-
- app/packs/stylesheets/decidim/budgets/budget/_budget-meter.scss
|
188
|
-
- app/packs/stylesheets/decidim/budgets/budget/_progress.scss
|
186
|
+
- app/packs/stylesheets/budgets.scss
|
189
187
|
- app/permissions/decidim/budgets/admin/permissions.rb
|
190
188
|
- app/permissions/decidim/budgets/permissions.rb
|
191
189
|
- app/presenters/decidim/budgets/admin_log/budget_presenter.rb
|
@@ -202,6 +200,7 @@ files:
|
|
202
200
|
- app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb
|
203
201
|
- app/views/decidim/budgets/admin/projects/_form.html.erb
|
204
202
|
- app/views/decidim/budgets/admin/projects/_project-tr.html.erb
|
203
|
+
- app/views/decidim/budgets/admin/projects/bulk_actions/_budget-change.html.erb
|
205
204
|
- app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb
|
206
205
|
- app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb
|
207
206
|
- app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb
|
@@ -209,26 +208,28 @@ files:
|
|
209
208
|
- app/views/decidim/budgets/admin/projects/edit.html.erb
|
210
209
|
- app/views/decidim/budgets/admin/projects/index.html.erb
|
211
210
|
- app/views/decidim/budgets/admin/projects/new.html.erb
|
212
|
-
- app/views/decidim/budgets/admin/projects/proposals_picker.html.erb
|
213
211
|
- app/views/decidim/budgets/admin/projects/update_attribute.js.erb
|
214
212
|
- app/views/decidim/budgets/admin/proposals_imports/new.html.erb
|
215
213
|
- app/views/decidim/budgets/budgets/index.html.erb
|
214
|
+
- app/views/decidim/budgets/budgets/index.js.erb
|
216
215
|
- app/views/decidim/budgets/line_items/update_budget.js.erb
|
217
216
|
- app/views/decidim/budgets/order_summary_mailer/order_summary.html.erb
|
217
|
+
- app/views/decidim/budgets/projects/_addition_selector.html.erb
|
218
218
|
- app/views/decidim/budgets/projects/_budget_confirm.html.erb
|
219
219
|
- app/views/decidim/budgets/projects/_budget_excess.html.erb
|
220
220
|
- app/views/decidim/budgets/projects/_budget_summary.html.erb
|
221
221
|
- app/views/decidim/budgets/projects/_count.html.erb
|
222
222
|
- app/views/decidim/budgets/projects/_exit_modal.html.erb
|
223
|
-
- app/views/decidim/budgets/projects/_filters.html.erb
|
224
|
-
- app/views/decidim/budgets/projects/_filters_small_view.html.erb
|
225
223
|
- app/views/decidim/budgets/projects/_linked_projects.html.erb
|
226
|
-
- app/views/decidim/budgets/projects/
|
227
|
-
- app/views/decidim/budgets/projects/
|
224
|
+
- app/views/decidim/budgets/projects/_order.html.erb
|
225
|
+
- app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb
|
226
|
+
- app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb
|
228
227
|
- app/views/decidim/budgets/projects/_order_total_budget.html.erb
|
229
228
|
- app/views/decidim/budgets/projects/_project.html.erb
|
230
229
|
- app/views/decidim/budgets/projects/_project_budget_button.html.erb
|
231
230
|
- app/views/decidim/budgets/projects/_projects.html.erb
|
231
|
+
- app/views/decidim/budgets/projects/_projects_count.html.erb
|
232
|
+
- app/views/decidim/budgets/projects/_projects_list.html.erb
|
232
233
|
- app/views/decidim/budgets/projects/index.html.erb
|
233
234
|
- app/views/decidim/budgets/projects/index.js.erb
|
234
235
|
- app/views/decidim/budgets/projects/show.html.erb
|
@@ -266,7 +267,6 @@ files:
|
|
266
267
|
- config/locales/ga-IE.yml
|
267
268
|
- config/locales/gl.yml
|
268
269
|
- config/locales/gn-PY.yml
|
269
|
-
- config/locales/he-IL.yml
|
270
270
|
- config/locales/hr-HR.yml
|
271
271
|
- config/locales/hr.yml
|
272
272
|
- config/locales/hu.yml
|
@@ -334,7 +334,6 @@ files:
|
|
334
334
|
- db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb
|
335
335
|
- db/migrate/20210310120613_add_followable_counter_cache_to_budgets.rb
|
336
336
|
- db/migrate/20220428072638_add_geolocalization_fields_to_projects.rb
|
337
|
-
- decidim-budgets.gemspec
|
338
337
|
- lib/decidim/api/budget_type.rb
|
339
338
|
- lib/decidim/api/budgets_type.rb
|
340
339
|
- lib/decidim/api/project_type.rb
|
@@ -345,34 +344,39 @@ files:
|
|
345
344
|
- lib/decidim/budgets/component.rb
|
346
345
|
- lib/decidim/budgets/engine.rb
|
347
346
|
- lib/decidim/budgets/project_serializer.rb
|
347
|
+
- lib/decidim/budgets/seeds.rb
|
348
348
|
- lib/decidim/budgets/seeds/Exampledocument.pdf
|
349
|
-
- lib/decidim/budgets/seeds/city.jpeg
|
350
349
|
- lib/decidim/budgets/test/factories.rb
|
351
350
|
- lib/decidim/budgets/version.rb
|
352
351
|
- lib/decidim/budgets/workflows.rb
|
353
352
|
- lib/decidim/budgets/workflows/all.rb
|
354
353
|
- lib/decidim/budgets/workflows/base.rb
|
355
354
|
- lib/decidim/budgets/workflows/one.rb
|
356
|
-
homepage: https://
|
355
|
+
homepage: https://decidim.org
|
357
356
|
licenses:
|
358
357
|
- AGPL-3.0
|
359
|
-
metadata:
|
358
|
+
metadata:
|
359
|
+
bug_tracker_uri: https://github.com/decidim/decidim/issues
|
360
|
+
documentation_uri: https://docs.decidim.org/
|
361
|
+
funding_uri: https://opencollective.com/decidim
|
362
|
+
homepage_uri: https://decidim.org
|
363
|
+
source_code_uri: https://github.com/decidim/decidim
|
360
364
|
post_install_message:
|
361
365
|
rdoc_options: []
|
362
366
|
require_paths:
|
363
367
|
- lib
|
364
368
|
required_ruby_version: !ruby/object:Gem::Requirement
|
365
369
|
requirements:
|
366
|
-
- - "
|
370
|
+
- - ">="
|
367
371
|
- !ruby/object:Gem::Version
|
368
|
-
version: 3.
|
372
|
+
version: '3.1'
|
369
373
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
370
374
|
requirements:
|
371
|
-
- - "
|
375
|
+
- - ">"
|
372
376
|
- !ruby/object:Gem::Version
|
373
|
-
version:
|
377
|
+
version: 1.3.1
|
374
378
|
requirements: []
|
375
|
-
rubygems_version: 3.
|
379
|
+
rubygems_version: 3.4.20
|
376
380
|
signing_key:
|
377
381
|
specification_version: 4
|
378
382
|
summary: Decidim budgets module
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<div class="card__icondata">
|
2
|
-
<ul class="card-data">
|
3
|
-
<li class="card-data__item">
|
4
|
-
<%= icon "euro-outline", class: "icon--big", role: "img", "aria-hidden": true %>
|
5
|
-
</li>
|
6
|
-
<li class="card-data__item">
|
7
|
-
<div class="text-left">
|
8
|
-
<strong class="heading4"><%= budget_to_currency model.total_budget %></strong>
|
9
|
-
</div>
|
10
|
-
</li>
|
11
|
-
</ul>
|
12
|
-
</div>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Budgets
|
5
|
-
# This cell renders the Medium (:m) budget card
|
6
|
-
# for an given instance of a Decidim::Budgets::Budget
|
7
|
-
class BudgetMCell < Decidim::CardMCell
|
8
|
-
include ActiveSupport::NumberHelper
|
9
|
-
include Decidim::Budgets::ProjectsHelper
|
10
|
-
|
11
|
-
def statuses
|
12
|
-
[]
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<div class="budget-list__data <%= data_class %>">
|
2
|
-
<% if voting_finished? %>
|
3
|
-
<div class="budget-list__data__votes">
|
4
|
-
<%= cell("decidim/budgets/project_votes_count", model) %>
|
5
|
-
|
6
|
-
<%= cell("decidim/budgets/project_voted_hint", model, class: "display-block margin-top-1") %>
|
7
|
-
</div>
|
8
|
-
<% else %>
|
9
|
-
<span class="budget-list__data__number budget-list__number show-for-medium">
|
10
|
-
<%= budget_to_currency(model.budget_amount) %>
|
11
|
-
|
12
|
-
<%= cell("decidim/budgets/project_votes_count", model, layout: :one_line, class: "display-inline-block") %>
|
13
|
-
|
14
|
-
<%= cell("decidim/budgets/project_voted_hint", model, class: "display-block margin-top-1") if current_order_checked_out? && resource_added? %>
|
15
|
-
</span>
|
16
|
-
|
17
|
-
<%= cell("decidim/budgets/project_vote_button", model) if !current_order_checked_out? && voting_open? %>
|
18
|
-
<% end %>
|
19
|
-
</div>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<div class="budget-list__text card__text">
|
2
|
-
<div>
|
3
|
-
<%= link_to resource_path, class: "card__link" do %>
|
4
|
-
<h3 class="card__title budget-list__title">
|
5
|
-
<%= cell("decidim/budgets/project_selected_status", model) %>
|
6
|
-
|
7
|
-
<%= resource_title %>
|
8
|
-
</h3>
|
9
|
-
<% end %>
|
10
|
-
|
11
|
-
<div class="show-for-medium">
|
12
|
-
<%= cell "decidim/budgets/project_tags", model, context: { extra_classes: ["tags--project"] } %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<div class="budget-list__data__number budget-list__number hide-for-medium">
|
16
|
-
<%= cell("decidim/budgets/project_votes_count",
|
17
|
-
model,
|
18
|
-
layout: :one_line) %>
|
19
|
-
|
20
|
-
<%= cell("decidim/budgets/project_voted_hint", model, class: "margin-left-1") if current_order_checked_out? && resource_added? %>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
</div>
|
@@ -1,70 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Budgets
|
5
|
-
# This cell renders a horizontal project card
|
6
|
-
# for an given instance of a Project in a budget list
|
7
|
-
class ProjectListItemCell < Decidim::ViewModel
|
8
|
-
include ActiveSupport::NumberHelper
|
9
|
-
include Decidim::LayoutHelper
|
10
|
-
include Decidim::ActionAuthorizationHelper
|
11
|
-
include Decidim::Budgets::ProjectsHelper
|
12
|
-
include Decidim::Budgets::Engine.routes.url_helpers
|
13
|
-
|
14
|
-
delegate :current_user, :current_settings, :current_order, :current_component,
|
15
|
-
:current_participatory_space, :can_have_order?, :voting_open?, :voting_finished?, to: :parent_controller
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def resource_path
|
20
|
-
resource_locator([model.budget, model]).path
|
21
|
-
end
|
22
|
-
|
23
|
-
def resource_title
|
24
|
-
decidim_escape_translated model.title
|
25
|
-
end
|
26
|
-
|
27
|
-
def resource_added?
|
28
|
-
current_order && current_order.projects.include?(model)
|
29
|
-
end
|
30
|
-
|
31
|
-
def resource_allocation
|
32
|
-
current_order.allocation_for(model)
|
33
|
-
end
|
34
|
-
|
35
|
-
def data_class
|
36
|
-
[].tap do |list|
|
37
|
-
list << "budget-list__data--added" if can_have_order? && resource_added?
|
38
|
-
list << "show-for-medium" if voting_finished? || (current_order_checked_out? && !resource_added?)
|
39
|
-
end.join(" ")
|
40
|
-
end
|
41
|
-
|
42
|
-
def vote_button_disabled?
|
43
|
-
current_user && !can_have_order?
|
44
|
-
end
|
45
|
-
|
46
|
-
def vote_button_class
|
47
|
-
return "success" if resource_added?
|
48
|
-
|
49
|
-
"hollow"
|
50
|
-
end
|
51
|
-
|
52
|
-
def vote_button_method
|
53
|
-
return :delete if resource_added?
|
54
|
-
|
55
|
-
:post
|
56
|
-
end
|
57
|
-
|
58
|
-
def vote_button_label
|
59
|
-
if resource_added?
|
60
|
-
return t(
|
61
|
-
"decidim.budgets.projects.project.remove",
|
62
|
-
resource_name: resource_title
|
63
|
-
)
|
64
|
-
end
|
65
|
-
|
66
|
-
t("decidim.budgets.projects.project.add", resource_name: resource_title)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<div class="card__icondata">
|
2
|
-
<ul class="card-data">
|
3
|
-
<li class="card-data__item">
|
4
|
-
<%= icon "euro-outline", class: "icon--big", role: "img", "aria-hidden": true %>
|
5
|
-
</li>
|
6
|
-
<li class="card-data__item">
|
7
|
-
<div class="text-left">
|
8
|
-
<strong class="heading4"><%= budget_to_currency model.budget_amount %></strong>
|
9
|
-
</div>
|
10
|
-
</li>
|
11
|
-
</ul>
|
12
|
-
</div>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Budgets
|
5
|
-
# This cell renders the Medium (:m) project card
|
6
|
-
# for an given instance of a Project
|
7
|
-
class ProjectMCell < Decidim::CardMCell
|
8
|
-
include ActiveSupport::NumberHelper
|
9
|
-
include Decidim::Budgets::ProjectsHelper
|
10
|
-
|
11
|
-
private
|
12
|
-
|
13
|
-
def resource_icon
|
14
|
-
icon "projects", class: "icon--big"
|
15
|
-
end
|
16
|
-
|
17
|
-
def resource_path
|
18
|
-
resource_locator([model.budget, model]).path
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|