decidim-budgets 0.13.1 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/budgets/project_cell.rb +1 -1
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +76 -0
- data/app/controllers/decidim/budgets/admin/attachment_collections_controller.rb +0 -4
- data/app/controllers/decidim/budgets/admin/attachments_controller.rb +0 -4
- data/app/controllers/decidim/budgets/admin/proposals_imports_controller.rb +32 -0
- data/app/controllers/decidim/budgets/line_items_controller.rb +1 -1
- data/app/controllers/decidim/budgets/orders_controller.rb +1 -1
- data/app/forms/decidim/budgets/admin/project_form.rb +4 -1
- data/app/forms/decidim/budgets/admin/project_import_proposals_form.rb +35 -0
- data/app/models/decidim/budgets/project.rb +5 -0
- data/app/permissions/decidim/budgets/admin/permissions.rb +3 -1
- data/app/permissions/decidim/budgets/permissions.rb +18 -0
- data/app/views/decidim/budgets/admin/projects/index.html.erb +4 -1
- data/app/views/decidim/budgets/admin/proposals_imports/new.html.erb +27 -0
- data/app/views/decidim/budgets/line_items/update_budget.js.erb +6 -6
- data/app/views/decidim/budgets/projects/_project.html.erb +1 -1
- data/app/views/decidim/budgets/projects/show.html.erb +10 -1
- data/config/locales/ca.yml +10 -0
- data/config/locales/en.yml +10 -0
- data/config/locales/es-PY.yml +10 -0
- data/config/locales/es.yml +10 -0
- data/config/locales/eu.yml +10 -0
- data/config/locales/fi.yml +43 -33
- data/config/locales/fr.yml +10 -0
- data/config/locales/gl.yml +10 -0
- data/config/locales/hu.yml +153 -0
- data/config/locales/it.yml +10 -0
- data/config/locales/nl.yml +10 -0
- data/config/locales/pl.yml +10 -0
- data/config/locales/pt-BR.yml +15 -5
- data/config/locales/pt.yml +10 -0
- data/config/locales/ru.yml +13 -3
- data/config/locales/sv.yml +35 -25
- data/config/locales/uk.yml +54 -44
- data/lib/decidim/budgets/admin_engine.rb +4 -0
- data/lib/decidim/budgets/component.rb +2 -0
- data/lib/decidim/budgets/test/factories.rb +3 -3
- data/lib/decidim/budgets/version.rb +1 -1
- metadata +18 -13
@@ -9,11 +9,15 @@ module Decidim
|
|
9
9
|
isolate_namespace Decidim::Budgets::Admin
|
10
10
|
|
11
11
|
paths["db/migrate"] = nil
|
12
|
+
paths["lib/tasks"] = nil
|
12
13
|
|
13
14
|
routes do
|
14
15
|
resources :projects do
|
15
16
|
resources :attachment_collections
|
16
17
|
resources :attachments
|
18
|
+
collection do
|
19
|
+
resource :proposals_import, only: [:new, :create]
|
20
|
+
end
|
17
21
|
end
|
18
22
|
|
19
23
|
root to: "projects#index"
|
@@ -21,6 +21,7 @@ Decidim.register_component(:budgets) do |component|
|
|
21
21
|
resource.model_class_name = "Decidim::Budgets::Project"
|
22
22
|
resource.template = "decidim/budgets/projects/linked_projects"
|
23
23
|
resource.card = "decidim/budgets/project"
|
24
|
+
resource.actions = %(vote)
|
24
25
|
end
|
25
26
|
|
26
27
|
component.register_stat :projects_count, primary: true, priority: Decidim::StatsRegistry::LOW_PRIORITY do |components, start_at, end_at|
|
@@ -44,6 +45,7 @@ Decidim.register_component(:budgets) do |component|
|
|
44
45
|
settings.attribute :total_budget, type: :integer, default: 100_000_000
|
45
46
|
settings.attribute :vote_threshold_percent, type: :integer, default: 70
|
46
47
|
settings.attribute :comments_enabled, type: :boolean, default: true
|
48
|
+
settings.attribute :resources_permissions_enabled, type: :boolean, default: true
|
47
49
|
settings.attribute :announcement, type: :text, translated: true, editor: true
|
48
50
|
end
|
49
51
|
|
@@ -9,13 +9,13 @@ require "decidim/participatory_processes/test/factories"
|
|
9
9
|
FactoryBot.define do
|
10
10
|
factory :budget_component, parent: :component do
|
11
11
|
name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :budgets).i18n_name }
|
12
|
-
manifest_name :budgets
|
12
|
+
manifest_name { :budgets }
|
13
13
|
participatory_space { create(:participatory_process, :with_steps, organization: organization) }
|
14
14
|
|
15
15
|
trait :with_total_budget_and_vote_threshold_percent do
|
16
16
|
transient do
|
17
|
-
total_budget 100_000_000
|
18
|
-
vote_threshold_percent 70
|
17
|
+
total_budget { 100_000_000 }
|
18
|
+
vote_threshold_percent { 70 }
|
19
19
|
end
|
20
20
|
|
21
21
|
settings do
|
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.14.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: 2018-
|
13
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-comments
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.14.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.14.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.14.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.14.1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: kaminari
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,42 +74,42 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.14.1
|
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.14.1
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: decidim-dev
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
91
|
+
version: 0.14.1
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.
|
98
|
+
version: 0.14.1
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: decidim-proposals
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
105
|
+
version: 0.14.1
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
112
|
+
version: 0.14.1
|
113
113
|
description: A budgets component for decidim's participatory spaces.
|
114
114
|
email:
|
115
115
|
- josepjaume@gmail.com
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- app/commands/decidim/budgets/add_line_item.rb
|
137
137
|
- app/commands/decidim/budgets/admin/create_project.rb
|
138
138
|
- app/commands/decidim/budgets/admin/destroy_project.rb
|
139
|
+
- app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb
|
139
140
|
- app/commands/decidim/budgets/admin/update_project.rb
|
140
141
|
- app/commands/decidim/budgets/cancel_order.rb
|
141
142
|
- app/commands/decidim/budgets/checkout.rb
|
@@ -145,11 +146,13 @@ files:
|
|
145
146
|
- app/controllers/decidim/budgets/admin/attachment_collections_controller.rb
|
146
147
|
- app/controllers/decidim/budgets/admin/attachments_controller.rb
|
147
148
|
- app/controllers/decidim/budgets/admin/projects_controller.rb
|
149
|
+
- app/controllers/decidim/budgets/admin/proposals_imports_controller.rb
|
148
150
|
- app/controllers/decidim/budgets/application_controller.rb
|
149
151
|
- app/controllers/decidim/budgets/line_items_controller.rb
|
150
152
|
- app/controllers/decidim/budgets/orders_controller.rb
|
151
153
|
- app/controllers/decidim/budgets/projects_controller.rb
|
152
154
|
- app/forms/decidim/budgets/admin/project_form.rb
|
155
|
+
- app/forms/decidim/budgets/admin/project_import_proposals_form.rb
|
153
156
|
- app/helpers/decidim/budgets/application_helper.rb
|
154
157
|
- app/helpers/decidim/budgets/projects_helper.rb
|
155
158
|
- app/models/decidim/budgets/application_record.rb
|
@@ -166,6 +169,7 @@ files:
|
|
166
169
|
- app/views/decidim/budgets/admin/projects/edit.html.erb
|
167
170
|
- app/views/decidim/budgets/admin/projects/index.html.erb
|
168
171
|
- app/views/decidim/budgets/admin/projects/new.html.erb
|
172
|
+
- app/views/decidim/budgets/admin/proposals_imports/new.html.erb
|
169
173
|
- app/views/decidim/budgets/line_items/update_budget.js.erb
|
170
174
|
- app/views/decidim/budgets/projects/_budget_confirm.html.erb
|
171
175
|
- app/views/decidim/budgets/projects/_budget_excess.html.erb
|
@@ -191,6 +195,7 @@ files:
|
|
191
195
|
- config/locales/fi.yml
|
192
196
|
- config/locales/fr.yml
|
193
197
|
- config/locales/gl.yml
|
198
|
+
- config/locales/hu.yml
|
194
199
|
- config/locales/it.yml
|
195
200
|
- config/locales/nl.yml
|
196
201
|
- config/locales/pl.yml
|
@@ -236,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
241
|
version: '0'
|
237
242
|
requirements: []
|
238
243
|
rubyforge_project:
|
239
|
-
rubygems_version: 2.7.
|
244
|
+
rubygems_version: 2.7.7
|
240
245
|
signing_key:
|
241
246
|
specification_version: 4
|
242
247
|
summary: Decidim budgets module
|