decidim-budgets 0.20.1 → 0.23.1
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 +38 -3
- data/app/assets/images/decidim/budgets/icon.svg +1 -11
- data/app/assets/javascripts/decidim/budgets/projects.js.es6 +26 -4
- data/app/assets/stylesheets/decidim/budgets/budget/_budget-list.scss +152 -24
- data/app/cells/decidim/budgets/base_cell.rb +22 -0
- data/app/cells/decidim/budgets/budget_cell.rb +21 -0
- data/app/cells/decidim/budgets/budget_information_modal/show.erb +28 -0
- data/app/cells/decidim/budgets/budget_information_modal_cell.rb +22 -0
- data/app/cells/decidim/budgets/budget_list_item/show.erb +22 -0
- data/app/cells/decidim/budgets/budget_list_item_cell.rb +40 -0
- data/app/cells/decidim/budgets/budget_m/data.erb +12 -0
- data/app/cells/decidim/budgets/budget_m/footer.erb +5 -0
- data/app/cells/decidim/budgets/budget_m_cell.rb +16 -0
- data/app/cells/decidim/budgets/budgets_header/show.erb +7 -0
- data/app/cells/decidim/budgets/budgets_header_cell.rb +14 -0
- data/app/cells/decidim/budgets/budgets_list/card_list.erb +7 -0
- data/app/cells/decidim/budgets/budgets_list/highlighted.erb +11 -0
- data/app/cells/decidim/budgets/budgets_list/show.erb +20 -0
- data/app/cells/decidim/budgets/budgets_list/voted.erb +43 -0
- data/app/cells/decidim/budgets/budgets_list_cell.rb +39 -0
- data/app/cells/decidim/budgets/limit_announcement_cell.rb +52 -0
- data/app/cells/decidim/budgets/project_list_item/project_data.erb +19 -0
- data/app/cells/decidim/budgets/project_list_item/project_data_vote_button.erb +15 -0
- data/app/cells/decidim/budgets/project_list_item/project_image.erb +5 -0
- data/app/cells/decidim/budgets/project_list_item/project_text.erb +23 -0
- data/app/cells/decidim/budgets/project_list_item/show.erb +5 -0
- data/app/cells/decidim/budgets/project_list_item_cell.rb +66 -0
- data/app/cells/decidim/budgets/project_m/data.erb +3 -3
- data/app/cells/decidim/budgets/project_m/footer.erb +1 -1
- data/app/cells/decidim/budgets/project_m_cell.rb +4 -0
- data/app/cells/decidim/budgets/project_selected_status_cell.rb +28 -0
- data/app/cells/decidim/budgets/project_tags/show.erb +5 -0
- data/app/cells/decidim/budgets/project_tags_cell.rb +18 -0
- data/app/cells/decidim/budgets/project_voted_hint_cell.rb +33 -0
- data/app/cells/decidim/budgets/project_votes_count_cell.rb +44 -0
- data/app/commands/decidim/budgets/add_line_item.rb +7 -10
- data/app/commands/decidim/budgets/admin/create_budget.rb +48 -0
- data/app/commands/decidim/budgets/admin/create_project.rb +26 -11
- data/app/commands/decidim/budgets/admin/destroy_budget.rb +42 -0
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +26 -25
- data/app/commands/decidim/budgets/admin/update_budget.rb +48 -0
- data/app/commands/decidim/budgets/admin/update_project.rb +20 -2
- data/app/commands/decidim/budgets/checkout.rb +7 -6
- data/app/commands/decidim/budgets/remove_line_item.rb +3 -2
- data/app/controllers/concerns/decidim/budgets/needs_current_order.rb +18 -2
- data/app/controllers/concerns/decidim/budgets/orderable.rb +57 -0
- data/app/controllers/decidim/budgets/admin/application_controller.rb +10 -2
- data/app/controllers/decidim/budgets/admin/attachment_collections_controller.rb +1 -1
- data/app/controllers/decidim/budgets/admin/attachments_controller.rb +2 -2
- data/app/controllers/decidim/budgets/admin/budgets_controller.rb +82 -0
- data/app/controllers/decidim/budgets/admin/projects_controller.rb +15 -12
- data/app/controllers/decidim/budgets/admin/proposals_imports_controller.rb +10 -2
- data/app/controllers/decidim/budgets/application_controller.rb +23 -0
- data/app/controllers/decidim/budgets/budgets_controller.rb +24 -0
- data/app/controllers/decidim/budgets/line_items_controller.rb +10 -6
- data/app/controllers/decidim/budgets/orders_controller.rb +20 -6
- data/app/controllers/decidim/budgets/projects_controller.rb +28 -7
- data/app/forms/decidim/budgets/admin/budget_form.rb +39 -0
- data/app/forms/decidim/budgets/admin/component_form.rb +44 -0
- data/app/forms/decidim/budgets/admin/project_form.rb +25 -9
- data/app/forms/decidim/budgets/admin/project_import_proposals_form.rb +4 -0
- data/app/helpers/decidim/budgets/admin/application_helper.rb +13 -0
- data/app/helpers/decidim/budgets/application_helper.rb +11 -0
- data/app/helpers/decidim/budgets/projects_helper.rb +13 -0
- data/app/jobs/decidim/budgets/send_order_summary_job.rb +15 -0
- data/app/mailers/decidim/budgets/order_summary_mailer.rb +36 -0
- data/app/models/decidim/budgets/budget.rb +34 -0
- data/app/models/decidim/budgets/line_item.rb +4 -4
- data/app/models/decidim/budgets/order.rb +46 -16
- data/app/models/decidim/budgets/project.rb +37 -4
- data/app/permissions/decidim/budgets/admin/permissions.rb +23 -10
- data/app/permissions/decidim/budgets/permissions.rb +28 -6
- data/app/presenters/decidim/budgets/admin_log/budget_presenter.rb +42 -0
- data/app/queries/decidim/budgets/filtered_projects.rb +9 -1
- data/app/queries/decidim/budgets/metrics/budget_followers_metric_measure.rb +3 -2
- data/app/queries/decidim/budgets/metrics/budget_participants_metric_measure.rb +6 -5
- data/app/serializers/decidim/budgets/data_portability_budgets_order_serializer.rb +3 -2
- data/app/services/decidim/budgets/project_search.rb +13 -17
- data/app/types/decidim/budgets/budget_type.rb +24 -0
- data/app/types/decidim/budgets/budgets_type.rb +32 -0
- data/app/types/decidim/budgets/project_type.rb +26 -0
- data/app/views/decidim/budgets/admin/budgets/_form.html.erb +23 -0
- data/app/views/decidim/budgets/admin/budgets/edit.html.erb +7 -0
- data/app/views/decidim/budgets/admin/budgets/index.html.erb +58 -0
- data/app/views/decidim/budgets/admin/budgets/new.html.erb +7 -0
- data/app/views/decidim/budgets/admin/projects/_form.html.erb +15 -10
- data/app/views/decidim/budgets/admin/projects/edit.html.erb +2 -2
- data/app/views/decidim/budgets/admin/projects/index.html.erb +20 -7
- data/app/views/decidim/budgets/admin/projects/new.html.erb +2 -2
- data/app/views/decidim/budgets/admin/projects/proposals_picker.html.erb +1 -0
- data/app/views/decidim/budgets/admin/proposals_imports/new.html.erb +1 -1
- data/app/views/decidim/budgets/budgets/index.html.erb +5 -0
- data/app/views/decidim/budgets/order_summary_mailer/order_summary.html.erb +22 -0
- data/app/views/decidim/budgets/projects/_budget_confirm.html.erb +3 -3
- data/app/views/decidim/budgets/projects/_budget_summary.html.erb +26 -7
- data/app/views/decidim/budgets/projects/_filters.html.erb +15 -7
- data/app/views/decidim/budgets/projects/_linked_projects.html.erb +2 -2
- data/app/views/decidim/budgets/projects/_order_progress.html.erb +14 -18
- data/app/views/decidim/budgets/projects/_order_selected_projects.html.erb +3 -3
- data/app/views/decidim/budgets/projects/_project.html.erb +1 -57
- data/app/views/decidim/budgets/projects/_project_budget_button.html.erb +36 -7
- data/app/views/decidim/budgets/projects/_projects.html.erb +8 -1
- data/app/views/decidim/budgets/projects/index.html.erb +15 -7
- data/app/views/decidim/budgets/projects/index.js.erb +8 -0
- data/app/views/decidim/budgets/projects/show.html.erb +18 -11
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +3 -17
- data/config/locales/bg-BG.yml +7 -0
- data/config/locales/bg.yml +6 -0
- data/config/locales/ca.yml +126 -12
- data/config/locales/cs.yml +145 -31
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +115 -12
- data/config/locales/el.yml +169 -0
- data/config/locales/en.yml +126 -12
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +126 -12
- data/config/locales/es-PY.yml +126 -12
- data/config/locales/es.yml +126 -12
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +4 -14
- data/config/locales/fi-plain.yml +127 -13
- data/config/locales/fi.yml +137 -23
- data/config/locales/fr-CA.yml +266 -0
- data/config/locales/fr.yml +125 -12
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +3 -13
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +19 -13
- data/config/locales/id-ID.yml +3 -12
- data/config/locales/is-IS.yml +1 -12
- data/config/locales/is.yml +114 -0
- data/config/locales/it.yml +97 -13
- data/config/locales/ja-JP.yml +172 -0
- data/config/locales/ja.yml +262 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +164 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +113 -13
- data/config/locales/no.yml +39 -13
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +175 -62
- data/config/locales/pt-BR.yml +4 -14
- data/config/locales/pt.yml +63 -47
- data/config/locales/ro-RO.yml +172 -0
- data/config/locales/ru.yml +3 -15
- data/config/locales/sk-SK.yml +180 -0
- data/config/locales/sk.yml +166 -0
- data/config/locales/sl.yml +1 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +27 -0
- data/config/locales/sv.yml +126 -12
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +3 -13
- data/config/locales/uk.yml +3 -15
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +260 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20200617105120_create_decidim_budgets.rb +15 -0
- data/db/migrate/20200629072626_rename_budget_to_budget_ammount.rb +7 -0
- data/db/migrate/20200629134013_add_budget_reference_to_project.rb +7 -0
- data/db/migrate/20200706142609_add_budget_reference_to_order.rb +7 -0
- data/db/migrate/20200714103519_move_budgets_to_own_model.rb +109 -0
- data/db/migrate/20200717140012_add_scope_to_budgets.rb +7 -0
- data/db/migrate/20200728075039_add_selected_at_to_project.rb +7 -0
- data/db/migrate/20200804175222_votes_enabled_to_votes_choices.rb +35 -0
- data/db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb +9 -0
- data/lib/decidim/budgets.rb +1 -0
- data/lib/decidim/budgets/admin_engine.rb +12 -5
- data/lib/decidim/budgets/component.rb +94 -38
- data/lib/decidim/budgets/engine.rb +8 -6
- data/lib/decidim/budgets/seeds/city.jpeg +0 -0
- data/lib/decidim/budgets/test/factories.rb +71 -9
- data/lib/decidim/budgets/version.rb +1 -1
- data/lib/decidim/budgets/workflows.rb +17 -0
- data/lib/decidim/budgets/workflows/all.rb +20 -0
- data/lib/decidim/budgets/workflows/base.rb +132 -0
- data/lib/decidim/budgets/workflows/one.rb +33 -0
- metadata +121 -16
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "decidim/budgets/workflows/base"
|
4
|
+
require "decidim/budgets/workflows/one"
|
5
|
+
require "decidim/budgets/workflows/all"
|
6
|
+
|
7
|
+
module Decidim
|
8
|
+
module Budgets
|
9
|
+
# Public: Stores the array of available workflows
|
10
|
+
def self.workflows
|
11
|
+
@workflows ||= {
|
12
|
+
one: Workflows::One,
|
13
|
+
all: Workflows::All
|
14
|
+
}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Budgets
|
5
|
+
module Workflows
|
6
|
+
# This Workflow allows users to vote in all budgets.
|
7
|
+
class All < Base
|
8
|
+
# No budget is highlighted for this workflow.
|
9
|
+
def highlighted?(_resource)
|
10
|
+
false
|
11
|
+
end
|
12
|
+
|
13
|
+
# Users can vote in all budgets with this workflow.
|
14
|
+
def vote_allowed?(resource, _consider_progress = true)
|
15
|
+
!voted?(resource)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Budgets
|
5
|
+
module Workflows
|
6
|
+
# This is the base Workflow class.
|
7
|
+
class Base
|
8
|
+
def initialize(budgets_component, user)
|
9
|
+
@budgets_component = budgets_component
|
10
|
+
@user = user
|
11
|
+
end
|
12
|
+
|
13
|
+
# Public: Checks if the component has only one budget resource.
|
14
|
+
#
|
15
|
+
# Returns Boolean.
|
16
|
+
def single?
|
17
|
+
budgets.one?
|
18
|
+
end
|
19
|
+
|
20
|
+
# Public: Return the lonenly budget resource of the component
|
21
|
+
#
|
22
|
+
# Returns an ActiveRecord.
|
23
|
+
def single
|
24
|
+
budgets.first if single?
|
25
|
+
end
|
26
|
+
|
27
|
+
# Public: Decides if the given resource should be highlighted.
|
28
|
+
# This method must be overwritten for each Workflow class.
|
29
|
+
# - resource: the budget resource to consider
|
30
|
+
#
|
31
|
+
# Returns Boolean.
|
32
|
+
def highlighted?(_resource)
|
33
|
+
raise StandardError, "Not implemented"
|
34
|
+
end
|
35
|
+
|
36
|
+
# Public: Decides if the given user should be allowed to vote in the given resource.
|
37
|
+
# This method must be overwritten for each Workflow class.
|
38
|
+
# - resource: the budget resource to consider
|
39
|
+
# - consider_progress: should consider user orders in progress?
|
40
|
+
# Using `false` allow UI to offer users to discard votes in progress to start voting in another resource.
|
41
|
+
#
|
42
|
+
# Returns Boolean.
|
43
|
+
def vote_allowed?(_resource, _consider_progress = true)
|
44
|
+
raise StandardError, "Not implemented"
|
45
|
+
end
|
46
|
+
|
47
|
+
attr_accessor :budgets_component, :user
|
48
|
+
|
49
|
+
# Public: Return the list of budget resources that are highlighted for the user.
|
50
|
+
#
|
51
|
+
# Returns Array.
|
52
|
+
def highlighted
|
53
|
+
@highlighted ||= budgets.select { |resource| highlighted?(resource) }
|
54
|
+
end
|
55
|
+
|
56
|
+
# Public: Return the list of budgets where the user is allowed to vote.
|
57
|
+
#
|
58
|
+
# Returns Array.
|
59
|
+
def allowed
|
60
|
+
@allowed ||= budgets.select { |resource| vote_allowed?(resource) }
|
61
|
+
end
|
62
|
+
|
63
|
+
# Public: Return the list of budget resources where the user has voted.
|
64
|
+
#
|
65
|
+
# Returns Array.
|
66
|
+
def voted
|
67
|
+
@voted ||= orders.values.map { |order_info| order_info[:order].budget if order_info[:status] == :voted } .compact
|
68
|
+
end
|
69
|
+
|
70
|
+
# Public: Return the list of budget resources where the user has orders in progress.
|
71
|
+
#
|
72
|
+
# Returns Array.
|
73
|
+
def progress
|
74
|
+
@progress ||= orders.values.map { |order_info| order_info[:order].budget if order_info[:status] == :progress } .compact
|
75
|
+
end
|
76
|
+
|
77
|
+
# Public: Return the list of budget resources where the user could discard their order to vote in other components.
|
78
|
+
#
|
79
|
+
# Returns Array.
|
80
|
+
def discardable
|
81
|
+
progress
|
82
|
+
end
|
83
|
+
|
84
|
+
# Public: Return the status for the given budget resource and the user
|
85
|
+
# - resource: the budget resource to consider
|
86
|
+
#
|
87
|
+
# Returns Boolean.
|
88
|
+
def status(resource)
|
89
|
+
orders.dig(resource.id, :status) || (vote_allowed?(resource) ? :allowed : :not_allowed)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Public: Return if the user can vote in the given budget resource
|
93
|
+
# - resource: the budgets resource to consider
|
94
|
+
#
|
95
|
+
# Returns Boolean.
|
96
|
+
def voted?(resource)
|
97
|
+
orders.dig(resource.id, :status) == :voted
|
98
|
+
end
|
99
|
+
|
100
|
+
# Public: Return if the user has a pending order in the given budget resource
|
101
|
+
# - resource: the budgets resource to consider
|
102
|
+
#
|
103
|
+
# Returns Boolean.
|
104
|
+
def progress?(resource)
|
105
|
+
orders.dig(resource.id, :status) == :progress
|
106
|
+
end
|
107
|
+
|
108
|
+
# Public: Return if the user has reached the voting limit on budgets
|
109
|
+
#
|
110
|
+
# Returns Boolean.
|
111
|
+
def limit_reached?
|
112
|
+
(allowed - progress).none?
|
113
|
+
end
|
114
|
+
|
115
|
+
# Public: Return all the budgets resources that should be taken into account for the budgets component
|
116
|
+
#
|
117
|
+
# Returns an ActiveRecord::Relation.
|
118
|
+
def budgets
|
119
|
+
@budgets ||= Decidim::Budgets::Budget.where(component: budgets_component).order(weight: :asc)
|
120
|
+
end
|
121
|
+
|
122
|
+
protected
|
123
|
+
|
124
|
+
def orders
|
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: order, status: order.checked_out? ? :voted : :progress }] if order.projects.any?
|
127
|
+
end.compact.to_h
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Budgets
|
5
|
+
module Workflows
|
6
|
+
# This Workflow allows users to vote in any budget, but only in one.
|
7
|
+
class One < Base
|
8
|
+
# No budget resource is highlighted for this workflow.
|
9
|
+
def highlighted?(_resource)
|
10
|
+
false
|
11
|
+
end
|
12
|
+
|
13
|
+
# Users can vote in any budget with this workflow, but only in one.
|
14
|
+
def vote_allowed?(resource, consider_progress = true)
|
15
|
+
return false if voted.any?
|
16
|
+
|
17
|
+
if consider_progress
|
18
|
+
progress?(resource) || progress.none?
|
19
|
+
else
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Public: Returns a list of budgets where the user can discard their order to vote in another.
|
25
|
+
#
|
26
|
+
# Returns Array.
|
27
|
+
def discardable
|
28
|
+
progress + voted
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
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.23.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-comments
|
@@ -18,42 +18,48 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.23.1
|
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.23.1
|
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.23.1
|
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.23.1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: kaminari
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '1.
|
49
|
+
version: '1.2'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.2.1
|
50
53
|
type: :runtime
|
51
54
|
prerelease: false
|
52
55
|
version_requirements: !ruby/object:Gem::Requirement
|
53
56
|
requirements:
|
54
57
|
- - "~>"
|
55
58
|
- !ruby/object:Gem::Version
|
56
|
-
version: '1.
|
59
|
+
version: '1.2'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.2.1
|
57
63
|
- !ruby/object:Gem::Dependency
|
58
64
|
name: searchlight
|
59
65
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,42 +80,42 @@ dependencies:
|
|
74
80
|
requirements:
|
75
81
|
- - '='
|
76
82
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
83
|
+
version: 0.23.1
|
78
84
|
type: :development
|
79
85
|
prerelease: false
|
80
86
|
version_requirements: !ruby/object:Gem::Requirement
|
81
87
|
requirements:
|
82
88
|
- - '='
|
83
89
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
90
|
+
version: 0.23.1
|
85
91
|
- !ruby/object:Gem::Dependency
|
86
92
|
name: decidim-dev
|
87
93
|
requirement: !ruby/object:Gem::Requirement
|
88
94
|
requirements:
|
89
95
|
- - '='
|
90
96
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
97
|
+
version: 0.23.1
|
92
98
|
type: :development
|
93
99
|
prerelease: false
|
94
100
|
version_requirements: !ruby/object:Gem::Requirement
|
95
101
|
requirements:
|
96
102
|
- - '='
|
97
103
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.
|
104
|
+
version: 0.23.1
|
99
105
|
- !ruby/object:Gem::Dependency
|
100
106
|
name: decidim-proposals
|
101
107
|
requirement: !ruby/object:Gem::Requirement
|
102
108
|
requirements:
|
103
109
|
- - '='
|
104
110
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
111
|
+
version: 0.23.1
|
106
112
|
type: :development
|
107
113
|
prerelease: false
|
108
114
|
version_requirements: !ruby/object:Gem::Requirement
|
109
115
|
requirements:
|
110
116
|
- - '='
|
111
117
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
118
|
+
version: 0.23.1
|
113
119
|
description: A budgets component for decidim's participatory spaces.
|
114
120
|
email:
|
115
121
|
- josepjaume@gmail.com
|
@@ -129,50 +135,101 @@ files:
|
|
129
135
|
- app/assets/stylesheets/decidim/budgets/budget/_budget-list.scss
|
130
136
|
- app/assets/stylesheets/decidim/budgets/budget/_budget-meter.scss
|
131
137
|
- app/assets/stylesheets/decidim/budgets/budget/_progress.scss
|
138
|
+
- app/cells/decidim/budgets/base_cell.rb
|
139
|
+
- app/cells/decidim/budgets/budget_cell.rb
|
140
|
+
- app/cells/decidim/budgets/budget_information_modal/show.erb
|
141
|
+
- app/cells/decidim/budgets/budget_information_modal_cell.rb
|
142
|
+
- app/cells/decidim/budgets/budget_list_item/show.erb
|
143
|
+
- app/cells/decidim/budgets/budget_list_item_cell.rb
|
144
|
+
- app/cells/decidim/budgets/budget_m/data.erb
|
145
|
+
- app/cells/decidim/budgets/budget_m/footer.erb
|
146
|
+
- app/cells/decidim/budgets/budget_m_cell.rb
|
147
|
+
- app/cells/decidim/budgets/budgets_header/show.erb
|
148
|
+
- app/cells/decidim/budgets/budgets_header_cell.rb
|
149
|
+
- app/cells/decidim/budgets/budgets_list/card_list.erb
|
150
|
+
- app/cells/decidim/budgets/budgets_list/highlighted.erb
|
151
|
+
- app/cells/decidim/budgets/budgets_list/show.erb
|
152
|
+
- app/cells/decidim/budgets/budgets_list/voted.erb
|
153
|
+
- app/cells/decidim/budgets/budgets_list_cell.rb
|
154
|
+
- app/cells/decidim/budgets/limit_announcement_cell.rb
|
132
155
|
- app/cells/decidim/budgets/project_cell.rb
|
156
|
+
- app/cells/decidim/budgets/project_list_item/project_data.erb
|
157
|
+
- app/cells/decidim/budgets/project_list_item/project_data_vote_button.erb
|
158
|
+
- app/cells/decidim/budgets/project_list_item/project_image.erb
|
159
|
+
- app/cells/decidim/budgets/project_list_item/project_text.erb
|
160
|
+
- app/cells/decidim/budgets/project_list_item/show.erb
|
161
|
+
- app/cells/decidim/budgets/project_list_item_cell.rb
|
133
162
|
- app/cells/decidim/budgets/project_m/data.erb
|
134
163
|
- app/cells/decidim/budgets/project_m/footer.erb
|
135
164
|
- app/cells/decidim/budgets/project_m_cell.rb
|
165
|
+
- app/cells/decidim/budgets/project_selected_status_cell.rb
|
166
|
+
- app/cells/decidim/budgets/project_tags/show.erb
|
167
|
+
- app/cells/decidim/budgets/project_tags_cell.rb
|
168
|
+
- app/cells/decidim/budgets/project_voted_hint_cell.rb
|
169
|
+
- app/cells/decidim/budgets/project_votes_count_cell.rb
|
136
170
|
- app/commands/decidim/budgets/add_line_item.rb
|
171
|
+
- app/commands/decidim/budgets/admin/create_budget.rb
|
137
172
|
- app/commands/decidim/budgets/admin/create_project.rb
|
173
|
+
- app/commands/decidim/budgets/admin/destroy_budget.rb
|
138
174
|
- app/commands/decidim/budgets/admin/destroy_project.rb
|
139
175
|
- app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb
|
176
|
+
- app/commands/decidim/budgets/admin/update_budget.rb
|
140
177
|
- app/commands/decidim/budgets/admin/update_project.rb
|
141
178
|
- app/commands/decidim/budgets/cancel_order.rb
|
142
179
|
- app/commands/decidim/budgets/checkout.rb
|
143
180
|
- app/commands/decidim/budgets/remove_line_item.rb
|
144
181
|
- app/controllers/concerns/decidim/budgets/needs_current_order.rb
|
182
|
+
- app/controllers/concerns/decidim/budgets/orderable.rb
|
145
183
|
- app/controllers/decidim/budgets/admin/application_controller.rb
|
146
184
|
- app/controllers/decidim/budgets/admin/attachment_collections_controller.rb
|
147
185
|
- app/controllers/decidim/budgets/admin/attachments_controller.rb
|
186
|
+
- app/controllers/decidim/budgets/admin/budgets_controller.rb
|
148
187
|
- app/controllers/decidim/budgets/admin/projects_controller.rb
|
149
188
|
- app/controllers/decidim/budgets/admin/proposals_imports_controller.rb
|
150
189
|
- app/controllers/decidim/budgets/application_controller.rb
|
190
|
+
- app/controllers/decidim/budgets/budgets_controller.rb
|
151
191
|
- app/controllers/decidim/budgets/line_items_controller.rb
|
152
192
|
- app/controllers/decidim/budgets/orders_controller.rb
|
153
193
|
- app/controllers/decidim/budgets/projects_controller.rb
|
194
|
+
- app/forms/decidim/budgets/admin/budget_form.rb
|
195
|
+
- app/forms/decidim/budgets/admin/component_form.rb
|
154
196
|
- app/forms/decidim/budgets/admin/project_form.rb
|
155
197
|
- app/forms/decidim/budgets/admin/project_import_proposals_form.rb
|
198
|
+
- app/helpers/decidim/budgets/admin/application_helper.rb
|
156
199
|
- app/helpers/decidim/budgets/application_helper.rb
|
157
200
|
- app/helpers/decidim/budgets/projects_helper.rb
|
201
|
+
- app/jobs/decidim/budgets/send_order_summary_job.rb
|
202
|
+
- app/mailers/decidim/budgets/order_summary_mailer.rb
|
158
203
|
- app/models/decidim/budgets/application_record.rb
|
204
|
+
- app/models/decidim/budgets/budget.rb
|
159
205
|
- app/models/decidim/budgets/line_item.rb
|
160
206
|
- app/models/decidim/budgets/order.rb
|
161
207
|
- app/models/decidim/budgets/project.rb
|
162
208
|
- app/permissions/decidim/budgets/admin/permissions.rb
|
163
209
|
- app/permissions/decidim/budgets/permissions.rb
|
210
|
+
- app/presenters/decidim/budgets/admin_log/budget_presenter.rb
|
164
211
|
- app/presenters/decidim/budgets/admin_log/project_presenter.rb
|
165
212
|
- app/queries/decidim/budgets/filtered_projects.rb
|
166
213
|
- app/queries/decidim/budgets/metrics/budget_followers_metric_measure.rb
|
167
214
|
- app/queries/decidim/budgets/metrics/budget_participants_metric_measure.rb
|
168
215
|
- app/serializers/decidim/budgets/data_portability_budgets_order_serializer.rb
|
169
216
|
- app/services/decidim/budgets/project_search.rb
|
217
|
+
- app/types/decidim/budgets/budget_type.rb
|
218
|
+
- app/types/decidim/budgets/budgets_type.rb
|
219
|
+
- app/types/decidim/budgets/project_type.rb
|
220
|
+
- app/views/decidim/budgets/admin/budgets/_form.html.erb
|
221
|
+
- app/views/decidim/budgets/admin/budgets/edit.html.erb
|
222
|
+
- app/views/decidim/budgets/admin/budgets/index.html.erb
|
223
|
+
- app/views/decidim/budgets/admin/budgets/new.html.erb
|
170
224
|
- app/views/decidim/budgets/admin/projects/_form.html.erb
|
171
225
|
- app/views/decidim/budgets/admin/projects/edit.html.erb
|
172
226
|
- app/views/decidim/budgets/admin/projects/index.html.erb
|
173
227
|
- app/views/decidim/budgets/admin/projects/new.html.erb
|
228
|
+
- app/views/decidim/budgets/admin/projects/proposals_picker.html.erb
|
174
229
|
- app/views/decidim/budgets/admin/proposals_imports/new.html.erb
|
230
|
+
- app/views/decidim/budgets/budgets/index.html.erb
|
175
231
|
- app/views/decidim/budgets/line_items/update_budget.js.erb
|
232
|
+
- app/views/decidim/budgets/order_summary_mailer/order_summary.html.erb
|
176
233
|
- app/views/decidim/budgets/projects/_budget_confirm.html.erb
|
177
234
|
- app/views/decidim/budgets/projects/_budget_excess.html.erb
|
178
235
|
- app/views/decidim/budgets/projects/_budget_summary.html.erb
|
@@ -189,37 +246,72 @@ files:
|
|
189
246
|
- app/views/decidim/budgets/projects/index.html.erb
|
190
247
|
- app/views/decidim/budgets/projects/index.js.erb
|
191
248
|
- app/views/decidim/budgets/projects/show.html.erb
|
249
|
+
- config/locales/am-ET.yml
|
192
250
|
- config/locales/ar-SA.yml
|
193
251
|
- config/locales/ar.yml
|
252
|
+
- config/locales/bg-BG.yml
|
253
|
+
- config/locales/bg.yml
|
194
254
|
- config/locales/ca.yml
|
195
255
|
- config/locales/cs-CZ.yml
|
196
256
|
- config/locales/cs.yml
|
257
|
+
- config/locales/da-DK.yml
|
258
|
+
- config/locales/da.yml
|
197
259
|
- config/locales/de.yml
|
198
260
|
- config/locales/el-GR.yml
|
261
|
+
- config/locales/el.yml
|
199
262
|
- config/locales/en.yml
|
200
263
|
- config/locales/eo-UY.yml
|
264
|
+
- config/locales/eo.yml
|
201
265
|
- config/locales/es-MX.yml
|
202
266
|
- config/locales/es-PY.yml
|
203
267
|
- config/locales/es.yml
|
268
|
+
- config/locales/et-EE.yml
|
269
|
+
- config/locales/et.yml
|
204
270
|
- config/locales/eu.yml
|
205
271
|
- config/locales/fi-pl.yml
|
206
272
|
- config/locales/fi-plain.yml
|
207
273
|
- config/locales/fi.yml
|
274
|
+
- config/locales/fr-CA.yml
|
208
275
|
- config/locales/fr.yml
|
276
|
+
- config/locales/ga-IE.yml
|
209
277
|
- config/locales/gl.yml
|
278
|
+
- config/locales/hr-HR.yml
|
279
|
+
- config/locales/hr.yml
|
210
280
|
- config/locales/hu.yml
|
211
281
|
- config/locales/id-ID.yml
|
212
282
|
- config/locales/is-IS.yml
|
283
|
+
- config/locales/is.yml
|
213
284
|
- config/locales/it.yml
|
285
|
+
- config/locales/ja-JP.yml
|
286
|
+
- config/locales/ja.yml
|
287
|
+
- config/locales/ko-KR.yml
|
288
|
+
- config/locales/ko.yml
|
289
|
+
- config/locales/lt-LT.yml
|
290
|
+
- config/locales/lt.yml
|
291
|
+
- config/locales/lv.yml
|
292
|
+
- config/locales/mt-MT.yml
|
293
|
+
- config/locales/mt.yml
|
214
294
|
- config/locales/nl.yml
|
215
295
|
- config/locales/no.yml
|
296
|
+
- config/locales/om-ET.yml
|
216
297
|
- config/locales/pl.yml
|
217
298
|
- config/locales/pt-BR.yml
|
218
299
|
- config/locales/pt.yml
|
300
|
+
- config/locales/ro-RO.yml
|
219
301
|
- config/locales/ru.yml
|
302
|
+
- config/locales/sk-SK.yml
|
303
|
+
- config/locales/sk.yml
|
304
|
+
- config/locales/sl.yml
|
305
|
+
- config/locales/so-SO.yml
|
306
|
+
- config/locales/sr-CS.yml
|
220
307
|
- config/locales/sv.yml
|
308
|
+
- config/locales/ti-ER.yml
|
221
309
|
- config/locales/tr-TR.yml
|
222
310
|
- config/locales/uk.yml
|
311
|
+
- config/locales/vi-VN.yml
|
312
|
+
- config/locales/vi.yml
|
313
|
+
- config/locales/zh-CN.yml
|
314
|
+
- config/locales/zh-TW.yml
|
223
315
|
- db/migrate/20170127114122_create_projects.rb
|
224
316
|
- db/migrate/20170130095615_create_orders.rb
|
225
317
|
- db/migrate/20170130101825_create_line_items.rb
|
@@ -229,6 +321,15 @@ files:
|
|
229
321
|
- db/migrate/20170612101846_migrate_projects_category.rb
|
230
322
|
- db/migrate/20180305133340_rename_features_to_components_at_budgets.rb
|
231
323
|
- db/migrate/20181205141115_use_big_ints_for_budgets.rb
|
324
|
+
- db/migrate/20200617105120_create_decidim_budgets.rb
|
325
|
+
- db/migrate/20200629072626_rename_budget_to_budget_ammount.rb
|
326
|
+
- db/migrate/20200629134013_add_budget_reference_to_project.rb
|
327
|
+
- db/migrate/20200706142609_add_budget_reference_to_order.rb
|
328
|
+
- db/migrate/20200714103519_move_budgets_to_own_model.rb
|
329
|
+
- db/migrate/20200717140012_add_scope_to_budgets.rb
|
330
|
+
- db/migrate/20200728075039_add_selected_at_to_project.rb
|
331
|
+
- db/migrate/20200804175222_votes_enabled_to_votes_choices.rb
|
332
|
+
- db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb
|
232
333
|
- lib/decidim/budgets.rb
|
233
334
|
- lib/decidim/budgets/admin.rb
|
234
335
|
- lib/decidim/budgets/admin_engine.rb
|
@@ -238,6 +339,10 @@ files:
|
|
238
339
|
- lib/decidim/budgets/seeds/city.jpeg
|
239
340
|
- lib/decidim/budgets/test/factories.rb
|
240
341
|
- lib/decidim/budgets/version.rb
|
342
|
+
- lib/decidim/budgets/workflows.rb
|
343
|
+
- lib/decidim/budgets/workflows/all.rb
|
344
|
+
- lib/decidim/budgets/workflows/base.rb
|
345
|
+
- lib/decidim/budgets/workflows/one.rb
|
241
346
|
homepage: https://github.com/decidim/decidim
|
242
347
|
licenses:
|
243
348
|
- AGPL-3.0
|
@@ -250,14 +355,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
250
355
|
requirements:
|
251
356
|
- - ">="
|
252
357
|
- !ruby/object:Gem::Version
|
253
|
-
version: '2.
|
358
|
+
version: '2.6'
|
254
359
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
255
360
|
requirements:
|
256
361
|
- - ">="
|
257
362
|
- !ruby/object:Gem::Version
|
258
363
|
version: '0'
|
259
364
|
requirements: []
|
260
|
-
rubygems_version: 3.
|
365
|
+
rubygems_version: 3.0.3
|
261
366
|
signing_key:
|
262
367
|
specification_version: 4
|
263
368
|
summary: Decidim budgets module
|