decidim-elections 0.31.5 → 0.31.7
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/elections/admin/create_election.rb +6 -6
- data/app/commands/decidim/elections/admin/update_election.rb +6 -6
- data/app/forms/decidim/elections/admin/election_form.rb +4 -2
- data/app/helpers/decidim/elections/application_helper.rb +1 -6
- data/app/views/decidim/elections/admin/elections/_actions.html.erb +2 -2
- data/app/views/decidim/elections/admin/elections/_form.html.erb +1 -1
- data/app/views/decidim/elections/elections/_questions.html.erb +4 -1
- data/app/views/layouts/decidim/election_booth.html.erb +2 -2
- data/config/locales/cs.yml +18 -0
- data/config/locales/eu.yml +6 -6
- data/config/locales/fr-CA.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/lib/decidim/elections/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7eb54799b0de1464097846d64f1502d3755bf0ca01ff08a2efaecff77e6bd601
|
|
4
|
+
data.tar.gz: 653a90bcd696f1914cd134b4172eee0e82de65ccc8398a4883e1f1bc2f8816be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3342400cb2fce07525eb2c9d0479c2545e58d1953bed7b9d9b462318c7b7a3acc1485210e88f377bed015714af8a977993182f25f35795aa132eeaa572ab6541
|
|
7
|
+
data.tar.gz: e2da2feef2b2fb03a27a6b461854f35a005a2a44012d83d3f768cc7af2c7468bccc12db9cf757398e32e5863d8911ce537517a0f8bd712e38da5ac33cc190492
|
|
@@ -4,13 +4,13 @@ module Decidim
|
|
|
4
4
|
module Elections
|
|
5
5
|
module Admin
|
|
6
6
|
class CreateElection < Decidim::Commands::CreateResource
|
|
7
|
-
include ::Decidim::
|
|
7
|
+
include ::Decidim::MultipleAttachmentsMethods
|
|
8
8
|
|
|
9
9
|
fetch_form_attributes :title, :description, :start_at, :end_at, :results_availability
|
|
10
10
|
|
|
11
11
|
protected
|
|
12
12
|
|
|
13
|
-
attr_reader :
|
|
13
|
+
attr_reader :attachments
|
|
14
14
|
|
|
15
15
|
def resource_class = Decidim::Elections::Election
|
|
16
16
|
|
|
@@ -34,14 +34,14 @@ module Decidim
|
|
|
34
34
|
|
|
35
35
|
def run_after_hooks
|
|
36
36
|
@attached_to = resource
|
|
37
|
-
|
|
37
|
+
create_attachments if process_attachments?
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def run_before_hooks
|
|
41
|
-
return unless
|
|
41
|
+
return unless process_attachments?
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
raise Decidim::Commands::HookError if
|
|
43
|
+
build_attachments
|
|
44
|
+
raise Decidim::Commands::HookError if attachments_invalid?
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
end
|
|
@@ -4,7 +4,7 @@ module Decidim
|
|
|
4
4
|
module Elections
|
|
5
5
|
module Admin
|
|
6
6
|
class UpdateElection < Decidim::Commands::UpdateResource
|
|
7
|
-
include ::Decidim::
|
|
7
|
+
include ::Decidim::MultipleAttachmentsMethods
|
|
8
8
|
fetch_form_attributes :title, :description, :start_at, :end_at, :results_availability
|
|
9
9
|
|
|
10
10
|
def initialize(form, election)
|
|
@@ -43,15 +43,15 @@ module Decidim
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def run_after_hooks
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
create_attachments if process_attachments?
|
|
47
|
+
attachment_cleanup!(include_all_attachments: true)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def run_before_hooks
|
|
51
|
-
return unless
|
|
51
|
+
return unless process_attachments?
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
raise Decidim::Commands::HookError if
|
|
53
|
+
build_attachments
|
|
54
|
+
raise Decidim::Commands::HookError if attachments_invalid?
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
end
|
|
@@ -20,12 +20,12 @@ module Decidim
|
|
|
20
20
|
attribute :results_availability, String, default: "after_end"
|
|
21
21
|
attribute :attachment, AttachmentForm
|
|
22
22
|
|
|
23
|
-
attachments_attribute :
|
|
23
|
+
attachments_attribute :attachments
|
|
24
24
|
|
|
25
25
|
validates :title, translatable_presence: true
|
|
26
26
|
validates :results_availability, inclusion: { in: Decidim::Elections::Election::RESULTS_AVAILABILITY_OPTIONS }
|
|
27
27
|
validates :start_at, date: { before: :end_at }, unless: :manual_start?
|
|
28
|
-
validates :start_at, date: { after: proc { Time.current } }, if:
|
|
28
|
+
validates :start_at, date: { after: proc { Time.current } }, if: ->(f) { f.election&.scheduled? && f.start_at.present? }
|
|
29
29
|
validates :manual_start, acceptance: true, if: :per_question_not_started?
|
|
30
30
|
validates :end_at, presence: true
|
|
31
31
|
validates :end_at, date: { after: :start_at }, if: ->(f) { f.start_at.present? && f.end_at.present? }
|
|
@@ -33,6 +33,8 @@ module Decidim
|
|
|
33
33
|
|
|
34
34
|
def map_model(election)
|
|
35
35
|
self.manual_start = election.start_at.blank?
|
|
36
|
+
self.attachments = election.attachments.ids
|
|
37
|
+
self.add_attachments = election.attachments.map { |att| { id: att.id, title: att.title } }
|
|
36
38
|
end
|
|
37
39
|
|
|
38
40
|
def results_availability_labels
|
|
@@ -47,12 +47,7 @@ module Decidim
|
|
|
47
47
|
description = translated_attribute(question.description)
|
|
48
48
|
return if description.blank?
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
if rich_text_editor_in_public_views?
|
|
52
|
-
Decidim::ContentProcessor.render_without_format(sanitized).html_safe
|
|
53
|
-
else
|
|
54
|
-
Decidim::ContentProcessor.render(sanitized, "div")
|
|
55
|
-
end
|
|
50
|
+
decidim_sanitize_editor_admin(description)
|
|
56
51
|
end
|
|
57
52
|
|
|
58
53
|
def selected_response_option_id(question)
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<% else %>
|
|
43
43
|
<li class="dropdown__item">
|
|
44
44
|
<div class="dropdown__button-disabled">
|
|
45
|
-
<%= with_tooltip t("tooltips.edit_elections_info", scope: "decidim.admin") do %>
|
|
45
|
+
<%= with_tooltip t("tooltips.edit_elections_info", scope: "decidim.admin"), class: :left do %>
|
|
46
46
|
<%= icon "pencil-line", class: "text-gray" %>
|
|
47
47
|
<span>
|
|
48
48
|
<%= t("actions.edit", scope: "decidim.elections") %>
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
<% else %>
|
|
78
78
|
<li class="dropdown__item">
|
|
79
79
|
<div class="dropdown__button-disabled">
|
|
80
|
-
<%= with_tooltip t("tooltips.deleted_elections_info", scope: "decidim.admin") do %>
|
|
80
|
+
<%= with_tooltip t("tooltips.deleted_elections_info", scope: "decidim.admin"), class: :left do %>
|
|
81
81
|
<%= icon "delete-bin-line", class: "text-gray" %>
|
|
82
82
|
<span>
|
|
83
83
|
<%= t("actions.soft_delete", scope: "decidim.admin") %>
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
</button>
|
|
13
13
|
</div>
|
|
14
14
|
<div id="panel-question-<%= question.id %>" class="card-accordion-section" aria-hidden="true">
|
|
15
|
-
|
|
15
|
+
<% description = render_question_description(question) %>
|
|
16
|
+
<% if description.present? %>
|
|
17
|
+
<div class="editor-content"><%= description %></div>
|
|
18
|
+
<% end %>
|
|
16
19
|
|
|
17
20
|
<% question.response_options.each do |answer| %>
|
|
18
21
|
<h4><%= translated_attribute answer.body %></h4>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</head>
|
|
13
13
|
<body class="text-black text-md form-defaults<%= yield (:body_class) %>">
|
|
14
14
|
<div class="layout-container">
|
|
15
|
-
<header>
|
|
15
|
+
<header role="banner">
|
|
16
16
|
<div id="elections-header-container">
|
|
17
17
|
<%= render partial: "layouts/decidim/election_votes_header" %>
|
|
18
18
|
</div>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<%= display_flash_messages %>
|
|
23
23
|
</div>
|
|
24
24
|
<% end %>
|
|
25
|
-
<main class="layout-1col cols-6">
|
|
25
|
+
<main class="layout-1col cols-6" role="main">
|
|
26
26
|
<div class="py-8 space-y-8 lg:py-12 lg:space-y-12">
|
|
27
27
|
<%= yield %>
|
|
28
28
|
</div>
|
data/config/locales/cs.yml
CHANGED
|
@@ -34,15 +34,18 @@ cs:
|
|
|
34
34
|
elections:
|
|
35
35
|
actions:
|
|
36
36
|
confirm_delete_election: Opravdu chcete odstranit tuto volbu?
|
|
37
|
+
confirm_unpublish_election: Opravdu chcete zrušit zveřejnění těchto voleb?
|
|
37
38
|
deleted_election_info: Smazané volby nejsou zobrazeny v seznamu. Můžete je zobrazit kliknutím na tlačítko níže.
|
|
38
39
|
edit: Upravit volby
|
|
39
40
|
new: Nové volby
|
|
40
41
|
preview: Náhled
|
|
41
42
|
title: Akce
|
|
43
|
+
view: Zobrazit volby
|
|
42
44
|
view_deleted_elections: Zobrazit odstraněné volby
|
|
43
45
|
admin:
|
|
44
46
|
census:
|
|
45
47
|
edit:
|
|
48
|
+
choose_census: Vyberte typ seznamu voličů, který chcete použít pro tyto volby
|
|
46
49
|
created_at: Vytvořeno v
|
|
47
50
|
identifier: Identifikátor uživatele
|
|
48
51
|
dashboard:
|
|
@@ -113,6 +116,8 @@ cs:
|
|
|
113
116
|
publish: Publikovat
|
|
114
117
|
results_availability:
|
|
115
118
|
after_end: Po ukončení voleb
|
|
119
|
+
per_question: Otázka po otázce
|
|
120
|
+
per_question_help: ručně zpracovat hlasování a publikovat výsledky pro každou otázku
|
|
116
121
|
real_time: V reálném čase
|
|
117
122
|
title: Dostupnost výsledků
|
|
118
123
|
save: Uložit a pokračovat
|
|
@@ -142,9 +147,20 @@ cs:
|
|
|
142
147
|
form_description: Otázka musí mít alespoň dvě odpovědi, aby mohla jít k dalšímu kroku.
|
|
143
148
|
update:
|
|
144
149
|
invalid: Při aktualizaci otázek došlo k chybě.
|
|
150
|
+
success: Otázky byly úspěšně aktualizovány.
|
|
145
151
|
statuses:
|
|
152
|
+
enable_voting:
|
|
153
|
+
invalid: Při povolování hlasování došlo k chybě.
|
|
154
|
+
success: Hlasování bylo úspěšně aktivováno.
|
|
155
|
+
end:
|
|
156
|
+
invalid: Vyskytl se problém s ukončením voleb.
|
|
157
|
+
success: Volba byla úspěšně ukončena.
|
|
146
158
|
publish_results:
|
|
147
159
|
invalid: Při publikování výsledků došlo k chybě.
|
|
160
|
+
success: Výsledky byly úspěšně zveřejněny.
|
|
161
|
+
start:
|
|
162
|
+
invalid: Vyskytl se problém při zahájení voleb.
|
|
163
|
+
success: Volba byla úspěšně zahájena.
|
|
148
164
|
unknown: Neznámý stav
|
|
149
165
|
admin_log:
|
|
150
166
|
election:
|
|
@@ -244,12 +260,14 @@ cs:
|
|
|
244
260
|
failed: Vaši identitu nelze ověřit. Zkontrolujte zadané informace a zkuste to znovu.
|
|
245
261
|
form_title: Ověřte svou identitu
|
|
246
262
|
confirm:
|
|
263
|
+
cast_vote: Odevzdat hlas
|
|
247
264
|
edit_vote: Upravte svůj hlas
|
|
248
265
|
not_answered: Na tuto otázku jste neodpověděl.
|
|
249
266
|
title: Potvrďte svůj hlas
|
|
250
267
|
not_authorized: V těchto volbách nemáte oprávnění volit.
|
|
251
268
|
question:
|
|
252
269
|
back: Zpět
|
|
270
|
+
cast_vote: Odevzdat hlas
|
|
253
271
|
next: Další
|
|
254
272
|
statistics:
|
|
255
273
|
elections_count: Volby
|
data/config/locales/eu.yml
CHANGED
|
@@ -42,7 +42,7 @@ eu:
|
|
|
42
42
|
new: Beste hauteskunde bat
|
|
43
43
|
preview: Aurrebistaratu
|
|
44
44
|
title: Ekintzak
|
|
45
|
-
view:
|
|
45
|
+
view: Ikusi hauteskundeak
|
|
46
46
|
view_deleted_elections: Ikusi ezabatutako hauteskundeak
|
|
47
47
|
admin:
|
|
48
48
|
census:
|
|
@@ -188,7 +188,7 @@ eu:
|
|
|
188
188
|
question:
|
|
189
189
|
update: "%{user_name} parte-hartzaileak eguneratu ditu %{resource_name} aukerako galderak"
|
|
190
190
|
censuses:
|
|
191
|
-
census_ready_html: Erroldako datuak kargatuta
|
|
191
|
+
census_ready_html: Erroldako datuak kargatuta eta prest daude % <b>{eleccion_title}</b> bozketan erabiltzeko.
|
|
192
192
|
census_size_html:
|
|
193
193
|
one: Gaur egun <strong>bat</strong> pertsona dago hautesleku honetan botoa jasotzeko gai dena (hau errolda dinamiko batean alda daiteke).
|
|
194
194
|
other: Gaur egun <strong>bat</strong> pertsona daude hautesleku honetan botoa jasotzeko gai deirnak (hau errolda dinamiko batean alda daiteke).
|
|
@@ -210,7 +210,7 @@ eu:
|
|
|
210
210
|
verify_with_method: Egiaztatu %{name} izenaz
|
|
211
211
|
token_csv:
|
|
212
212
|
example: |
|
|
213
|
-
e-maila:
|
|
213
|
+
e-maila:
|
|
214
214
|
user@example.org;123456
|
|
215
215
|
user2@example.org;ABCXYZ
|
|
216
216
|
info_html: |
|
|
@@ -255,7 +255,7 @@ eu:
|
|
|
255
255
|
vote_button: Eman babesa
|
|
256
256
|
voted: Bozkatu duzu. Berriz bozkatu dezakezu, zure azken botoa baino ez da kontuan hartuko.
|
|
257
257
|
votes_count:
|
|
258
|
-
one: 1
|
|
258
|
+
one: Boto 1
|
|
259
259
|
other: "%{count} boto"
|
|
260
260
|
voting_began: 'Bozketa hasi zen: %{start_date}'
|
|
261
261
|
vote_results:
|
|
@@ -280,7 +280,7 @@ eu:
|
|
|
280
280
|
waiting:
|
|
281
281
|
description: Hemen itxaron dezakezu hurrengo galdera egin arte. Automatikoki hurrengo galderara itzuliko zara prest dagoenean.
|
|
282
282
|
edit_vote: Zure botoa editau
|
|
283
|
-
exit_button:
|
|
283
|
+
exit_button: Irten itxarongelatik
|
|
284
284
|
title: Hurrengo galderaren zain
|
|
285
285
|
status:
|
|
286
286
|
active: Aktibo
|
|
@@ -313,7 +313,7 @@ eu:
|
|
|
313
313
|
next: Hurrengoa
|
|
314
314
|
receipt:
|
|
315
315
|
description: Bozkatzeko epea zabalik dagoen bitartean edozein unetan eman daiteke berriro botoa. Zure aurreko botoa berriaz gainidatziko da.
|
|
316
|
-
edit_vote:
|
|
316
|
+
edit_vote: Editatu zure botoa
|
|
317
317
|
exit_button: Irten bozkatzeko kabinatik
|
|
318
318
|
title: Zure botoak zuzen eman dira
|
|
319
319
|
metadata:
|
data/config/locales/fr-CA.yml
CHANGED
data/config/locales/fr.yml
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-elections
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.31.
|
|
4
|
+
version: 0.31.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Vergés
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: decidim-admin
|
|
@@ -16,84 +16,84 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.31.
|
|
19
|
+
version: 0.31.7
|
|
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.31.
|
|
26
|
+
version: 0.31.7
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: decidim-core
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - '='
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.31.
|
|
33
|
+
version: 0.31.7
|
|
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.31.
|
|
40
|
+
version: 0.31.7
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: decidim-forms
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - '='
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.31.
|
|
47
|
+
version: 0.31.7
|
|
48
48
|
type: :runtime
|
|
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.31.
|
|
54
|
+
version: 0.31.7
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: decidim-admin
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - '='
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.31.
|
|
61
|
+
version: 0.31.7
|
|
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.31.
|
|
68
|
+
version: 0.31.7
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: decidim-dev
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - '='
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 0.31.
|
|
75
|
+
version: 0.31.7
|
|
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.31.
|
|
82
|
+
version: 0.31.7
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: decidim-participatory_processes
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - '='
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.31.
|
|
89
|
+
version: 0.31.7
|
|
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.31.
|
|
96
|
+
version: 0.31.7
|
|
97
97
|
description: A module that aims to provide a set of tools to create elections in Decidim.
|
|
98
98
|
email:
|
|
99
99
|
- ivan@pokecode.net
|