decidim-accountability 0.31.8 → 0.31.9
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/de.yml +1 -0
- data/config/locales/eu.yml +3 -3
- data/config/locales/sk.yml +1 -0
- data/lib/decidim/accountability/version.rb +1 -1
- metadata +20 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86abd79466e93ebed7b4c3be0246ca72d17d525dfde7d9319fb8504010fb2870
|
|
4
|
+
data.tar.gz: 3f1bb65d1011bc0ef041f170b09864367000828b6b8e888bbd3d36b62ee08d2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19429f8ba078b38902ecce2f2326faa55a840ab6191c16944d5ad10f8500f1a663e16e221764fb62d8daa07e01e41a66d43f531d3ca43acb24d505720008701b
|
|
7
|
+
data.tar.gz: 9b01767b731e102920082ba77d5ab33c0b17777fbd001fae1c86ba2fb3594d54395fb1b20fab7ce9f445fcafab05e47862ea72cd2d1230f1e01e1dde7374180e
|
|
@@ -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/de.yml
CHANGED
|
@@ -301,6 +301,7 @@ de:
|
|
|
301
301
|
global:
|
|
302
302
|
clear_all: Alles löschen
|
|
303
303
|
comments_enabled: Kommentare aktiviert
|
|
304
|
+
comments_max_length: Maximale Zeichen pro Kommentar (Lassen Sie 0 für den Standardwert)
|
|
304
305
|
default_taxonomy: Standard Klassifizierung
|
|
305
306
|
default_taxonomy_help: Wählen Sie, welche Klassifizierung standardmäßig angezeigt werden soll. Wenn keine Taxonomie ausgewählt ist, werden die Ergebnisse in einem Listenformat angezeigt.
|
|
306
307
|
define_taxonomy_filters: Bitte definieren Sie einige Filter für diesen partizipativen Bereich, bevor Sie diese Einstellung verwenden.
|
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.
|
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.31.
|
|
4
|
+
version: 0.31.9
|
|
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: 2026-
|
|
13
|
+
date: 2026-11-23 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: decidim-comments
|
|
@@ -18,126 +18,126 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - '='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.31.
|
|
21
|
+
version: 0.31.9
|
|
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.31.
|
|
28
|
+
version: 0.31.9
|
|
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.31.
|
|
35
|
+
version: 0.31.9
|
|
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.31.
|
|
42
|
+
version: 0.31.9
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: decidim-admin
|
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
47
|
- - '='
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: 0.31.
|
|
49
|
+
version: 0.31.9
|
|
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.31.
|
|
56
|
+
version: 0.31.9
|
|
57
57
|
- !ruby/object:Gem::Dependency
|
|
58
58
|
name: decidim-assemblies
|
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
61
|
- - '='
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: 0.31.
|
|
63
|
+
version: 0.31.9
|
|
64
64
|
type: :development
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
68
|
- - '='
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: 0.31.
|
|
70
|
+
version: 0.31.9
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: decidim-comments
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
|
75
75
|
- - '='
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
|
-
version: 0.31.
|
|
77
|
+
version: 0.31.9
|
|
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.31.
|
|
84
|
+
version: 0.31.9
|
|
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.31.
|
|
91
|
+
version: 0.31.9
|
|
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.31.
|
|
98
|
+
version: 0.31.9
|
|
99
99
|
- !ruby/object:Gem::Dependency
|
|
100
100
|
name: decidim-meetings
|
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
|
102
102
|
requirements:
|
|
103
103
|
- - '='
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: 0.31.
|
|
105
|
+
version: 0.31.9
|
|
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.31.
|
|
112
|
+
version: 0.31.9
|
|
113
113
|
- !ruby/object:Gem::Dependency
|
|
114
114
|
name: decidim-participatory_processes
|
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
|
116
116
|
requirements:
|
|
117
117
|
- - '='
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: 0.31.
|
|
119
|
+
version: 0.31.9
|
|
120
120
|
type: :development
|
|
121
121
|
prerelease: false
|
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
|
123
123
|
requirements:
|
|
124
124
|
- - '='
|
|
125
125
|
- !ruby/object:Gem::Version
|
|
126
|
-
version: 0.31.
|
|
126
|
+
version: 0.31.9
|
|
127
127
|
- !ruby/object:Gem::Dependency
|
|
128
128
|
name: decidim-proposals
|
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
|
130
130
|
requirements:
|
|
131
131
|
- - '='
|
|
132
132
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: 0.31.
|
|
133
|
+
version: 0.31.9
|
|
134
134
|
type: :development
|
|
135
135
|
prerelease: false
|
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
|
137
137
|
requirements:
|
|
138
138
|
- - '='
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
|
-
version: 0.31.
|
|
140
|
+
version: 0.31.9
|
|
141
141
|
description: An accountability component for decidim's participatory spaces.
|
|
142
142
|
email:
|
|
143
143
|
- josepjaume@gmail.com
|