decidim-elections 0.27.3 → 0.27.5
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/elections/admin/create_answer.rb +1 -1
- data/app/commands/decidim/elections/admin/create_question.rb +1 -1
- data/app/commands/decidim/elections/admin/destroy_answer.rb +1 -1
- data/app/commands/decidim/elections/admin/destroy_election.rb +1 -1
- data/app/commands/decidim/elections/admin/destroy_question.rb +1 -1
- data/app/commands/decidim/elections/admin/import_proposals_to_elections.rb +1 -1
- data/app/commands/decidim/elections/admin/update_answer.rb +1 -1
- data/app/commands/decidim/elections/admin/update_question.rb +1 -1
- data/app/controllers/decidim/elections/admin/trustees_participatory_spaces_controller.rb +1 -1
- data/app/controllers/decidim/elections/trustee_zone/application_controller.rb +6 -4
- data/app/controllers/decidim/votings/admin/exports_controller.rb +14 -0
- data/app/controllers/decidim/votings/admin/reminders_controller.rb +14 -0
- data/app/controllers/decidim/votings/admin/votings_landing_page_content_blocks_controller.rb +1 -1
- data/app/controllers/decidim/votings/admin/votings_landing_page_controller.rb +1 -1
- data/app/controllers/decidim/votings/polling_officer_zone/closures_controller.rb +4 -1
- data/app/controllers/decidim/votings/polling_officer_zone/in_person_votes_controller.rb +4 -1
- data/app/controllers/decidim/votings/votings_controller.rb +1 -1
- data/app/forms/decidim/elections/admin/setup_form.rb +2 -1
- data/app/permissions/decidim/elections/admin/permissions.rb +1 -7
- data/app/permissions/decidim/votings/admin/permissions.rb +1 -1
- data/app/views/decidim/elections/admin/elections/edit.html.erb +1 -0
- data/app/views/decidim/elections/admin/elections/index.html.erb +1 -0
- data/app/views/decidim/elections/admin/elections/new.html.erb +1 -0
- data/app/views/decidim/elections/admin/trustees_participatory_spaces/index.html.erb +1 -0
- data/app/views/decidim/elections/admin/trustees_participatory_spaces/new.html.erb +1 -0
- data/app/views/decidim/votings/admin/ballot_styles/edit.html.erb +1 -0
- data/app/views/decidim/votings/admin/ballot_styles/index.html.erb +1 -0
- data/app/views/decidim/votings/admin/ballot_styles/new.html.erb +1 -0
- data/app/views/decidim/votings/admin/votings/edit.html.erb +1 -0
- data/app/views/decidim/votings/admin/votings/index.html.erb +1 -0
- data/app/views/decidim/votings/admin/votings/new.html.erb +0 -1
- data/app/views/decidim/votings/census/admin/census/show.html.erb +1 -0
- data/config/environment.rb +3 -0
- data/config/locales/ar.yml +3 -2
- data/config/locales/ca.yml +12 -12
- data/config/locales/cs.yml +0 -3
- data/config/locales/de.yml +139 -19
- data/config/locales/el.yml +1121 -1
- data/config/locales/en.yml +2 -2
- data/config/locales/es-MX.yml +10 -10
- data/config/locales/es-PY.yml +10 -10
- data/config/locales/es.yml +10 -10
- data/config/locales/eu.yml +193 -83
- data/config/locales/fi-plain.yml +2 -5
- data/config/locales/fi.yml +4 -7
- data/config/locales/fr-CA.yml +5 -5
- data/config/locales/fr.yml +8 -8
- data/config/locales/ga-IE.yml +1 -1
- data/config/locales/gl.yml +13 -7
- data/config/locales/hu.yml +21 -4
- data/config/locales/it.yml +10 -36
- data/config/locales/ja.yml +14 -17
- data/config/locales/lt.yml +23 -5
- data/config/locales/lv.yml +3 -4
- data/config/locales/nl.yml +10 -32
- data/config/locales/no.yml +23 -6
- data/config/locales/pl.yml +17 -33
- data/config/locales/pt-BR.yml +31 -32
- data/config/locales/pt.yml +3 -28
- data/config/locales/ro-RO.yml +14 -11
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sv.yml +9 -10
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +54 -5
- data/config/locales/zh-CN.yml +23 -6
- data/config/locales/zh-TW.yml +0 -29
- data/lib/decidim/elections/test/factories.rb +1 -0
- data/lib/decidim/elections/version.rb +1 -1
- data/lib/decidim/votings/admin_engine.rb +1 -0
- data/lib/decidim/votings/voting_serializer.rb +2 -2
- metadata +21 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 686b80139a7ff600ab295a44d478680e80623f3bc4b3ef7b06005f7f8feab153
|
4
|
+
data.tar.gz: 2e5757801122cf50491a4a7089b11a3c1f0b66db4f5286fdcca8b8b1b8419223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af80687d20eb9705f7f0c316653347da1fdcd3c245362c8a17e440d1006cbe6a84db2b3de55c0d694fc5eb8c3f8c163a1659b54cc093dd2a52e121ac77482316
|
7
|
+
data.tar.gz: 3317a96e89f1646ee3b75d645c60002e7d3a20a75b72fe8ca1a1c9d7b03ccced6ca673b58fc85cf79ea581fc94531e077274074a8ebeba280d9991c5b3cae58b
|
@@ -14,7 +14,7 @@ module Decidim
|
|
14
14
|
#
|
15
15
|
# Broadcasts :ok if successful, :invalid otherwise.
|
16
16
|
def call
|
17
|
-
return broadcast(:election_started) if form.election.
|
17
|
+
return broadcast(:election_started) if form.election.blocked?
|
18
18
|
return broadcast(:invalid) if form.invalid?
|
19
19
|
|
20
20
|
create_question!
|
@@ -72,7 +72,7 @@ module Decidim
|
|
72
72
|
private
|
73
73
|
|
74
74
|
def trustee_participatory_space
|
75
|
-
@trustee_participatory_space ||= TrusteesParticipatorySpace.find_by(id: params[:id])
|
75
|
+
@trustee_participatory_space ||= TrusteesParticipatorySpace.find_by(id: params[:id], participatory_space: current_participatory_space)
|
76
76
|
end
|
77
77
|
|
78
78
|
def trustees
|
@@ -13,6 +13,11 @@ module Decidim
|
|
13
13
|
|
14
14
|
before_action :ensure_configured_bulletin_board!
|
15
15
|
|
16
|
+
register_permissions(::Decidim::Elections::TrusteeZone::ApplicationController,
|
17
|
+
::Decidim::Elections::Permissions,
|
18
|
+
::Decidim::Admin::Permissions,
|
19
|
+
::Decidim::Permissions)
|
20
|
+
|
16
21
|
private
|
17
22
|
|
18
23
|
def ensure_configured_bulletin_board!
|
@@ -34,10 +39,7 @@ module Decidim
|
|
34
39
|
end
|
35
40
|
|
36
41
|
def permission_class_chain
|
37
|
-
|
38
|
-
Decidim::Elections::Permissions,
|
39
|
-
Decidim::Permissions
|
40
|
-
]
|
42
|
+
::Decidim.permissions_registry.chain_for(::Decidim::Elections::TrusteeZone::ApplicationController)
|
41
43
|
end
|
42
44
|
end
|
43
45
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Votings
|
5
|
+
module Admin
|
6
|
+
# This controller allows exporting things.
|
7
|
+
# It is targeted for customizations for exporting things that lives under
|
8
|
+
# a participatory process.
|
9
|
+
class ExportsController < Decidim::Admin::ExportsController
|
10
|
+
include VotingAdmin
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Votings
|
5
|
+
module Admin
|
6
|
+
# This controller allows to send reminders.
|
7
|
+
# It is targeted for customizations for reminder things that lives under
|
8
|
+
# votings.
|
9
|
+
class RemindersController < Decidim::Admin::RemindersController
|
10
|
+
include VotingAdmin
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/app/controllers/decidim/votings/admin/votings_landing_page_content_blocks_controller.rb
CHANGED
@@ -18,7 +18,7 @@ module Decidim
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def scoped_resource
|
21
|
-
@scoped_resource ||= Voting.find_by(slug: params[:voting_slug])
|
21
|
+
@scoped_resource ||= Voting.find_by(slug: params[:voting_slug], organization: current_organization)
|
22
22
|
end
|
23
23
|
|
24
24
|
def enforce_permission_to_update_resource
|
@@ -16,7 +16,7 @@ module Decidim
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def scoped_resource
|
19
|
-
@scoped_resource ||= Voting.find_by(slug: params[:voting_slug])
|
19
|
+
@scoped_resource ||= Voting.find_by(slug: params[:voting_slug], organization: current_organization)
|
20
20
|
end
|
21
21
|
|
22
22
|
def enforce_permission_to_update_resource
|
@@ -111,7 +111,10 @@ module Decidim
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def election
|
114
|
-
@election ||= Decidim::Elections::Election.
|
114
|
+
@election ||= Decidim::Elections::Election.joins(:component)
|
115
|
+
.where(component: { participatory_space: current_organization.participatory_spaces })
|
116
|
+
.includes(questions: :answers)
|
117
|
+
.find_by(id: params[:election_id])
|
115
118
|
end
|
116
119
|
|
117
120
|
def polling_station
|
@@ -121,7 +121,10 @@ module Decidim
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def election
|
124
|
-
@election ||= Decidim::Elections::Election.
|
124
|
+
@election ||= Decidim::Elections::Election.joins(:component)
|
125
|
+
.where(component: { participatory_space: current_organization.participatory_spaces })
|
126
|
+
.includes(questions: :answers)
|
127
|
+
.find_by(id: params[:election_id])
|
125
128
|
end
|
126
129
|
|
127
130
|
def polling_officer
|
@@ -103,7 +103,7 @@ module Decidim
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def election
|
106
|
-
@election ||= Decidim::Elections::Election.find(params[:election_id])
|
106
|
+
@election ||= Decidim::Elections::Election.where(component: current_participatory_space.components).find(params[:election_id])
|
107
107
|
end
|
108
108
|
|
109
109
|
def elections
|
@@ -41,7 +41,8 @@ module Decidim
|
|
41
41
|
[:max_selections, {}, election.valid_questions?],
|
42
42
|
[:published, {}, election.published_at.present?],
|
43
43
|
[:component_published, {}, election.component.published?],
|
44
|
-
[:time_before, { hours: Decidim::Elections.setup_minimum_hours_before_start },
|
44
|
+
[:time_before, { hours: I18n.t("datetime.distance_in_words.x_hours", count: Decidim::Elections.setup_minimum_hours_before_start) },
|
45
|
+
election.minimum_hours_before_start?],
|
45
46
|
[:trustees_number, { number: bulletin_board.number_of_trustees }, participatory_space_trustees_with_public_key.size >= bulletin_board.number_of_trustees]
|
46
47
|
].freeze
|
47
48
|
end
|
@@ -24,10 +24,8 @@ module Decidim
|
|
24
24
|
case permission_action.action
|
25
25
|
when :create, :read
|
26
26
|
allow!
|
27
|
-
when :delete, :update, :unpublish
|
27
|
+
when :delete, :update, :unpublish, :publish
|
28
28
|
allow_if_not_blocked
|
29
|
-
when :publish
|
30
|
-
allow_if_valid_and_not_blocked
|
31
29
|
end
|
32
30
|
when :trustees
|
33
31
|
case permission_action.action
|
@@ -80,10 +78,6 @@ module Decidim
|
|
80
78
|
toggle_allow(election && !election.blocked?)
|
81
79
|
end
|
82
80
|
|
83
|
-
def allow_if_valid_and_not_blocked
|
84
|
-
toggle_allow(election && !election.blocked? && election.valid_questions?)
|
85
|
-
end
|
86
|
-
|
87
81
|
def allow_if_not_related_to_any_election
|
88
82
|
toggle_allow(trustee_participatory_space.trustee.elections.empty?)
|
89
83
|
end
|
@@ -120,7 +120,7 @@ module Decidim
|
|
120
120
|
toggle_allow(user.admin? && (voting.dataset.blank? || voting.dataset.init_data?) && ballot_style.present?)
|
121
121
|
end
|
122
122
|
when :component_data
|
123
|
-
toggle_allow(user.admin?) if permission_action.action
|
123
|
+
toggle_allow(user.admin?) if [:import, :export].member? permission_action.action
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
data/config/locales/ar.yml
CHANGED
@@ -19,8 +19,6 @@ ar:
|
|
19
19
|
models:
|
20
20
|
answer:
|
21
21
|
name: الإجابة
|
22
|
-
question:
|
23
|
-
name: سؤال
|
24
22
|
steps:
|
25
23
|
tally_started:
|
26
24
|
invalid: كانت هناك مشكلة في الإبلاغ عن الأمين المفقود
|
@@ -43,6 +41,9 @@ ar:
|
|
43
41
|
show:
|
44
42
|
identification_keys:
|
45
43
|
cancel: إلغاء
|
44
|
+
votes:
|
45
|
+
confirm:
|
46
|
+
answer: الإجابة
|
46
47
|
votings:
|
47
48
|
admin:
|
48
49
|
models:
|
data/config/locales/ca.yml
CHANGED
@@ -226,7 +226,7 @@ ca:
|
|
226
226
|
answer:
|
227
227
|
name: Resposta
|
228
228
|
election:
|
229
|
-
name:
|
229
|
+
name: Elecció
|
230
230
|
question:
|
231
231
|
name: Pregunta
|
232
232
|
trustee:
|
@@ -644,7 +644,7 @@ ca:
|
|
644
644
|
upload_legend: Decidim té les teves claus públiques d'identificació, però el teu navegador encara no les té. Necessites importar l'arxiu amb les teves claus d'identificació al teu ordinador des de la còpia de seguretat que vas crear després de generar-les.
|
645
645
|
not_supported_browser_description: Sembla que estàs usant un navegador que no pot ser utilitzat per a actuar com a garant. Assegura't que estàs usant la versió més recent del teu navegador, o intenta usar qualsevol dels navegadors més populars per a poder completar les teves tasques com a garant.
|
646
646
|
not_supported_browser_title: Actualitza el navegador per a actuar com a garant
|
647
|
-
trustee_role_description:
|
647
|
+
trustee_role_description: Has estat assignada com a garant en algunes de les eleccions celebrades en aquesta plataforma.
|
648
648
|
update:
|
649
649
|
success: La teva clau pública d'identificació va ser guardada amb èxit.
|
650
650
|
votes:
|
@@ -688,10 +688,10 @@ ca:
|
|
688
688
|
header:
|
689
689
|
ballot_decision: Envia o audita el teu vot
|
690
690
|
casting: El vot s'està dipositant
|
691
|
-
confirm:
|
691
|
+
confirm: Confirmar el teu vot
|
692
692
|
confirmed: Vot confirmat
|
693
693
|
encrypting: El vot s'està xifrant
|
694
|
-
failed:
|
694
|
+
failed: Vot fallit
|
695
695
|
messages:
|
696
696
|
invalid_token: La sessió de la cabina de votació no és vàlida. Prova de votar de nou.
|
697
697
|
not_allowed: No pots votar en aquesta votació en aquest moment.
|
@@ -735,7 +735,7 @@ ca:
|
|
735
735
|
continue: Següent
|
736
736
|
warnings:
|
737
737
|
no_elections_warning: No hi ha cap votació que coincideixi amb la teva cerca o no n'hi ha cap programada.
|
738
|
-
no_scheduled_elections_warning: Actualment no hi ha votacions programades, però pots veure les anteriors.
|
738
|
+
no_scheduled_elections_warning: Actualment no hi ha votacions programades, però pots veure un llistat de les anteriors.
|
739
739
|
events:
|
740
740
|
elections:
|
741
741
|
election_published:
|
@@ -823,15 +823,15 @@ ca:
|
|
823
823
|
description:
|
824
824
|
name: Descripció de la votació
|
825
825
|
elections:
|
826
|
-
name: Eleccions
|
826
|
+
name: Eleccions
|
827
827
|
header:
|
828
828
|
name: Capçalera de la votació
|
829
829
|
html_block_1:
|
830
|
-
name: Bloc html 1 de votació
|
830
|
+
name: Bloc html 1 de la votació
|
831
831
|
html_block_2:
|
832
|
-
name: Bloc html 2 de votació
|
832
|
+
name: Bloc html 2 de la votació
|
833
833
|
html_block_3:
|
834
|
-
name: Bloc html 3 de votació
|
834
|
+
name: Bloc html 3 de la votació
|
835
835
|
metrics:
|
836
836
|
name: Mètriques de la votació
|
837
837
|
polling_stations:
|
@@ -1047,7 +1047,7 @@ ca:
|
|
1047
1047
|
select_a_voting_type: Si us plau selecciona un tipus de votació
|
1048
1048
|
show_check_census_help: Si vols mostrar l'enllaç "Puc votar?" al menú de votacions públiques
|
1049
1049
|
slug: Nom curt d'URL
|
1050
|
-
slug_help: 'Els noms curts d''URL s''utilitzen per generar els URL que apunten a
|
1050
|
+
slug_help: 'Els noms curts d''URL s''utilitzen per generar els URL que apunten a aquesta votació. Només accepta lletres, números i guions, i ha de començar amb una lletra. Exemple: %{url}'
|
1051
1051
|
title: Títol
|
1052
1052
|
voting_type:
|
1053
1053
|
hybrid: Híbrida
|
@@ -1186,7 +1186,7 @@ ca:
|
|
1186
1186
|
certify:
|
1187
1187
|
add_images: Afegir imatges
|
1188
1188
|
error: S'ha produït un error en adjuntar el certificat. Si us plau, prova de nou.
|
1189
|
-
form_legend: Puja una imatge del
|
1189
|
+
form_legend: Puja una imatge del Certificat de Tancament Electoral
|
1190
1190
|
heading: Recompte de vots - Pujar certificat
|
1191
1191
|
info_text: Si us plau, puja una imatge del certificat de tancament electoral.
|
1192
1192
|
submit: Pujar el certificat
|
@@ -1415,7 +1415,7 @@ ca:
|
|
1415
1415
|
footer_button_text:
|
1416
1416
|
participate: Participa
|
1417
1417
|
view: Veure
|
1418
|
-
vote:
|
1418
|
+
vote: Votar
|
1419
1419
|
unspecified: Sense especificar
|
1420
1420
|
voting_type:
|
1421
1421
|
hybrid: Híbrida
|
data/config/locales/cs.yml
CHANGED
@@ -668,7 +668,6 @@ cs:
|
|
668
668
|
upload_legend: Server má vaše veřejné identifikační klíče, ale váš prohlížeč jej stále nemá. Je třeba importovat soubor s identifikačními klíči do počítače ze zálohy, kterou jste vytvořili po jejich vygenerování.
|
669
669
|
not_supported_browser_description: Vypadá to, že používáte webový prohlížeč, který nelze použít jako správce. Ujistěte se, že používáte nejnovější verzi prohlížeče, nebo zkuste použít některý z nejpopulárnějších prohlížečů, abyste mohli dokončit své úkoly správce.
|
670
670
|
not_supported_browser_title: Upgradujte prohlížeč abyste mohl fungovat jako důvěrník
|
671
|
-
trustee_role_description: Byl jste pověřen, abyste v některých volbách, které na této platformě probíhají, jednal jako důvěrník.
|
672
671
|
update:
|
673
672
|
success: Váš identifikační veřejný klíč byl úspěšně uložen.
|
674
673
|
votes:
|
@@ -759,7 +758,6 @@ cs:
|
|
759
758
|
continue: Další
|
760
759
|
warnings:
|
761
760
|
no_elections_warning: Žádné volby neodpovídají zadaným kritériím nebo nejsou naplánovány žádné volby.
|
762
|
-
no_scheduled_elections_warning: V současné době nejsou žádné plánované volby, ale zde najdete všechny minulé volby na seznamu.
|
763
761
|
events:
|
764
762
|
elections:
|
765
763
|
election_published:
|
@@ -1211,7 +1209,6 @@ cs:
|
|
1211
1209
|
certify:
|
1212
1210
|
add_images: Přidat obrázky
|
1213
1211
|
error: Došlo k chybě při připojování certifikátu, zkuste to prosím znovu.
|
1214
|
-
form_legend: Nahrajte prosím fotografii volebního certifikátu o uzavření
|
1215
1212
|
heading: Přepočet hlasů - Nahrát certifikát
|
1216
1213
|
info_text: Nahrajte prosím fotografii volebního certifikátu o uzavření.
|
1217
1214
|
submit: Nahrát certifikát
|