decidim-plans 0.15.1 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/commands/decidim/plans/accept_access_to_plan.rb +2 -2
- data/app/commands/decidim/plans/admin/answer_plan.rb +2 -1
- data/app/commands/decidim/plans/admin/create_plan.rb +1 -1
- data/app/commands/decidim/plans/publish_plan.rb +3 -7
- data/app/commands/decidim/plans/reject_access_to_plan.rb +2 -2
- data/app/commands/decidim/plans/request_access_to_plan.rb +1 -2
- data/app/commands/decidim/plans/respond_to_access_request.rb +3 -3
- data/app/helpers/decidim/plans/traceability_helper.rb +2 -0
- data/app/presenters/decidim/plans/official_author_presenter.rb +4 -0
- data/app/services/decidim/plans/diff_renderer/component.rb +23 -0
- data/lib/decidim/plans/version.rb +2 -2
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f496c0cd1c6ee3f73085fc296508701d44434eb5a1c9dc3375c33ac99ea3a45
|
4
|
+
data.tar.gz: 2893280cdc00ae08eb9096e94da371496e43a2d993ea49ef6345def50a767176
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2751ff4b10252cf2b3bbf59deccb36692b7866dcd9ec90d649b3ca0cb640812601c2fa4ab938228a5425b8a4c96adfd9cd6ca71b147bcaa9834a2df4a815ccd3
|
7
|
+
data.tar.gz: f2db56458ab76aade2d06b91e67061b6bdd857e33a848ae720579fe851e18b3007e4f89847cb51aa71daf8c50947ba0d926b33aac09b4315f7d35788869a4ebf
|
@@ -90,7 +90,7 @@ module Decidim
|
|
90
90
|
event: "decidim.events.plans.plan_published",
|
91
91
|
event_class: Decidim::Plans::PublishPlanEvent,
|
92
92
|
resource: plan,
|
93
|
-
|
93
|
+
followers: plan.participatory_space.followers,
|
94
94
|
extra: {
|
95
95
|
participatory_space: true
|
96
96
|
}
|
@@ -51,7 +51,7 @@ module Decidim
|
|
51
51
|
event: "decidim.events.plans.plan_published",
|
52
52
|
event_class: Decidim::Plans::PublishPlanEvent,
|
53
53
|
resource: @plan,
|
54
|
-
|
54
|
+
followers: coauthors_followers
|
55
55
|
)
|
56
56
|
end
|
57
57
|
|
@@ -60,7 +60,7 @@ module Decidim
|
|
60
60
|
event: "decidim.events.plans.plan_published",
|
61
61
|
event_class: Decidim::Plans::PublishPlanEvent,
|
62
62
|
resource: @plan,
|
63
|
-
|
63
|
+
followers: @plan.participatory_space.followers - coauthors_followers,
|
64
64
|
extra: {
|
65
65
|
participatory_space: true
|
66
66
|
}
|
@@ -68,11 +68,7 @@ module Decidim
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def coauthors_followers
|
71
|
-
|
72
|
-
@plan.authors.each do |author|
|
73
|
-
followers_ids += author.followers.pluck(:id)
|
74
|
-
end
|
75
|
-
followers_ids
|
71
|
+
@coauthors_followers ||= @plan.authors.flat_map(&:followers)
|
76
72
|
end
|
77
73
|
end
|
78
74
|
end
|
@@ -34,12 +34,11 @@ module Decidim
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def notify_plan_authors
|
37
|
-
recipient_ids = @plan.authors.pluck(:id)
|
38
37
|
Decidim::EventsManager.publish(
|
39
38
|
event: "decidim.events.plans.plan_access_requested",
|
40
39
|
event_class: Decidim::Plans::PlanAccessRequestedEvent,
|
41
40
|
resource: @plan,
|
42
|
-
|
41
|
+
followers: @plan.authors,
|
43
42
|
extra: {
|
44
43
|
requester_id: @current_user.id
|
45
44
|
}
|
@@ -46,7 +46,7 @@ module Decidim
|
|
46
46
|
event: authors_event,
|
47
47
|
event_class: authors_event_class,
|
48
48
|
resource: @plan,
|
49
|
-
|
49
|
+
followers: recipients.uniq,
|
50
50
|
extra: {
|
51
51
|
requester_id: @requester_user.id
|
52
52
|
}
|
@@ -58,11 +58,11 @@ module Decidim
|
|
58
58
|
event: requester_event,
|
59
59
|
event_class: requester_event_class,
|
60
60
|
resource: @plan,
|
61
|
-
|
61
|
+
affected_users: [@requester_user]
|
62
62
|
)
|
63
63
|
end
|
64
64
|
|
65
|
-
def
|
65
|
+
def recipients; end
|
66
66
|
|
67
67
|
def authors_event; end
|
68
68
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Plans
|
5
|
+
module DiffRenderer
|
6
|
+
class Component < Base
|
7
|
+
protected
|
8
|
+
|
9
|
+
def i18n_scope
|
10
|
+
"activemodel.attributes.plan"
|
11
|
+
end
|
12
|
+
|
13
|
+
# Lists which attributes will be diffable and how
|
14
|
+
# they should be rendered.
|
15
|
+
def attribute_types
|
16
|
+
{
|
17
|
+
decidim_component_id: :component
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-plans
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antti Hukkanen
|
@@ -16,98 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.16.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-proposals
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.16.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.16.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-admin
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.16.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.16.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim-assemblies
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.16.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.16.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: decidim-budgets
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.16.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.16.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: decidim-dev
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.16.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.16.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: decidim-participatory_processes
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.16.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.16.0
|
111
111
|
description: Plans component allows people to author plans based on the proposals
|
112
112
|
that can be converted into budgeting projects.
|
113
113
|
email:
|
@@ -220,6 +220,7 @@ files:
|
|
220
220
|
- app/queries/decidim/plans/filtered_plans.rb
|
221
221
|
- app/services/decidim/plans/diff_renderer/base.rb
|
222
222
|
- app/services/decidim/plans/diff_renderer/categorization.rb
|
223
|
+
- app/services/decidim/plans/diff_renderer/component.rb
|
223
224
|
- app/services/decidim/plans/diff_renderer/content.rb
|
224
225
|
- app/services/decidim/plans/diff_renderer/plan.rb
|
225
226
|
- app/services/decidim/plans/loggability.rb
|