decidim-elections 0.27.0.rc1 → 0.27.0.rc2
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/cells/decidim/votings/content_blocks/highlighted_votings/show.erb +1 -1
- data/app/cells/decidim/votings/content_blocks/highlighted_votings_cell.rb +1 -4
- data/app/cells/decidim/votings/content_blocks/landing_page/description/show.erb +1 -1
- data/app/cells/decidim/votings/content_blocks/landing_page/header/show.erb +2 -2
- data/app/commands/decidim/votings/census/admin/create_dataset.rb +13 -5
- data/app/commands/decidim/votings/census/admin/launch_access_codes_export.rb +3 -1
- data/app/commands/decidim/votings/census/admin/launch_access_codes_generation.rb +1 -1
- data/app/controllers/decidim/votings/census/admin/census_controller.rb +6 -2
- data/app/forms/decidim/elections/admin/setup_form.rb +42 -0
- data/app/models/decidim/elections/election.rb +2 -2
- data/app/models/decidim/votings/census/dataset.rb +1 -1
- data/app/packs/src/decidim/elections/admin/pending_action.js +2 -0
- data/app/packs/src/decidim/elections/admin/trustees_process.js +2 -0
- data/app/packs/src/decidim/elections/broken_promises_handler.js +11 -0
- data/app/packs/src/decidim/elections/trustee/key_ceremony.js +3 -0
- data/app/packs/src/decidim/elections/trustee/tally.js +3 -0
- data/app/packs/src/decidim/elections/voter/casting-vote.js +3 -0
- data/app/packs/src/decidim/elections/voter/setup-vote.js +2 -6
- data/app/packs/src/decidim/votings/admin/update_census_dataset_status.js +2 -2
- data/app/packs/src/decidim/votings/in-person-vote.js +3 -0
- data/app/views/decidim/elections/admin/steps/_create_election.html.erb +14 -1
- data/app/views/decidim/elections/admin/steps/index.html.erb +2 -0
- data/app/views/decidim/elections/{votes/_server_error_modal.html.erb → shared/_broken_promises_modal.html.erb} +10 -5
- data/app/views/decidim/elections/trustee_zone/elections/show.html.erb +2 -0
- data/app/views/decidim/elections/votes/_show_casting.html.erb +2 -0
- data/app/views/decidim/elections/votes/new.html.erb +1 -1
- data/app/views/decidim/votings/census/admin/census/_creating_data.html.erb +1 -1
- data/app/views/decidim/votings/census/admin/census/_exporting_codes.html.erb +1 -1
- data/app/views/decidim/votings/census/admin/census/_freeze.html.erb +2 -0
- data/app/views/decidim/votings/census/admin/census/_generate_codes.html.erb +14 -4
- data/app/views/decidim/votings/census/admin/census/show.html.erb +1 -1
- data/app/views/decidim/votings/polling_officer_zone/in_person_votes/new.html.erb +2 -0
- data/app/views/decidim/votings/polling_officer_zone/in_person_votes/show.html.erb +2 -0
- data/app/views/decidim/votings/votings/_promoted_voting.html.erb +1 -1
- data/config/locales/am-ET.yml +0 -1
- data/config/locales/ca.yml +21 -7
- data/config/locales/cs.yml +22 -7
- data/config/locales/da.yml +0 -1
- data/config/locales/de.yml +55 -7
- data/config/locales/en.yml +22 -7
- data/config/locales/eo.yml +0 -1
- data/config/locales/es-MX.yml +22 -8
- data/config/locales/es-PY.yml +22 -8
- data/config/locales/es.yml +22 -8
- data/config/locales/et.yml +0 -1
- data/config/locales/eu.yml +0 -6
- data/config/locales/fi-plain.yml +22 -7
- data/config/locales/fi.yml +22 -7
- data/config/locales/fr-CA.yml +28 -3
- data/config/locales/fr.yml +28 -3
- data/config/locales/gl.yml +0 -6
- data/config/locales/hr.yml +0 -1
- data/config/locales/hu.yml +7 -0
- data/config/locales/id-ID.yml +0 -1
- data/config/locales/is-IS.yml +1 -2
- data/config/locales/it.yml +0 -6
- data/config/locales/ja.yml +24 -3
- data/config/locales/ko.yml +0 -1
- data/config/locales/lt.yml +1444 -0
- data/config/locales/mt.yml +0 -1
- data/config/locales/nl.yml +0 -6
- data/config/locales/om-ET.yml +0 -1
- data/config/locales/pl.yml +0 -6
- data/config/locales/pt-BR.yml +1 -7
- data/config/locales/pt.yml +0 -6
- data/config/locales/ru.yml +0 -1
- data/config/locales/si-LK.yml +0 -1
- data/config/locales/sk.yml +0 -1
- data/config/locales/so-SO.yml +0 -1
- data/config/locales/sr-CS.yml +0 -1
- data/config/locales/sv.yml +0 -2
- data/config/locales/sw-KE.yml +0 -1
- data/config/locales/ti-ER.yml +0 -1
- data/config/locales/uk.yml +0 -1
- data/config/locales/val-ES.yml +0 -1
- data/config/locales/vi.yml +0 -1
- data/config/locales/zh-TW.yml +0 -1
- data/db/migrate/20220711112802_rename_dataset_file_to_filename.rb +7 -0
- data/lib/decidim/elections/version.rb +1 -1
- data/lib/decidim/votings/test/factories.rb +1 -1
- metadata +15 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a9d0e7b818e7b18b41b673e93de27e1fa8e18d6178ce6d6661a183d8a6ad0cd
|
|
4
|
+
data.tar.gz: 795b89104805c5bef9df57b3e1cb2ddd138be0c81af4edfd10692cfd1f72ffab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66820408502f8df42988d377a372dffb476f7e82bd06afd8f41040f61b3c0e0b3040dc632f2d637a0f7f32417d467846e205b8921697f8d9553723c7150ab676
|
|
7
|
+
data.tar.gz: dabdab39fff2e5ac223dfc5a0b5fe2dde1697b96babdfc770b2c6952048d53f58de39e7c085e3fb72939fc19a8e17017062abddbfc80311bf8a350604fac0a74
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="column">
|
|
9
9
|
<%= link_to decidim_votings.voting_path(voting), class: "card card--voting card--mini" do %>
|
|
10
10
|
<div aria-hidden="true" class="card__image-top"
|
|
11
|
-
style="background-image:url(<%= voting.attached_uploader(:banner_image).path %>)"></div>
|
|
11
|
+
style="background-image:url('<%= voting.attached_uploader(:banner_image).path %>')"></div>
|
|
12
12
|
<div class="card__content">
|
|
13
13
|
<span class="card__title card__link"><%= translated_attribute voting.title %></span>
|
|
14
14
|
</div>
|
|
@@ -33,12 +33,9 @@ module Decidim
|
|
|
33
33
|
def cache_hash
|
|
34
34
|
hash = []
|
|
35
35
|
hash.push(I18n.locale)
|
|
36
|
+
hash.push(highlighted_votings.map(&:cache_key_with_version))
|
|
36
37
|
hash.join(Decidim.cache_key_separator)
|
|
37
38
|
end
|
|
38
|
-
|
|
39
|
-
def cache_expiry_time
|
|
40
|
-
10.minutes
|
|
41
|
-
end
|
|
42
39
|
end
|
|
43
40
|
end
|
|
44
41
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<section class="extended hero" style="background-image:url(<%= current_participatory_space.attached_uploader(:banner_image).path %>);">
|
|
1
|
+
<section class="extended hero" style="background-image:url('<%= current_participatory_space.attached_uploader(:banner_image).path %>');">
|
|
2
2
|
<div class="hero__container">
|
|
3
3
|
<div class="row">
|
|
4
4
|
<div class="columns large-10 text-left">
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</section>
|
|
26
26
|
|
|
27
|
-
<section
|
|
27
|
+
<section>
|
|
28
28
|
<%= extended_navigation_bar(navigation_items) %>
|
|
29
29
|
</section>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "English"
|
|
3
4
|
require "csv"
|
|
4
5
|
|
|
5
6
|
module Decidim
|
|
@@ -55,7 +56,7 @@ module Decidim
|
|
|
55
56
|
current_user,
|
|
56
57
|
{
|
|
57
58
|
voting: form.current_participatory_space,
|
|
58
|
-
|
|
59
|
+
filename: form.file.filename.to_s,
|
|
59
60
|
csv_row_raw_count: csv_row_count,
|
|
60
61
|
status: :creating_data
|
|
61
62
|
},
|
|
@@ -64,27 +65,34 @@ module Decidim
|
|
|
64
65
|
end
|
|
65
66
|
|
|
66
67
|
def csv_header_invalid?
|
|
67
|
-
|
|
68
|
+
headers.blank? || headers != expected_headers
|
|
68
69
|
end
|
|
69
70
|
|
|
70
71
|
def headers
|
|
72
|
+
@headers ||= CSV.parse_line(File.open(file_path), col_sep: ";", headers: true, header_converters: :symbol)&.headers
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def no_ballot_headers
|
|
71
76
|
[:document_id, :document_type, :date_of_birth, :full_name, :full_address, :postal_code, :mobile_phone_number, :email_address]
|
|
72
77
|
end
|
|
73
78
|
|
|
74
79
|
def ballot_style_headers
|
|
75
|
-
|
|
80
|
+
no_ballot_headers.push(:ballot_style_code)
|
|
76
81
|
end
|
|
77
82
|
|
|
78
83
|
def expected_headers
|
|
79
|
-
@expected_headers ||= form.current_participatory_space.has_ballot_styles? ? ballot_style_headers :
|
|
84
|
+
@expected_headers ||= form.current_participatory_space.has_ballot_styles? ? ballot_style_headers : no_ballot_headers
|
|
80
85
|
end
|
|
81
86
|
|
|
82
87
|
def csv_row_count
|
|
83
88
|
@csv_row_count ||= file_lines_count - 1
|
|
84
89
|
end
|
|
85
90
|
|
|
91
|
+
# count lines in the most resource-efficient way using ruby, handles milions of lines with minimal memory footprint
|
|
86
92
|
def file_lines_count
|
|
87
|
-
|
|
93
|
+
lines = 0
|
|
94
|
+
File.foreach(file_path) { lines += 1 }
|
|
95
|
+
lines
|
|
88
96
|
end
|
|
89
97
|
end
|
|
90
98
|
end
|
|
@@ -19,6 +19,8 @@ module Decidim
|
|
|
19
19
|
def call
|
|
20
20
|
return broadcast(:invalid) unless valid?
|
|
21
21
|
|
|
22
|
+
UpdateDataset.call(dataset, { status: :exporting_codes }, user)
|
|
23
|
+
|
|
22
24
|
ExportAccessCodesJob.perform_later(dataset, user)
|
|
23
25
|
|
|
24
26
|
broadcast(:ok)
|
|
@@ -29,7 +31,7 @@ module Decidim
|
|
|
29
31
|
private
|
|
30
32
|
|
|
31
33
|
def valid?
|
|
32
|
-
user.present? && dataset&.data&.
|
|
34
|
+
user.present? && dataset&.data&.exists? && dataset.codes_generated?
|
|
33
35
|
end
|
|
34
36
|
end
|
|
35
37
|
end
|
|
@@ -8,12 +8,12 @@ module Decidim
|
|
|
8
8
|
class CensusController < Admin::ApplicationController
|
|
9
9
|
helper_method :votings, :current_participatory_space, :current_census, :census_steps, :current_census_action_view,
|
|
10
10
|
:user_email, :ballot_style_callout_text, :ballot_style_callout_level, :ballot_style_code_header
|
|
11
|
-
helper_method :admin_voting_census_path, :admin_status_voting_census_path, :generate_access_codes_path, :export_access_codes_path
|
|
11
|
+
helper_method :admin_voting_census_path, :admin_status_voting_census_path, :generate_access_codes_path, :export_access_codes_path, :waiting_status?
|
|
12
12
|
|
|
13
13
|
def show
|
|
14
14
|
enforce_permission_to :manage, :census, voting: current_participatory_space
|
|
15
15
|
|
|
16
|
-
flash[:notice] = "Finished processing #{current_census.
|
|
16
|
+
flash[:notice] = "Finished processing #{current_census.filename}" if current_census.data_created?
|
|
17
17
|
|
|
18
18
|
@form = form(DatasetForm).instance
|
|
19
19
|
end
|
|
@@ -184,6 +184,10 @@ module Decidim
|
|
|
184
184
|
def ballot_style_code_header
|
|
185
185
|
"Ballot Style Code"
|
|
186
186
|
end
|
|
187
|
+
|
|
188
|
+
def waiting_status?
|
|
189
|
+
current_census.creating_data? || current_census.generating_codes? || current_census.exporting_codes?
|
|
190
|
+
end
|
|
187
191
|
end
|
|
188
192
|
end
|
|
189
193
|
end
|
|
@@ -13,6 +13,12 @@ module Decidim
|
|
|
13
13
|
validations.each do |message, t_args, valid|
|
|
14
14
|
errors.add(message, I18n.t("steps.create_election.errors.#{message}", **t_args, scope: "decidim.elections.admin")) unless valid
|
|
15
15
|
end
|
|
16
|
+
|
|
17
|
+
if needs_census?
|
|
18
|
+
census_validations.each do |message, t_args, valid|
|
|
19
|
+
errors.add(message, I18n.t("steps.create_election.errors.#{message}", **t_args, scope: "decidim.elections.admin")) unless valid
|
|
20
|
+
end
|
|
21
|
+
end
|
|
16
22
|
end
|
|
17
23
|
|
|
18
24
|
def current_step; end
|
|
@@ -40,12 +46,28 @@ module Decidim
|
|
|
40
46
|
].freeze
|
|
41
47
|
end
|
|
42
48
|
|
|
49
|
+
def census_validations
|
|
50
|
+
return [] unless needs_census?
|
|
51
|
+
|
|
52
|
+
@census_validations ||= [
|
|
53
|
+
[:census_uploaded, {}, census.present? && census.data.exists?],
|
|
54
|
+
[:census_codes_generated, {}, census_codes_generated?],
|
|
55
|
+
[:census_frozen, {}, census&.freeze?]
|
|
56
|
+
].freeze
|
|
57
|
+
end
|
|
58
|
+
|
|
43
59
|
def messages
|
|
44
60
|
@messages ||= validations.to_h do |message, t_args, _valid|
|
|
45
61
|
[message, I18n.t("steps.create_election.requirements.#{message}", **t_args, scope: "decidim.elections.admin")]
|
|
46
62
|
end
|
|
47
63
|
end
|
|
48
64
|
|
|
65
|
+
def census_messages
|
|
66
|
+
@census_messages ||= census_validations.to_h do |message, t_args, _valid|
|
|
67
|
+
[message, I18n.t("steps.create_election.requirements.#{message}", **t_args, scope: "decidim.elections.admin")]
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
49
71
|
def participatory_space_trustees
|
|
50
72
|
@participatory_space_trustees ||= Decidim::Elections::Trustees::ByParticipatorySpace.new(election.component.participatory_space).to_a
|
|
51
73
|
end
|
|
@@ -58,6 +80,26 @@ module Decidim
|
|
|
58
80
|
@bulletin_board ||= context[:bulletin_board] || Decidim::Elections.bulletin_board
|
|
59
81
|
end
|
|
60
82
|
|
|
83
|
+
def needs_census?
|
|
84
|
+
vote_flow.is_a?(Decidim::Votings::CensusVoteFlow)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def vote_flow
|
|
88
|
+
@vote_flow ||= election.participatory_space.try(:vote_flow_for, election)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def census_codes_generated?
|
|
92
|
+
return unless needs_census?
|
|
93
|
+
|
|
94
|
+
census&.codes_generated? || census&.exporting_codes? || census&.freeze?
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def census
|
|
98
|
+
return unless needs_census?
|
|
99
|
+
|
|
100
|
+
@census ||= election.component.participatory_space.dataset
|
|
101
|
+
end
|
|
102
|
+
|
|
61
103
|
def main_button?
|
|
62
104
|
true
|
|
63
105
|
end
|
|
@@ -89,7 +89,7 @@ module Decidim
|
|
|
89
89
|
#
|
|
90
90
|
# Returns a boolean.
|
|
91
91
|
def minimum_answers?
|
|
92
|
-
questions.all? { |question| question.answers.size > 1 }
|
|
92
|
+
questions.any? && questions.all? { |question| question.answers.size > 1 }
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
# Public: Checks if the election results are published and election finished
|
|
@@ -110,7 +110,7 @@ module Decidim
|
|
|
110
110
|
#
|
|
111
111
|
# Returns a boolean.
|
|
112
112
|
def valid_questions?
|
|
113
|
-
questions.all?(&:valid_max_selection?)
|
|
113
|
+
questions.any? && questions.all?(&:valid_max_selection?)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
116
|
# Public: Gets the voting period status of the election
|
|
@@ -21,7 +21,7 @@ module Decidim
|
|
|
21
21
|
|
|
22
22
|
enum status: [:init_data, :creating_data, :data_created, :generating_codes, :codes_generated, :exporting_codes, :freeze]
|
|
23
23
|
|
|
24
|
-
validates :
|
|
24
|
+
validates :filename, presence: true
|
|
25
25
|
|
|
26
26
|
alias participatory_space voting
|
|
27
27
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* Fallback for non-handled failed promises */
|
|
2
|
+
window.addEventListener("unhandledrejection", (event) => {
|
|
3
|
+
console.log("broken", event)
|
|
4
|
+
$("#server-failure .tech-info").html(event.reason);
|
|
5
|
+
if (event.reason.toString().indexOf("fetch") === -1) {
|
|
6
|
+
$("#server-failure .communication_error").addClass("hide");
|
|
7
|
+
$("#server-failure .generic_error").removeClass("hide");
|
|
8
|
+
}
|
|
9
|
+
$("#server-failure").foundation("open");
|
|
10
|
+
});
|
|
11
|
+
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable require-jsdoc */
|
|
2
2
|
|
|
3
|
+
// show a message to the user if comunication is lost
|
|
4
|
+
import "src/decidim/elections/broken_promises_handler";
|
|
3
5
|
import { VoteComponent } from "@decidim/decidim-bulletin_board";
|
|
4
6
|
|
|
5
7
|
import * as VotingSchemesDummy from "@decidim/voting_schemes-dummy";
|
|
@@ -46,12 +48,6 @@ export default function setupVoteComponent($voteWrapper) {
|
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
/* Fallback for non-handled failed promises */
|
|
50
|
-
window.addEventListener("unhandledrejection", (event) => {
|
|
51
|
-
$("#server-failure .tech-info").html(event.reason);
|
|
52
|
-
$("#server-failure").foundation("open");
|
|
53
|
-
});
|
|
54
|
-
|
|
55
51
|
window.Decidim = window.Decidim || {};
|
|
56
52
|
window.Decidim.setupVoteComponent = setupVoteComponent;
|
|
57
53
|
|
|
@@ -14,10 +14,23 @@
|
|
|
14
14
|
<% end %>
|
|
15
15
|
</ul>
|
|
16
16
|
|
|
17
|
+
<% if form.needs_census? %>
|
|
18
|
+
<h4><%= t(".census") %></h4>
|
|
19
|
+
<ul class="no-bullet-indented">
|
|
20
|
+
<% form.census_messages.each do |key, value| %>
|
|
21
|
+
<% if form.errors.include?(key) %>
|
|
22
|
+
<li><%= icon "x", class: "text-alert", role: "img", "aria-hidden": true %> <%= form.errors.messages[key][0].html_safe %></li>
|
|
23
|
+
<% else %>
|
|
24
|
+
<li><%= icon "check", class: "text-success", role: "img", "aria-hidden": true %> <%= value.html_safe %></li>
|
|
25
|
+
<% end %>
|
|
26
|
+
<% end %>
|
|
27
|
+
</ul>
|
|
28
|
+
<% end %>
|
|
29
|
+
|
|
17
30
|
<h4><%= t(".trustees") %></h4>
|
|
18
31
|
<ul class="no-bullet-indented">
|
|
19
32
|
<% if form.participatory_space_trustees.none? %>
|
|
20
|
-
<li><%= t(".no_trustees") %></li>
|
|
33
|
+
<li><%= icon "x", class: "text-alert", role: "img", "aria-hidden": true %> <%= t(".no_trustees") %></li>
|
|
21
34
|
<% end %>
|
|
22
35
|
|
|
23
36
|
<% form.participatory_space_trustees.map {|trustee| [trustee, form.trustees.none? || form.trustees.include?(trustee)] }
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
+
<% i18n_scope ||= "decidim.elections.connection.failed" %>
|
|
2
|
+
|
|
1
3
|
<div class="reveal" id="server-failure" data-reveal>
|
|
2
4
|
<div class="reveal__header">
|
|
3
5
|
<h3 class="reveal__title">
|
|
4
|
-
<%= t("modal.title", scope:
|
|
6
|
+
<%= t("modal.title", scope: i18n_scope) %>
|
|
5
7
|
</h3>
|
|
6
8
|
|
|
7
|
-
<button class="close-button" data-close aria-label="<%= t("modal.close", scope:
|
|
9
|
+
<button class="close-button" data-close aria-label="<%= t("modal.close", scope: i18n_scope) %>"
|
|
8
10
|
type="button">
|
|
9
11
|
<span aria-hidden="true">×</span>
|
|
10
12
|
</button>
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
15
|
<div class="row">
|
|
14
|
-
<p>
|
|
15
|
-
<%= t("modal.communication_lost", scope:
|
|
16
|
+
<p class="communication_error">
|
|
17
|
+
<%= t("modal.communication_lost", scope: i18n_scope).html_safe %>
|
|
18
|
+
</p>
|
|
19
|
+
<p class="generic_error hide">
|
|
20
|
+
<%= t("modal.generic_error", scope: i18n_scope).html_safe %>
|
|
16
21
|
</p>
|
|
17
22
|
|
|
18
23
|
<p class="help-text tech-info"></p>
|
|
@@ -21,7 +26,7 @@
|
|
|
21
26
|
<div class="row">
|
|
22
27
|
<div class="column flex-center">
|
|
23
28
|
<button class="button primary expanded" data-close type="button">
|
|
24
|
-
<%= t("modal.close", scope:
|
|
29
|
+
<%= t("modal.close", scope: i18n_scope) %>
|
|
25
30
|
</button>
|
|
26
31
|
</div>
|
|
27
32
|
</div>
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
<%= form_tag election_vote_path(election, id: vote.encrypted_vote_hash), method: :patch, class: "update_vote_status" %>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
+
<%= render "decidim/elections/shared/broken_promises_modal" %>
|
|
26
|
+
|
|
25
27
|
<% content_for :js_content do %>
|
|
26
28
|
<%= javascript_pack_tag "decidim_elections_voter_casting_vote" %>
|
|
27
29
|
<% end %>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
scope: "decidim.votings.census.admin.census",
|
|
5
5
|
processed_count: current_census.csv_row_processed_count,
|
|
6
6
|
raw_count: current_census.csv_row_raw_count,
|
|
7
|
-
file: current_census.
|
|
7
|
+
file: current_census.filename)}" %>
|
|
8
8
|
|
|
9
9
|
<%= cell("decidim/announcement", info_message, callout_class: "warning") %>
|
|
10
10
|
</div>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<div class="card-section" id="census-creating-data-wrapper" data-update-status-url="<%= admin_status_voting_census_path %>">
|
|
2
|
-
<%= cell("decidim/announcement", "<span class='loading-spinner'></span> #{t("exporting_access_codes.info_message", scope: "decidim.votings.census.admin.census")}", callout_class: "warning") %>
|
|
2
|
+
<%= cell("decidim/announcement", "<span class='loading-spinner'></span> #{t("exporting_access_codes.info_message", scope: "decidim.votings.census.admin.census", email: user_email)}", callout_class: "warning") %>
|
|
3
3
|
</div>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
<div class="card-section">
|
|
2
2
|
<%= cell("decidim/announcement", t("freeze.callout", scope: "decidim.votings.census.admin.census", email: user_email), callout_class: "warning" ) %>
|
|
3
|
+
|
|
4
|
+
<p><%= t("freeze.help_html", scope: "decidim.votings.census.admin.census") %></p>
|
|
3
5
|
</div>
|
|
@@ -3,23 +3,33 @@
|
|
|
3
3
|
scope: "decidim.votings.census.admin.census",
|
|
4
4
|
data_count: current_census.data.size,
|
|
5
5
|
raw_count: current_census.csv_row_raw_count,
|
|
6
|
-
file: current_census.
|
|
6
|
+
file: current_census.filename) %>
|
|
7
7
|
<% callout_class = "warning" %>
|
|
8
8
|
<% else %>
|
|
9
9
|
<% info_message = t("generate_access_codes.info_message_all",
|
|
10
10
|
scope: "decidim.votings.census.admin.census",
|
|
11
11
|
data_count: current_census.data.size,
|
|
12
12
|
raw_count: current_census.csv_row_raw_count,
|
|
13
|
-
file: current_census.
|
|
13
|
+
file: current_census.filename) %>
|
|
14
14
|
<% callout_class = "success" %>
|
|
15
15
|
<% end %>
|
|
16
16
|
|
|
17
17
|
<div class="card-section">
|
|
18
18
|
<%= cell("decidim/announcement", info_message, callout_class: callout_class ) %>
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
<% if current_census.data.size.zero? %>
|
|
21
|
+
<%= cell("decidim/announcement", t("generate_access_codes.start_over", scope: "decidim.votings.census.admin.census"), callout_class: "warning" ) %>
|
|
22
|
+
<%= link_to t("delete.button", scope: "decidim.votings.census.admin.census"),
|
|
23
|
+
admin_voting_census_path,
|
|
24
|
+
class: "button alert destroy",
|
|
25
|
+
method: :delete,
|
|
26
|
+
data: { confirm: t("delete.confirm", scope: "decidim.votings.census.admin.census") } %>
|
|
27
|
+
|
|
28
|
+
<% else %>
|
|
29
|
+
<%= cell("decidim/announcement", t("generate_access_codes.callout", scope: "decidim.votings.census.admin.census"), callout_class: "warning" ) %>
|
|
30
|
+
<%= link_to t("generate_access_codes.button", scope: "decidim.votings.census.admin.census"),
|
|
22
31
|
generate_access_codes_path,
|
|
23
32
|
class: "button",
|
|
24
33
|
data: { confirm: t("generate_access_codes.confirm", scope: "decidim.votings.census.admin.census") } %>
|
|
34
|
+
<% end %>
|
|
25
35
|
</div>
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
<%= form_tag polling_officer_election_in_person_vote_path(polling_officer, election, in_person_vote), method: :patch, class: "update_vote_status" %>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
+
<%= render "decidim/elections/shared/broken_promises_modal" %>
|
|
26
|
+
|
|
25
27
|
<% content_for :js_content do %>
|
|
26
28
|
<%= javascript_pack_tag "decidim_votings_in_person_vote" %>
|
|
27
29
|
<% end %>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
<div class="columns mediumlarge-8 large-6 card--process__column">
|
|
15
15
|
<div class="card--full__image"
|
|
16
|
-
style="background-image:url(<%= promoted_voting.attached_uploader(:banner_image).path %>)">
|
|
16
|
+
style="background-image:url('<%= promoted_voting.attached_uploader(:banner_image).path %>')">
|
|
17
17
|
<div class="card__content row collapse">
|
|
18
18
|
<div class="large-6 large-offset-6 columns">
|
|
19
19
|
<%= link_to voting_path(promoted_voting), class: "button expanded button--sc" do %>
|
data/config/locales/am-ET.yml
CHANGED