decidim-participatory_processes 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/participatory_processes/content_blocks/highlighted_processes/_all_processes.erb +6 -0
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/show.erb +32 -0
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/single_process.erb +39 -0
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_cell.rb +40 -0
- data/app/cells/decidim/participatory_processes/process_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/process_filters/filter_tabs.erb +16 -0
- data/app/cells/decidim/participatory_processes/process_filters/show.erb +13 -0
- data/app/cells/decidim/participatory_processes/process_filters_cell.rb +57 -0
- data/app/cells/decidim/participatory_processes/process_group_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/process_group_m_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/process_m/tags.erb +8 -6
- data/app/controllers/decidim/participatory_processes/admin/participatory_space_private_users_controller.rb +0 -4
- data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +23 -3
- data/app/forms/decidim/participatory_processes/admin/participatory_process_step_form.rb +2 -12
- data/app/models/decidim/participatory_process.rb +4 -4
- data/app/queries/decidim/participatory_processes/filtered_participatory_process_groups.rb +2 -2
- data/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +1 -2
- data/app/views/decidim/participatory_processes/participatory_processes/_order_by_processes.html.erb +1 -0
- data/app/views/decidim/participatory_processes/participatory_processes/index.html.erb +9 -1
- data/app/views/decidim/participatory_processes/participatory_processes/index.js.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +9 -0
- data/app/views/layouts/decidim/participatory_process.html.erb +0 -2
- data/config/locales/ca.yml +36 -14
- data/config/locales/en.yml +36 -14
- data/config/locales/es-PY.yml +36 -14
- data/config/locales/es.yml +36 -14
- data/config/locales/eu.yml +36 -14
- data/config/locales/fi.yml +80 -58
- data/config/locales/fr.yml +32 -10
- data/config/locales/gl.yml +36 -14
- data/config/locales/hu.yml +371 -0
- data/config/locales/it.yml +36 -14
- data/config/locales/nl.yml +36 -14
- data/config/locales/pl.yml +46 -16
- data/config/locales/pt-BR.yml +42 -20
- data/config/locales/pt.yml +36 -14
- data/config/locales/ru.yml +49 -19
- data/config/locales/sv.yml +105 -83
- data/config/locales/uk.yml +51 -21
- data/lib/decidim/participatory_processes/admin_engine.rb +1 -0
- data/lib/decidim/participatory_processes/engine.rb +5 -16
- data/lib/decidim/participatory_processes/participatory_space.rb +12 -4
- data/lib/decidim/participatory_processes/test/factories.rb +12 -12
- data/lib/decidim/participatory_processes/version.rb +1 -1
- metadata +18 -11
- data/app/views/decidim/participatory_processes/_order_by_processes.html.erb +0 -12
- data/app/views/decidim/participatory_processes/pages/home/_highlighted_processes.html.erb +0 -35
@@ -54,25 +54,14 @@ module Decidim
|
|
54
54
|
decidim_participatory_processes.participatory_processes_path,
|
55
55
|
position: 2,
|
56
56
|
if: Decidim::ParticipatoryProcess.where(organization: current_organization).published.any?,
|
57
|
-
active:
|
57
|
+
active: %r{^\/process(es|_groups)}
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
initializer "decidim_participatory_processes.
|
62
|
-
Decidim.
|
63
|
-
|
64
|
-
|
65
|
-
HighlightedParticipatoryProcesses.new |
|
66
|
-
FilteredParticipatoryProcesses.new("active")
|
67
|
-
|
68
|
-
next unless highlighted_processes.any?
|
69
|
-
|
70
|
-
view_context.render(
|
71
|
-
partial: "decidim/participatory_processes/pages/home/highlighted_processes",
|
72
|
-
locals: {
|
73
|
-
highlighted_processes: highlighted_processes
|
74
|
-
}
|
75
|
-
)
|
61
|
+
initializer "decidim_participatory_processes.content_blocks" do
|
62
|
+
Decidim.content_blocks.register(:homepage, :highlighted_processes) do |content_block|
|
63
|
+
content_block.cell = "decidim/participatory_processes/content_blocks/highlighted_processes"
|
64
|
+
content_block.public_name_key = "decidim.participatory_processes.content_blocks.highlighted_processes.name"
|
76
65
|
end
|
77
66
|
end
|
78
67
|
end
|
@@ -37,6 +37,14 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
37
37
|
organization = Decidim::Organization.first
|
38
38
|
seeds_root = File.join(__dir__, "..", "..", "..", "db", "seeds")
|
39
39
|
|
40
|
+
Decidim::ContentBlock.create(
|
41
|
+
organization: organization,
|
42
|
+
weight: 31,
|
43
|
+
scope: :homepage,
|
44
|
+
manifest_name: :highlighted_processes,
|
45
|
+
published_at: Time.current
|
46
|
+
)
|
47
|
+
|
40
48
|
process_groups = []
|
41
49
|
2.times do
|
42
50
|
process_groups << Decidim::ParticipatoryProcessGroup.create!(
|
@@ -72,8 +80,8 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
72
80
|
target: Decidim::Faker::Localized.sentence(3),
|
73
81
|
participatory_scope: Decidim::Faker::Localized.sentence(1),
|
74
82
|
participatory_structure: Decidim::Faker::Localized.sentence(2),
|
75
|
-
start_date:
|
76
|
-
end_date: 2.months.from_now
|
83
|
+
start_date: Date.current,
|
84
|
+
end_date: 2.months.from_now,
|
77
85
|
participatory_process_group: process_groups.sample,
|
78
86
|
scope: n.positive? ? nil : Decidim::Scope.reorder(Arel.sql("RANDOM()")).first
|
79
87
|
)
|
@@ -86,8 +94,8 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
86
94
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
87
95
|
Decidim::Faker::Localized.paragraph(3)
|
88
96
|
end,
|
89
|
-
start_date: 1.month.ago
|
90
|
-
end_date: 2.months.from_now
|
97
|
+
start_date: 1.month.ago,
|
98
|
+
end_date: 2.months.from_now
|
91
99
|
)
|
92
100
|
|
93
101
|
# Create users with specific roles
|
@@ -26,17 +26,17 @@ FactoryBot.define do
|
|
26
26
|
target { Decidim::Faker::Localized.sentence(3) }
|
27
27
|
participatory_scope { Decidim::Faker::Localized.sentence(1) }
|
28
28
|
participatory_structure { Decidim::Faker::Localized.sentence(2) }
|
29
|
-
show_statistics true
|
30
|
-
private_space false
|
31
|
-
start_date {
|
32
|
-
end_date { 2.months.from_now
|
29
|
+
show_statistics { true }
|
30
|
+
private_space { false }
|
31
|
+
start_date { Date.current }
|
32
|
+
end_date { 2.months.from_now }
|
33
33
|
|
34
34
|
trait :promoted do
|
35
|
-
promoted true
|
35
|
+
promoted { true }
|
36
36
|
end
|
37
37
|
|
38
38
|
trait :unpublished do
|
39
|
-
published_at nil
|
39
|
+
published_at { nil }
|
40
40
|
end
|
41
41
|
|
42
42
|
trait :published do
|
@@ -44,7 +44,7 @@ FactoryBot.define do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
trait :with_steps do
|
47
|
-
transient { current_step_ends 1.month.from_now }
|
47
|
+
transient { current_step_ends { 1.month.from_now } }
|
48
48
|
|
49
49
|
after(:create) do |participatory_process, evaluator|
|
50
50
|
create(:participatory_process_step,
|
@@ -83,9 +83,9 @@ FactoryBot.define do
|
|
83
83
|
factory :participatory_process_step, class: "Decidim::ParticipatoryProcessStep" do
|
84
84
|
title { Decidim::Faker::Localized.sentence(3) }
|
85
85
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
|
86
|
-
start_date { 1.month.ago
|
87
|
-
end_date { 2.months.from_now
|
88
|
-
position nil
|
86
|
+
start_date { 1.month.ago }
|
87
|
+
end_date { 2.months.from_now }
|
88
|
+
position { nil }
|
89
89
|
participatory_process
|
90
90
|
|
91
91
|
after(:create) do |step, _evaluator|
|
@@ -94,7 +94,7 @@ FactoryBot.define do
|
|
94
94
|
end
|
95
95
|
|
96
96
|
trait :active do
|
97
|
-
active true
|
97
|
+
active { true }
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
@@ -146,6 +146,6 @@ FactoryBot.define do
|
|
146
146
|
factory :participatory_process_user_role, class: "Decidim::ParticipatoryProcessUserRole" do
|
147
147
|
user
|
148
148
|
participatory_process { create :participatory_process, organization: user.organization }
|
149
|
-
role "admin"
|
149
|
+
role { "admin" }
|
150
150
|
end
|
151
151
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-participatory_processes
|
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-core
|
@@ -18,42 +18,42 @@ 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-admin
|
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: :development
|
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: decidim-dev
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.14.1
|
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.14.1
|
57
57
|
description: Participatory processes component for decidim.
|
58
58
|
email:
|
59
59
|
- josepjaume@gmail.com
|
@@ -70,7 +70,14 @@ files:
|
|
70
70
|
- app/assets/images/decidim/participatory_processes/process.svg
|
71
71
|
- app/assets/javascripts/decidim/participatory_processes/admin/participatory_processes.js.es6
|
72
72
|
- app/assets/javascripts/decidim/participatory_processes/filters.js.es6
|
73
|
+
- app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/_all_processes.erb
|
74
|
+
- app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/show.erb
|
75
|
+
- app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/single_process.erb
|
76
|
+
- app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_cell.rb
|
73
77
|
- app/cells/decidim/participatory_processes/process_cell.rb
|
78
|
+
- app/cells/decidim/participatory_processes/process_filters/filter_tabs.erb
|
79
|
+
- app/cells/decidim/participatory_processes/process_filters/show.erb
|
80
|
+
- app/cells/decidim/participatory_processes/process_filters_cell.rb
|
74
81
|
- app/cells/decidim/participatory_processes/process_group_cell.rb
|
75
82
|
- app/cells/decidim/participatory_processes/process_group_m/footer.erb
|
76
83
|
- app/cells/decidim/participatory_processes/process_group_m_cell.rb
|
@@ -155,7 +162,6 @@ files:
|
|
155
162
|
- app/types/decidim/participatory_processes/participatory_process_type.rb
|
156
163
|
- app/views/decidim/participatory_process_groups/_participatory_process_group.html.erb
|
157
164
|
- app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb
|
158
|
-
- app/views/decidim/participatory_processes/_order_by_processes.html.erb
|
159
165
|
- app/views/decidim/participatory_processes/_participatory_process.html.erb
|
160
166
|
- app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb
|
161
167
|
- app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb
|
@@ -177,11 +183,11 @@ files:
|
|
177
183
|
- app/views/decidim/participatory_processes/admin/participatory_processes/edit.html.erb
|
178
184
|
- app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb
|
179
185
|
- app/views/decidim/participatory_processes/admin/participatory_processes/new.html.erb
|
180
|
-
- app/views/decidim/participatory_processes/pages/home/_highlighted_processes.html.erb
|
181
186
|
- app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb
|
182
187
|
- app/views/decidim/participatory_processes/participatory_process_steps/_timeline.html.erb
|
183
188
|
- app/views/decidim/participatory_processes/participatory_process_steps/index.html.erb
|
184
189
|
- app/views/decidim/participatory_processes/participatory_process_widgets/show.html.erb
|
190
|
+
- app/views/decidim/participatory_processes/participatory_processes/_order_by_processes.html.erb
|
185
191
|
- app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb
|
186
192
|
- app/views/decidim/participatory_processes/participatory_processes/_statistics.html.erb
|
187
193
|
- app/views/decidim/participatory_processes/participatory_processes/index.html.erb
|
@@ -201,6 +207,7 @@ files:
|
|
201
207
|
- config/locales/fi.yml
|
202
208
|
- config/locales/fr.yml
|
203
209
|
- config/locales/gl.yml
|
210
|
+
- config/locales/hu.yml
|
204
211
|
- config/locales/it.yml
|
205
212
|
- config/locales/nl.yml
|
206
213
|
- config/locales/pl.yml
|
@@ -271,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
278
|
version: '0'
|
272
279
|
requirements: []
|
273
280
|
rubyforge_project:
|
274
|
-
rubygems_version: 2.7.
|
281
|
+
rubygems_version: 2.7.7
|
275
282
|
signing_key:
|
276
283
|
specification_version: 4
|
277
284
|
summary: Decidim participatory processes module
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<div class="row collapse order-by">
|
2
|
-
<h2 class="order-by__text section-heading">
|
3
|
-
<%= t("participatory_processes.order_by_processes.processes", scope: "layouts.decidim", count: collection.count) %>
|
4
|
-
<% if include_filter %>
|
5
|
-
<span class="order-by__tabs">
|
6
|
-
<% %w(past active upcoming all).each do |filter_name| %>
|
7
|
-
<%= link_to t(".#{filter_name}"), { filter: filter_name }, remote: true, class: "order-by__tab #{'is-active' if filter == filter_name }" %>
|
8
|
-
<% end %>
|
9
|
-
</span>
|
10
|
-
<% end %>
|
11
|
-
</h2>
|
12
|
-
</div>
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<div class="row" id="highlighted-processes">
|
2
|
-
<h3 class="section-heading"><%= t(".active_processes") %></h3>
|
3
|
-
<div class="row collapse">
|
4
|
-
<div class="row small-up-1 smallmedium-up-2 mediumlarge-up-3
|
5
|
-
large-up-4 card-grid">
|
6
|
-
<% highlighted_processes.each do |process| %>
|
7
|
-
<div class="column">
|
8
|
-
<article class="card card--process card--mini">
|
9
|
-
<%= link_to decidim_participatory_processes.participatory_process_path(process), class: "card__link" do %>
|
10
|
-
<div class="card__image-top"
|
11
|
-
style="background-image:url(<%= process.hero_image.url %>)"></div>
|
12
|
-
<% end %>
|
13
|
-
<div class="card__content">
|
14
|
-
<%= link_to decidim_participatory_processes.participatory_process_path(process), class: "card__link" do %>
|
15
|
-
<h4 class="card__title"><%= translated_attribute process.title %></h4>
|
16
|
-
<% end %>
|
17
|
-
<% if process.active_step %>
|
18
|
-
<span class="card--process__small">
|
19
|
-
<%= t(".active_step") %>
|
20
|
-
<strong><%= translated_attribute process.active_step.title %></strong>
|
21
|
-
</span>
|
22
|
-
<% end %>
|
23
|
-
</div>
|
24
|
-
</article>
|
25
|
-
</div>
|
26
|
-
<% end %>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
<div class="row" id="see-all-processes">
|
31
|
-
<div class="columns small-centered small-12
|
32
|
-
smallmedium-8 medium-6 large-4">
|
33
|
-
<%= link_to t(".see_all_processes"), decidim_participatory_processes.participatory_processes_path, class: "button expanded hollow button--sc home-section__cta" %>
|
34
|
-
</div>
|
35
|
-
</div>
|