decidim-accountability 0.32.2 → 0.32.3
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/app/commands/decidim/accountability/admin/update_result_dates.rb +5 -3
- data/app/commands/decidim/accountability/admin/update_result_status.rb +6 -4
- data/app/commands/decidim/accountability/admin/update_result_taxonomies.rb +13 -2
- data/app/controllers/decidim/accountability/admin/results_bulk_actions_controller.rb +3 -3
- data/app/controllers/decidim/accountability/results_controller.rb +2 -3
- data/config/locales/eu.yml +3 -3
- data/config/locales/sk.yml +1 -0
- data/decidim-accountability.gemspec +1 -1
- data/lib/decidim/accountability/version.rb +1 -1
- metadata +19 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8df0ae47a62a743c8bd9cf6125e411526b285e5e410a647c8881c69b2690dbcf
|
|
4
|
+
data.tar.gz: 9b538932aa1abfe0ae227716b66d9b02737cf93e37ec62a97750da1c5d1d5aef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b76142a39d5f77c0ed06d8973b4bf68c08f62d033aef0d6fce0081b8e976298b9b100869fbdc6a2286d49f3eed48c1c0ae6a7732f57e8f36d755de6b6ac1febb
|
|
7
|
+
data.tar.gz: d76914d29c82430c960abbeeb464546a0b87f7ea1c8fe65b9b404195fec041dc72290096ad765bd49c3d6061b150a6413757c8265c0d29171756b98848b8cd82
|
|
@@ -10,11 +10,13 @@ module Decidim
|
|
|
10
10
|
# start_date - the start date to update
|
|
11
11
|
# end_date - the end date to update
|
|
12
12
|
# result_ids - the results ids to update
|
|
13
|
+
# current_component - the component where the results belong to
|
|
13
14
|
# current_user - the user performing the action
|
|
14
|
-
def initialize(start_date, end_date, result_ids, current_user)
|
|
15
|
+
def initialize(start_date, end_date, result_ids, current_component, current_user)
|
|
15
16
|
@start_date = start_date
|
|
16
17
|
@end_date = end_date
|
|
17
18
|
@result_ids = result_ids
|
|
19
|
+
@current_component = current_component
|
|
18
20
|
@current_user = current_user
|
|
19
21
|
end
|
|
20
22
|
|
|
@@ -34,10 +36,10 @@ module Decidim
|
|
|
34
36
|
|
|
35
37
|
private
|
|
36
38
|
|
|
37
|
-
attr_reader :start_date, :end_date, :result_ids, :current_user
|
|
39
|
+
attr_reader :start_date, :end_date, :result_ids, :current_component, :current_user
|
|
38
40
|
|
|
39
41
|
def update_results_dates
|
|
40
|
-
Decidim::Accountability::Result.where(id: result_ids).find_each do |result|
|
|
42
|
+
Decidim::Accountability::Result.where(component: current_component, id: result_ids).find_each do |result|
|
|
41
43
|
next if result.start_date == start_date && result.end_date == end_date
|
|
42
44
|
|
|
43
45
|
result.update!(start_date:, end_date:)
|
|
@@ -9,10 +9,12 @@ module Decidim
|
|
|
9
9
|
#
|
|
10
10
|
# status_id - the status id to update
|
|
11
11
|
# result_ids - the results ids to update
|
|
12
|
+
# current_component - the component where the results belong to
|
|
12
13
|
# current_user - the user performing the action
|
|
13
|
-
def initialize(status_id, result_ids, current_user)
|
|
14
|
+
def initialize(status_id, result_ids, current_component, current_user)
|
|
14
15
|
@status_id = status_id
|
|
15
16
|
@result_ids = result_ids
|
|
17
|
+
@current_component = current_component
|
|
16
18
|
@current_user = current_user
|
|
17
19
|
end
|
|
18
20
|
|
|
@@ -32,13 +34,13 @@ module Decidim
|
|
|
32
34
|
|
|
33
35
|
private
|
|
34
36
|
|
|
35
|
-
attr_reader :status_id, :result_ids, :current_user
|
|
37
|
+
attr_reader :status_id, :result_ids, :current_component, :current_user
|
|
36
38
|
|
|
37
39
|
def update_results_status
|
|
38
|
-
Decidim::Accountability::Result.where(id: result_ids).find_each do |result|
|
|
40
|
+
Decidim::Accountability::Result.where(component: current_component, id: result_ids).find_each do |result|
|
|
39
41
|
next if result.decidim_accountability_status_id == status_id
|
|
40
42
|
|
|
41
|
-
status = Decidim::Accountability::Status.
|
|
43
|
+
status = Decidim::Accountability::Status.where(component: current_component, id: status_id).first
|
|
42
44
|
|
|
43
45
|
next if status.blank?
|
|
44
46
|
|
|
@@ -9,8 +9,19 @@ module Decidim
|
|
|
9
9
|
#
|
|
10
10
|
# taxonomy_ids - the taxonomy ids to update
|
|
11
11
|
# result_ids - the results ids to update.
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
# current_component - the component where the results belong to.
|
|
13
|
+
def initialize(taxonomy_ids, result_ids, current_component)
|
|
14
|
+
@result_ids = result_ids
|
|
15
|
+
@current_component = current_component
|
|
16
|
+
super(taxonomy_ids, results, current_component.organization)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
attr_reader :result_ids, :current_component
|
|
22
|
+
|
|
23
|
+
def results
|
|
24
|
+
Decidim::Accountability::Result.where(component: current_component, id: result_ids)
|
|
14
25
|
end
|
|
15
26
|
end
|
|
16
27
|
end
|
|
@@ -11,7 +11,7 @@ module Decidim
|
|
|
11
11
|
def update_taxonomies
|
|
12
12
|
enforce_permission_to :create, :bulk_update
|
|
13
13
|
|
|
14
|
-
Admin::UpdateResultTaxonomies.call(result_params[:taxonomies], result_ids,
|
|
14
|
+
Admin::UpdateResultTaxonomies.call(result_params[:taxonomies], result_ids, current_component) do
|
|
15
15
|
on(:invalid_taxonomies) do
|
|
16
16
|
flash[:alert] = I18n.t(
|
|
17
17
|
"results.update_taxonomies.select_a_taxonomy",
|
|
@@ -52,7 +52,7 @@ module Decidim
|
|
|
52
52
|
def update_status
|
|
53
53
|
enforce_permission_to :create, :bulk_update
|
|
54
54
|
|
|
55
|
-
UpdateResultStatus.call(result_params[:decidim_accountability_status_id], result_ids, current_user) do
|
|
55
|
+
UpdateResultStatus.call(result_params[:decidim_accountability_status_id], result_ids, current_component, current_user) do
|
|
56
56
|
on(:ok) do
|
|
57
57
|
flash[:notice] = I18n.t("results.update_status.success", scope: "decidim.accountability.admin")
|
|
58
58
|
redirect_to results_path
|
|
@@ -68,7 +68,7 @@ module Decidim
|
|
|
68
68
|
def update_dates
|
|
69
69
|
enforce_permission_to :create, :bulk_update
|
|
70
70
|
|
|
71
|
-
UpdateResultDates.call(result_params[:start_date], result_params[:end_date], result_ids, current_user) do
|
|
71
|
+
UpdateResultDates.call(result_params[:start_date], result_params[:end_date], result_ids, current_component, current_user) do
|
|
72
72
|
on(:ok) do
|
|
73
73
|
flash[:notice] = I18n.t("results.update_dates.success", scope: "decidim.accountability.admin")
|
|
74
74
|
redirect_to results_path
|
|
@@ -29,9 +29,8 @@ module Decidim
|
|
|
29
29
|
def results
|
|
30
30
|
@results ||= begin
|
|
31
31
|
parent_id = params[:parent_id].presence
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
).page(params[:page]).per(12)
|
|
32
|
+
child_ids = Result.where(component: current_component, parent_id:).pluck(:id)
|
|
33
|
+
search.result.where(parent_id: [parent_id] + child_ids).page(params[:page]).per(12)
|
|
35
34
|
end
|
|
36
35
|
end
|
|
37
36
|
|
data/config/locales/eu.yml
CHANGED
|
@@ -31,9 +31,9 @@ eu:
|
|
|
31
31
|
accountability:
|
|
32
32
|
result:
|
|
33
33
|
budget_text: '%{link} emaitza sartu da'
|
|
34
|
-
meetings_ids: '%{link}
|
|
35
|
-
project_ids: '
|
|
36
|
-
proposal_ids: '
|
|
34
|
+
meetings_ids: 'Topaketan eztabaidatu da %{link}'
|
|
35
|
+
project_ids: 'Proiektu honetan sartu da %{link}'
|
|
36
|
+
proposal_ids: 'Proposamen honetan sartu da %{link}'
|
|
37
37
|
text: '%{link} emaitzari gehitu zaio'
|
|
38
38
|
decidim/accountability/result:
|
|
39
39
|
one: Emaitza
|
data/config/locales/sk.yml
CHANGED
|
@@ -315,6 +315,7 @@ sk:
|
|
|
315
315
|
global:
|
|
316
316
|
clear_all: Vymazať všetko
|
|
317
317
|
comments_enabled: Komentáre povolené
|
|
318
|
+
comments_max_length: Maximálny počet znakov na komentár (ponechajte 0 pre predvolenú hodnotu)
|
|
318
319
|
default_taxonomy: Predvolená taxonómia
|
|
319
320
|
default_taxonomy_help: Vyberte, ktorú taxonómiu chcete predvolene zobraziť. Ak nie je vybraná žiadna taxonómia, výsledky sa zobrazia vo formáte zoznamu.
|
|
320
321
|
define_taxonomy_filters: Pred použitím tohto nastavenia definujte nejaké filtre pre tento participatívny priestor.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
|
-
version = "0.32.
|
|
6
|
+
version = "0.32.3"
|
|
7
7
|
s.version = version
|
|
8
8
|
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
|
9
9
|
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-accountability
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.32.
|
|
4
|
+
version: 0.32.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -17,126 +17,126 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - '='
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 0.32.
|
|
20
|
+
version: 0.32.3
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - '='
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 0.32.
|
|
27
|
+
version: 0.32.3
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: decidim-core
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
32
|
- - '='
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 0.32.
|
|
34
|
+
version: 0.32.3
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - '='
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 0.32.
|
|
41
|
+
version: 0.32.3
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: decidim-admin
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
|
46
46
|
- - '='
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: 0.32.
|
|
48
|
+
version: 0.32.3
|
|
49
49
|
type: :development
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
53
|
- - '='
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 0.32.
|
|
55
|
+
version: 0.32.3
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: decidim-assemblies
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
59
59
|
requirements:
|
|
60
60
|
- - '='
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: 0.32.
|
|
62
|
+
version: 0.32.3
|
|
63
63
|
type: :development
|
|
64
64
|
prerelease: false
|
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
|
67
67
|
- - '='
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 0.32.
|
|
69
|
+
version: 0.32.3
|
|
70
70
|
- !ruby/object:Gem::Dependency
|
|
71
71
|
name: decidim-comments
|
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
|
73
73
|
requirements:
|
|
74
74
|
- - '='
|
|
75
75
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: 0.32.
|
|
76
|
+
version: 0.32.3
|
|
77
77
|
type: :development
|
|
78
78
|
prerelease: false
|
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
|
80
80
|
requirements:
|
|
81
81
|
- - '='
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
|
-
version: 0.32.
|
|
83
|
+
version: 0.32.3
|
|
84
84
|
- !ruby/object:Gem::Dependency
|
|
85
85
|
name: decidim-dev
|
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements:
|
|
88
88
|
- - '='
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: 0.32.
|
|
90
|
+
version: 0.32.3
|
|
91
91
|
type: :development
|
|
92
92
|
prerelease: false
|
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
94
|
requirements:
|
|
95
95
|
- - '='
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: 0.32.
|
|
97
|
+
version: 0.32.3
|
|
98
98
|
- !ruby/object:Gem::Dependency
|
|
99
99
|
name: decidim-meetings
|
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements:
|
|
102
102
|
- - '='
|
|
103
103
|
- !ruby/object:Gem::Version
|
|
104
|
-
version: 0.32.
|
|
104
|
+
version: 0.32.3
|
|
105
105
|
type: :development
|
|
106
106
|
prerelease: false
|
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
|
109
109
|
- - '='
|
|
110
110
|
- !ruby/object:Gem::Version
|
|
111
|
-
version: 0.32.
|
|
111
|
+
version: 0.32.3
|
|
112
112
|
- !ruby/object:Gem::Dependency
|
|
113
113
|
name: decidim-participatory_processes
|
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
|
115
115
|
requirements:
|
|
116
116
|
- - '='
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
|
-
version: 0.32.
|
|
118
|
+
version: 0.32.3
|
|
119
119
|
type: :development
|
|
120
120
|
prerelease: false
|
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
|
122
122
|
requirements:
|
|
123
123
|
- - '='
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: 0.32.
|
|
125
|
+
version: 0.32.3
|
|
126
126
|
- !ruby/object:Gem::Dependency
|
|
127
127
|
name: decidim-proposals
|
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
|
129
129
|
requirements:
|
|
130
130
|
- - '='
|
|
131
131
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: 0.32.
|
|
132
|
+
version: 0.32.3
|
|
133
133
|
type: :development
|
|
134
134
|
prerelease: false
|
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
|
136
136
|
requirements:
|
|
137
137
|
- - '='
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: 0.32.
|
|
139
|
+
version: 0.32.3
|
|
140
140
|
description: An accountability component for decidim's participatory spaces.
|
|
141
141
|
email:
|
|
142
142
|
- josepjaume@gmail.com
|