decidim-elections 0.31.0.rc1 → 0.31.0
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/elections/election_card_metadata_cell.rb +2 -3
- data/app/helpers/decidim/elections/admin/elections_helper.rb +1 -6
- data/app/helpers/decidim/elections/application_helper.rb +12 -0
- data/app/helpers/decidim/elections/label_helper.rb +25 -0
- data/app/packs/entrypoints/decidim_elections.scss +0 -1
- data/app/packs/entrypoints/decidim_elections_admin.scss +0 -1
- data/app/packs/stylesheets/decidim/elections/elections.scss +4 -0
- data/app/views/decidim/elections/admin/census/edit.html.erb +23 -16
- data/app/views/decidim/elections/admin/dashboard/_calendar.html.erb +10 -6
- data/app/views/decidim/elections/admin/dashboard/_questions.html.erb +1 -0
- data/app/views/decidim/elections/admin/dashboard/_questions_with_results.html.erb +1 -0
- data/app/views/decidim/elections/admin/elections/_form.html.erb +2 -2
- data/app/views/decidim/elections/admin/elections/dashboard.html.erb +27 -15
- data/app/views/decidim/elections/admin/elections/edit.html.erb +13 -3
- data/app/views/decidim/elections/admin/elections/new.html.erb +10 -5
- data/app/views/decidim/elections/admin/questions/_form.html.erb +30 -1
- data/app/views/decidim/elections/admin/questions/_question.html.erb +0 -10
- data/app/views/decidim/elections/admin/questions/edit_questions.html.erb +15 -8
- data/app/views/decidim/elections/per_question_votes/show.html.erb +4 -1
- data/app/views/decidim/elections/votes/show.html.erb +4 -1
- data/config/locales/ca-IT.yml +2 -3
- data/config/locales/ca.yml +2 -3
- data/config/locales/cs.yml +51 -0
- data/config/locales/en.yml +0 -1
- data/config/locales/es-MX.yml +0 -1
- data/config/locales/es-PY.yml +0 -1
- data/config/locales/es.yml +1 -2
- data/config/locales/eu.yml +1 -2
- data/config/locales/fi-plain.yml +0 -1
- data/config/locales/fi.yml +0 -1
- data/config/locales/fr-CA.yml +12 -0
- data/config/locales/fr.yml +12 -0
- data/config/locales/ja.yml +64 -1
- data/config/locales/sv.yml +0 -1
- data/lib/decidim/elections/engine.rb +6 -0
- data/lib/decidim/elections/test/per_question_vote_examples.rb +9 -0
- data/lib/decidim/elections/test/vote_examples.rb +2 -0
- data/lib/decidim/elections/version.rb +1 -1
- metadata +15 -15
- data/app/packs/stylesheets/decidim/elections/labels.scss +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ec49644173bf7e80079c7743d7eb81ba6ba300a744c1001b1175315bd150d8e
|
|
4
|
+
data.tar.gz: 2ed772499e951961cc6cd12efad4df11ad9afb0b54879458674bbb4bcd2221f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60d40111642b60f26d17c7b32fe0d6f5a03853634c3e24224762e24682ec02234cff2e1f7e2654577a9f8f743df6a1feeb795556a27d49389a50111f442ddf33
|
|
7
|
+
data.tar.gz: 6a02d692108948fab7732182a94a36c0b49b01cd069be61ed744d05717e43073000107280020724c4b684e3cc067a6bd10871ce646cc874b820a1b52ce9da937
|
|
@@ -6,6 +6,7 @@ module Decidim
|
|
|
6
6
|
class ElectionCardMetadataCell < Decidim::CardMetadataCell
|
|
7
7
|
include Decidim::LayoutHelper
|
|
8
8
|
include ActionView::Helpers::DateHelper
|
|
9
|
+
include Decidim::Elections::LabelHelper
|
|
9
10
|
|
|
10
11
|
alias election model
|
|
11
12
|
|
|
@@ -22,9 +23,7 @@ module Decidim
|
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
def label
|
|
25
|
-
{
|
|
26
|
-
text: content_tag("span", t(election.status, scope: "decidim.elections.status"), class: "#{election.status} label")
|
|
27
|
-
}
|
|
26
|
+
{ text: election_status_with_label(election) }
|
|
28
27
|
end
|
|
29
28
|
|
|
30
29
|
def current_date
|
|
@@ -5,6 +5,7 @@ module Decidim
|
|
|
5
5
|
module Admin
|
|
6
6
|
module ElectionsHelper
|
|
7
7
|
include Decidim::ApplicationHelper
|
|
8
|
+
include Decidim::Elections::LabelHelper
|
|
8
9
|
|
|
9
10
|
def census_count(election)
|
|
10
11
|
election.census&.count(election).to_i
|
|
@@ -24,12 +25,6 @@ module Decidim
|
|
|
24
25
|
election.census.user_presenter.constantize.new(user)
|
|
25
26
|
end
|
|
26
27
|
|
|
27
|
-
def election_status_with_label(election)
|
|
28
|
-
content_tag(:span,
|
|
29
|
-
I18n.t("decidim.elections.status.#{election.status}"),
|
|
30
|
-
class: "#{election.status} label")
|
|
31
|
-
end
|
|
32
|
-
|
|
33
28
|
def election_status_action_data(election)
|
|
34
29
|
if election.scheduled? && election.manual_start?
|
|
35
30
|
{
|
|
@@ -43,6 +43,18 @@ module Decidim
|
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
def render_question_description(question)
|
|
47
|
+
description = translated_attribute(question.description)
|
|
48
|
+
return if description.blank?
|
|
49
|
+
|
|
50
|
+
sanitized = decidim_sanitize_admin(description)
|
|
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
|
|
56
|
+
end
|
|
57
|
+
|
|
46
58
|
def selected_response_option_id(question)
|
|
47
59
|
session.dig(:votes_buffer, question.id.to_s, "response_option_id")&.to_i
|
|
48
60
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Decidim
|
|
4
|
+
module Elections
|
|
5
|
+
# Helpers to render the states as labels on Elections (ongoing, finished, unpublished)
|
|
6
|
+
module LabelHelper
|
|
7
|
+
def election_status_with_label(election)
|
|
8
|
+
css_class = case election.status
|
|
9
|
+
when :ongoing
|
|
10
|
+
"warning"
|
|
11
|
+
when :finished
|
|
12
|
+
"success"
|
|
13
|
+
when :unpublished
|
|
14
|
+
"alert"
|
|
15
|
+
else
|
|
16
|
+
"reverse"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
content_tag(:span,
|
|
20
|
+
I18n.t("decidim.elections.status.#{election.status}"),
|
|
21
|
+
class: "#{css_class} label")
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -1,33 +1,40 @@
|
|
|
1
1
|
<%= append_javascript_pack_tag "decidim_elections_admin" %>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<%= button_tag t("save", scope: "decidim.elections.admin.elections.form"), class: "main-tabs-menu__cta-button #{"hide" unless election.census}", form: "census-election-form" %>
|
|
5
|
-
<% end %>
|
|
6
|
-
|
|
7
|
-
<div class="item_show__header form-defaults">
|
|
3
|
+
<div class="item_show__header form-defaults border-none">
|
|
8
4
|
<h1 class="item_show__header-title">
|
|
9
|
-
<%= t(".
|
|
5
|
+
<%= t("decidim.elections.actions.edit") %>
|
|
10
6
|
</h1>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<%= render "decidim/elections/admin/elections/tabs_menu" %>
|
|
10
|
+
|
|
11
|
+
<div class="form-defaults my-8 flex justify-end">
|
|
11
12
|
<%= select_tag "census_manifest",
|
|
12
13
|
options_for_select(census_manifests.to_h { |manifest| [manifest.label, manifest.name] }, selected: election.census&.name),
|
|
13
14
|
include_blank: t(".choose_census"),
|
|
14
15
|
id: "census-manifest-selector" %>
|
|
15
|
-
|
|
16
16
|
</div>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
|
|
18
|
+
<% if election.census_ready? %>
|
|
19
|
+
<%
|
|
20
|
+
census_ready = t("decidim.elections.censuses.census_ready_html", election_title: decidim_sanitize_translated(election.title))
|
|
21
|
+
census_count = t("decidim.elections.censuses.census_size_html", count: census_count(election))
|
|
22
|
+
%>
|
|
22
23
|
<%= cell "decidim/announcement", "#{census_ready}<br>#{census_count}", callout_class: "success" %>
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
<% end %>
|
|
25
|
+
|
|
26
|
+
<div class="card-section census-form form-defaults 2xl:mr-80">
|
|
25
27
|
<% if @form && election.census&.admin_form_partial %>
|
|
26
28
|
<%= decidim_form_for(@form, url: election_census_path(election, manifest: election.census&.name), method: :patch, multipart: true, html: { id: "census-election-form" }) do |f| %>
|
|
27
29
|
<%= render partial: election.census.admin_form_partial, locals: { form: f } %>
|
|
28
30
|
<% end %>
|
|
29
31
|
<% end %>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
<%= render partial: "decidim/elections/admin/census/preview", locals: { election: } if preview_users(election).present? %>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="item__edit-sticky">
|
|
37
|
+
<div class="item__edit-sticky-container">
|
|
38
|
+
<%= button_tag t("save", scope: "decidim.elections.admin.elections.form"), class: "button button__sm button__secondary #{"hide" unless election.census}", form: "census-election-form" %>
|
|
32
39
|
</div>
|
|
33
40
|
</div>
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
<div class="card-divider">
|
|
3
3
|
<h2 class="card-title justify-between">
|
|
4
4
|
<span class="text-black font-bold"><%= t("decidim.elections.admin.dashboard.calendar.title") %></span>
|
|
5
|
-
<% if (action_data = election_status_action_data(election)) %>
|
|
6
|
-
<%= form_with url: update_status_election_path(election), method: :put, local: true do %>
|
|
7
|
-
<%= hidden_field_tag :status_action, action_data[:status_action] %>
|
|
8
|
-
<%= button_tag action_data[:label], class: "button button__xs button__secondary small" %>
|
|
9
|
-
<% end %>
|
|
10
|
-
<% end %>
|
|
11
5
|
</h2>
|
|
12
6
|
</div>
|
|
13
7
|
|
|
@@ -30,3 +24,13 @@
|
|
|
30
24
|
</div>
|
|
31
25
|
</div>
|
|
32
26
|
</div>
|
|
27
|
+
<div class="item__edit-sticky">
|
|
28
|
+
<div class="item__edit-sticky-container">
|
|
29
|
+
<% if (action_data = election_status_action_data(election)) %>
|
|
30
|
+
<%= form_with url: update_status_election_path(election), method: :put, local: true do %>
|
|
31
|
+
<%= hidden_field_tag :status_action, action_data[:status_action] %>
|
|
32
|
+
<%= button_tag action_data[:label], class: "button button__sm button__secondary" %>
|
|
33
|
+
<% end %>
|
|
34
|
+
<% end %>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
<%= translated_attribute(question.body) %>
|
|
20
20
|
<small class="font-normal ml-4"><%= t("decidim.forms.question_types.#{question.question_type}") %></small>
|
|
21
21
|
</h3>
|
|
22
|
+
<div><%= decidim_sanitize_admin translated_attribute(question.description) %></div>
|
|
22
23
|
<h3 class="h6 mt-4 mb-2"><%= t("decidim.elections.admin.dashboard.questions.labels.answers") %>:</h3>
|
|
23
24
|
<ul>
|
|
24
25
|
<% question.response_options.each_with_index do |option, opt_index| %>
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
<div class="row column election-fields--time">
|
|
56
56
|
<div class="md:flex w-100">
|
|
57
57
|
<div class="row column election_start_time">
|
|
58
|
-
<%= form.datetime_field :start_at, label: t("decidim.elections.admin.elections.form.start_at") %>
|
|
58
|
+
<%= form.datetime_field :start_at, label: t("decidim.elections.admin.elections.form.start_at"), disabled: disable_fields %>
|
|
59
59
|
<%= form.hidden_field :start_at, value: election.start_at if disable_fields %>
|
|
60
60
|
</div>
|
|
61
61
|
<div class="row column">
|
|
62
|
-
<%= form.datetime_field :end_at, label: t("decidim.elections.admin.elections.form.end_at") %>
|
|
62
|
+
<%= form.datetime_field :end_at, label: t("decidim.elections.admin.elections.form.end_at"), disabled: disable_fields %>
|
|
63
63
|
<%= form.hidden_field :end_at, value: election.end_at if disable_fields %>
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
@@ -3,27 +3,24 @@
|
|
|
3
3
|
<% append_javascript_pack_tag "decidim_elections_admin" %>
|
|
4
4
|
<% append_stylesheet_pack_tag "decidim_elections_admin" %>
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
<div class="item_show__header" style="border-bottom: none;">
|
|
7
|
+
<h1 class="item_show__header-title">
|
|
8
|
+
<%= t("decidim.elections.actions.edit") %>
|
|
9
|
+
</h1>
|
|
10
|
+
|
|
7
11
|
<div>
|
|
8
|
-
|
|
9
|
-
<%=
|
|
10
|
-
method: :put,
|
|
11
|
-
class: "button button__xs button__secondary",
|
|
12
|
-
data: { confirm: t("publish_confirm", scope: "decidim.elections.admin.dashboard") } do %>
|
|
13
|
-
<%= icon "check-line" %>
|
|
14
|
-
<%= t("publish", scope: "decidim.elections.admin.elections.form") %>
|
|
15
|
-
<% end %>
|
|
16
|
-
<% end %>
|
|
17
|
-
<%= link_to resource_locator(election).path, class: "button button__xs button__transparent-secondary", target: :blank, data: { "external-link": false } do %>
|
|
18
|
-
<%= icon "eye-line" %>
|
|
12
|
+
<%= link_to resource_locator(election).path, class: "button button__xs button__transparent-secondary flex flex-row items-center gap-2", target: :blank, data: { "external-link": false } do %>
|
|
13
|
+
<%= icon "eye-line", class: "inline-block" %>
|
|
19
14
|
<%# i18n-tasks-use t("decidim.elections.actions.view") %>
|
|
20
15
|
<%# i18n-tasks-use t("decidim.elections.actions.preview") %>
|
|
21
|
-
|
|
16
|
+
<span class="whitespace-nowrap"><%= t(election.published? ? "view" : "preview", scope: "decidim.elections.actions") %></span>
|
|
22
17
|
<% end %>
|
|
23
18
|
</div>
|
|
24
|
-
|
|
19
|
+
</div>
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
<%= render "decidim/elections/admin/elections/tabs_menu" %>
|
|
22
|
+
|
|
23
|
+
<div class="item__edit-form 2xl:mr-80">
|
|
27
24
|
<% if election.published? %>
|
|
28
25
|
<div class="flex flex-col md:flex-row gap-4 w-full mb-10">
|
|
29
26
|
<div class="flex-1"><%= render partial: "decidim/elections/admin/dashboard/status" %></div>
|
|
@@ -37,3 +34,18 @@
|
|
|
37
34
|
<%= render partial: "decidim/elections/admin/dashboard/census" %>
|
|
38
35
|
<% end %>
|
|
39
36
|
</div>
|
|
37
|
+
<% unless election.published? %>
|
|
38
|
+
<div class="item__edit-sticky">
|
|
39
|
+
<div class="item__edit-sticky-container">
|
|
40
|
+
<% if allowed_to?(:publish, :election, election:) %>
|
|
41
|
+
<%= link_to publish_election_path(election),
|
|
42
|
+
method: :put,
|
|
43
|
+
class: "button button__sm button__secondary",
|
|
44
|
+
data: { confirm: t("publish_confirm", scope: "decidim.elections.admin.dashboard") } do %>
|
|
45
|
+
<%= icon "check-line" %>
|
|
46
|
+
<%= t("publish", scope: "decidim.elections.admin.elections.form") %>
|
|
47
|
+
<% end %>
|
|
48
|
+
<% end %>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<% end %>
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
<% append_javascript_pack_tag "decidim_elections_admin" %>
|
|
4
4
|
<% append_stylesheet_pack_tag "decidim_elections_admin" %>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
<div class="item_show__header" style="border-bottom: none;">
|
|
7
|
+
<h1 class="item_show__header-title">
|
|
8
|
+
<%= t(".title") %>
|
|
9
|
+
</h1>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<%= render "decidim/elections/admin/elections/tabs_menu" %>
|
|
9
13
|
|
|
10
14
|
<div class="item__edit item__edit-1col">
|
|
11
15
|
<div class="item__edit-form">
|
|
@@ -13,4 +17,10 @@
|
|
|
13
17
|
<%= render partial: "form", object: f %>
|
|
14
18
|
<% end %>
|
|
15
19
|
</div>
|
|
20
|
+
|
|
21
|
+
<div class="item__edit-sticky">
|
|
22
|
+
<div class="item__edit-sticky-container">
|
|
23
|
+
<%= button_tag t("save", scope: "decidim.elections.admin.elections.form"), class: "button button__sm button__secondary", form: "basic-election-form-edit" %>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
16
26
|
</div>
|
|
@@ -3,19 +3,24 @@
|
|
|
3
3
|
<% append_javascript_pack_tag "decidim_elections_admin" %>
|
|
4
4
|
<% append_stylesheet_pack_tag "decidim_elections_admin" %>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
<%= button_tag t("save", scope: "decidim.elections.admin.elections.form"), class: "main-tabs-menu__cta-button", form: "basic-election-form-new" %>
|
|
8
|
-
<% end %>
|
|
9
|
-
|
|
10
|
-
<div class="item_show__header">
|
|
6
|
+
<div class="item_show__header border-none">
|
|
11
7
|
<h1 class="item_show__header-title">
|
|
12
8
|
<%= t(".title") %>
|
|
13
9
|
</h1>
|
|
14
10
|
</div>
|
|
11
|
+
|
|
12
|
+
<%= render "decidim/elections/admin/elections/tabs_menu" %>
|
|
13
|
+
|
|
15
14
|
<div class="item__edit item__edit-1col">
|
|
16
15
|
<div class="item__edit-form">
|
|
17
16
|
<%= decidim_form_for(@form, html: { id: "basic-election-form-new", class: "form-defaults form new_election" }) do |f| %>
|
|
18
17
|
<%= render partial: "form", object: f %>
|
|
19
18
|
<% end %>
|
|
19
|
+
|
|
20
|
+
<div class="item__edit-sticky">
|
|
21
|
+
<div class="item__edit-sticky-container">
|
|
22
|
+
<%= button_tag t("save", scope: "decidim.elections.admin.elections.form"), class: "button button__sm button__secondary", form: "basic-election-form-new" %>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
20
25
|
</div>
|
|
21
26
|
</div>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<%= render "decidim/elections/admin/questions/response_option_template", form: question_form, editable: true, template_id: "response-option-template-dummy" %>
|
|
17
17
|
<% end %>
|
|
18
18
|
|
|
19
|
-
<div class="questionnaire-questions-list flex flex-col py-6 gap-6 last:pb-0">
|
|
19
|
+
<div class="questionnaire-questions-list flex flex-col py-6 gap-6 last:pb-0" data-draggable-table data-sort-url="#" id="questionnaire-questions-list">
|
|
20
20
|
<% @form.questions.each_with_index do |question, index| %>
|
|
21
21
|
<%= fields_for "questions[]", question do |question_form| %>
|
|
22
22
|
<%= render "decidim/elections/admin/questions/question",
|
|
@@ -35,5 +35,34 @@
|
|
|
35
35
|
<script>
|
|
36
36
|
document.addEventListener("turbo:load", function () {
|
|
37
37
|
window.Decidim.createEditableForm();
|
|
38
|
+
|
|
39
|
+
// Function to initialize the sortable functionality
|
|
40
|
+
function initializeSortable() {
|
|
41
|
+
const container = document.querySelector("#questionnaire-questions-list");
|
|
42
|
+
const questionCards = container?.querySelectorAll(".card.questionnaire-question");
|
|
43
|
+
|
|
44
|
+
if (!container || !questionCards?.length) return;
|
|
45
|
+
|
|
46
|
+
questionCards.forEach(card => {
|
|
47
|
+
card.setAttribute("draggable", "true");
|
|
48
|
+
card.setAttribute("role", "option");
|
|
49
|
+
card.setAttribute("aria-grabbed", "false");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
window.Decidim?.createSortableList?.("#questionnaire-questions-list");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Initialize on load and when new options such as questions etc are added
|
|
56
|
+
initializeSortable();
|
|
57
|
+
|
|
58
|
+
const observer = new MutationObserver(() => {
|
|
59
|
+
clearTimeout(observer.timer);
|
|
60
|
+
observer.timer = setTimeout(initializeSortable, 500);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const container = document.querySelector("#questionnaire-questions-list");
|
|
64
|
+
if (container) {
|
|
65
|
+
observer.observe(container, { childList: true, subtree: true });
|
|
66
|
+
}
|
|
38
67
|
});
|
|
39
68
|
</script>
|
|
@@ -25,16 +25,6 @@
|
|
|
25
25
|
</button>
|
|
26
26
|
|
|
27
27
|
<% if editable %>
|
|
28
|
-
<button class="button button__xs button__transparent-secondary small alert move-up-question button--title">
|
|
29
|
-
<%= icon("arrow-up-line") %>
|
|
30
|
-
<span class="hidden md:block"><%= t("up", scope: "decidim.forms.admin.questionnaires.question") %></span>
|
|
31
|
-
</button>
|
|
32
|
-
|
|
33
|
-
<button class="button button__xs button__transparent-secondary small alert move-down-question button--title">
|
|
34
|
-
<%= icon("arrow-down-line") %>
|
|
35
|
-
<span class="hidden md:block"><%= t("down", scope: "decidim.forms.admin.questionnaires.question") %></span>
|
|
36
|
-
</button>
|
|
37
|
-
|
|
38
28
|
<button class="button button__xs button__transparent-secondary small alert remove-question button--title" data-confirm="<%= t("remove_question_confirm", scope: "decidim.elections.admin.questions.edit_questions") %>">
|
|
39
29
|
<%= icon "delete-bin-line" %>
|
|
40
30
|
<span class="hidden md:block"><%= t("remove", scope: "decidim.forms.admin.questionnaires.question") %></span>
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
|
2
2
|
|
|
3
|
-
<%= render "decidim/elections/admin/elections/tabs_menu" do %>
|
|
4
|
-
<%= button_tag t("save", scope: "decidim.elections.admin.elections.form"), class: "main-tabs-menu__cta-button", form: "questions-election-form" %>
|
|
5
|
-
<% end %>
|
|
6
|
-
|
|
7
3
|
<div class="questionnaire-questions">
|
|
4
|
+
<div class="item_show__header" style="border-bottom: none;">
|
|
5
|
+
<h1 class="item_show__header-title">
|
|
6
|
+
<%= t("decidim.elections.actions.edit") %>
|
|
7
|
+
</h1>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
8
10
|
<div class="row column">
|
|
9
11
|
<%= cell "decidim/announcement", t("decidim.elections.admin.questions.form.form_description") %>
|
|
10
12
|
</div>
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
<%= render "decidim/elections/admin/elections/tabs_menu" %>
|
|
15
|
+
|
|
16
|
+
<div class="grid-cols-1 2xl:mr-80">
|
|
17
|
+
<div class="item__edit-form">
|
|
14
18
|
<%= decidim_form_for(@form, url: update_url, method: :put, html: { id: "questions-election-form", class: "form-defaults form edit_questions" }) do |form| %>
|
|
15
19
|
<%= render partial: "decidim/elections/admin/questions/form", object: form %>
|
|
16
20
|
<% end %>
|
|
17
21
|
|
|
18
|
-
<div class="
|
|
19
|
-
<
|
|
22
|
+
<div class="item__edit-sticky">
|
|
23
|
+
<div class="item__edit-sticky-container">
|
|
24
|
+
<%= button_tag t("save", scope: "decidim.elections.admin.elections.form"), class: "button button__sm button__secondary", form: "questions-election-form" %>
|
|
25
|
+
</div>
|
|
20
26
|
</div>
|
|
21
27
|
</div>
|
|
28
|
+
<button class="button button__sm button__transparent-secondary add-question mt-1"><%= t("add_question", scope: "decidim.forms.admin.questionnaires.form") %></button>
|
|
22
29
|
</div>
|
|
23
30
|
</div>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<%= form_with url: url_for(action: :show, id: question), method: :patch, local: true do %>
|
|
2
|
-
<%= question_title(question, :h1, class: "
|
|
2
|
+
<%= question_title(question, :h1, class: "vote_booth-question_title") %>
|
|
3
|
+
<div class="editor-content">
|
|
4
|
+
<%= render_question_description(question) %>
|
|
5
|
+
</div>
|
|
3
6
|
|
|
4
7
|
<div class="question__response-options mt-4 flex flex-col gap-4">
|
|
5
8
|
<% question.response_options.each do |option| %>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<%= form_with url: url_for(action: :show, id: question), method: :patch, local: true do %>
|
|
2
|
-
<%= question_title(question, :h1, class: "
|
|
2
|
+
<%= question_title(question, :h1, class: "vote_booth-question_title") %>
|
|
3
|
+
<div class="editor-content">
|
|
4
|
+
<%= render_question_description(question) %>
|
|
5
|
+
</div>
|
|
3
6
|
|
|
4
7
|
<div class="question__response-options mt-4 flex flex-col gap-4">
|
|
5
8
|
<% question.response_options.each do |option| %>
|
data/config/locales/ca-IT.yml
CHANGED
|
@@ -22,7 +22,7 @@ ca-IT:
|
|
|
22
22
|
create: Crear
|
|
23
23
|
destroy: Destruir
|
|
24
24
|
update: Actualitzar
|
|
25
|
-
name:
|
|
25
|
+
name: Eleccions
|
|
26
26
|
settings:
|
|
27
27
|
global:
|
|
28
28
|
announcement: Avís
|
|
@@ -45,7 +45,6 @@ ca-IT:
|
|
|
45
45
|
choose_census: Tria el tipus de cens que vols vincular a aquesta elecció
|
|
46
46
|
created_at: Creada el
|
|
47
47
|
identifier: Identificador d'usuària
|
|
48
|
-
title: Tipus de cens
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: La vista prèvia de la llista està limitada a %{count} registre.
|
|
@@ -132,7 +131,7 @@ ca-IT:
|
|
|
132
131
|
save: Desa i continua
|
|
133
132
|
start_at: Dia i hora d'inici
|
|
134
133
|
index:
|
|
135
|
-
title:
|
|
134
|
+
title: Eleccions
|
|
136
135
|
manage_trash:
|
|
137
136
|
title: Eleccions eliminades
|
|
138
137
|
new:
|
data/config/locales/ca.yml
CHANGED
|
@@ -22,7 +22,7 @@ ca:
|
|
|
22
22
|
create: Crear
|
|
23
23
|
destroy: Destruir
|
|
24
24
|
update: Actualitzar
|
|
25
|
-
name:
|
|
25
|
+
name: Eleccions
|
|
26
26
|
settings:
|
|
27
27
|
global:
|
|
28
28
|
announcement: Avís
|
|
@@ -45,7 +45,6 @@ ca:
|
|
|
45
45
|
choose_census: Tria el tipus de cens que vols vincular a aquesta elecció
|
|
46
46
|
created_at: Creada el
|
|
47
47
|
identifier: Identificador d'usuària
|
|
48
|
-
title: Tipus de cens
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: La vista prèvia de la llista està limitada a %{count} registre.
|
|
@@ -132,7 +131,7 @@ ca:
|
|
|
132
131
|
save: Desa i continua
|
|
133
132
|
start_at: Dia i hora d'inici
|
|
134
133
|
index:
|
|
135
|
-
title:
|
|
134
|
+
title: Eleccions
|
|
136
135
|
manage_trash:
|
|
137
136
|
title: Eleccions eliminades
|
|
138
137
|
new:
|
data/config/locales/cs.yml
CHANGED
|
@@ -8,6 +8,7 @@ cs:
|
|
|
8
8
|
admin:
|
|
9
9
|
menu:
|
|
10
10
|
elections_menu:
|
|
11
|
+
basic_elections: Hlavní
|
|
11
12
|
election_census: Seznam obyvatel
|
|
12
13
|
election_dashboard: Ovládací panel
|
|
13
14
|
election_questions: Otázky
|
|
@@ -39,7 +40,11 @@ cs:
|
|
|
39
40
|
dashboard:
|
|
40
41
|
calendar:
|
|
41
42
|
end_at: 'Čas ukončení:'
|
|
43
|
+
end_election: Ukončit volby
|
|
44
|
+
manual_start: Ručně
|
|
45
|
+
published_results_at: Výsledky zveřejněny na
|
|
42
46
|
start_at: 'Čas zahájení:'
|
|
47
|
+
start_election: Zahájit volbu
|
|
43
48
|
title: Kalendář
|
|
44
49
|
census:
|
|
45
50
|
title: Seznam obyvatel
|
|
@@ -55,6 +60,7 @@ cs:
|
|
|
55
60
|
questions:
|
|
56
61
|
labels:
|
|
57
62
|
answers: Odpovědi
|
|
63
|
+
limit_info: Tyto volby mají více otázek. Náhled je omezen na 3 otázky.
|
|
58
64
|
title: Otázky
|
|
59
65
|
questions_table:
|
|
60
66
|
answer: Odpovědi
|
|
@@ -63,6 +69,7 @@ cs:
|
|
|
63
69
|
results:
|
|
64
70
|
not_started: Volba ještě nezačala.
|
|
65
71
|
publish_button: Publikovat výsledky
|
|
72
|
+
start_question_button: Povolit hlasování
|
|
66
73
|
title: Výsledky
|
|
67
74
|
status:
|
|
68
75
|
title: Stav voleb
|
|
@@ -85,7 +92,9 @@ cs:
|
|
|
85
92
|
publish: Publikovat
|
|
86
93
|
results_availability:
|
|
87
94
|
after_end: Po ukončení voleb
|
|
95
|
+
real_time: V reálném čase
|
|
88
96
|
title: Dostupnost výsledků
|
|
97
|
+
save: Uložit a pokračovat
|
|
89
98
|
start_at: Čas zahájení
|
|
90
99
|
index:
|
|
91
100
|
title: Volby
|
|
@@ -119,7 +128,23 @@ cs:
|
|
|
119
128
|
internal_users:
|
|
120
129
|
already_have_an_account?: Již máte účet?
|
|
121
130
|
are_you_new?: Nový účastník?
|
|
131
|
+
sign_in_description: Přihlaste se k hlasování v těchto volbách
|
|
132
|
+
sign_up_description: Vytvořte účet pro hlasování v této volbě
|
|
133
|
+
internal_users_form:
|
|
134
|
+
authorization_options_invalid: Bohužel, i když máte všechna požadovaná oprávnění, některé z nich pro tyto volby neplatí.
|
|
135
|
+
invalid: V těchto volbách nemáte oprávnění volit.
|
|
136
|
+
missing: Vašemu uživateli chybí některá požadovaná autorizace. Zkontrolujte prosím informace a zkuste to znovu.
|
|
137
|
+
resume_with_method: Pokračovat v ověřování pomocí %{name}
|
|
138
|
+
verify_with_method: Ověřit pomocí %{name}
|
|
122
139
|
token_csv:
|
|
140
|
+
example: |
|
|
141
|
+
e-mail;token
|
|
142
|
+
user@example.org;123456
|
|
143
|
+
user2@example.org;ABCXYZ
|
|
144
|
+
info_html: |
|
|
145
|
+
Musí být soubor ve formátu CSV se dvěma sloupci, jedna s e-mailovou adresou a druhá s hodnotou tokenu, který uživatel bude muset představit, aby mohl hlasovat.
|
|
146
|
+
Musí být oddělena středníkem (;)
|
|
147
|
+
label: Neregistrovaní účastníci s tokeny (fixní)
|
|
123
148
|
upload_file: Nahrát soubor
|
|
124
149
|
upload_new_census: Nahrát CSV soubor
|
|
125
150
|
token_csv_form:
|
|
@@ -137,19 +162,26 @@ cs:
|
|
|
137
162
|
other: "%{count} voleb"
|
|
138
163
|
elections:
|
|
139
164
|
empty: Nejsou k dispozici žádné volby.
|
|
165
|
+
empty_filters: Neexistují žádné volby, které by odpovídaly vašim filtrům.
|
|
140
166
|
filters:
|
|
141
167
|
all: Vše
|
|
142
168
|
state: Stav
|
|
143
169
|
state_values:
|
|
144
170
|
finished: Dokončeno
|
|
145
171
|
ongoing: Probíhající
|
|
172
|
+
scheduled: Naplánováno
|
|
146
173
|
orders:
|
|
174
|
+
end_at: Datum ukončení
|
|
175
|
+
label: Seřadit podle
|
|
147
176
|
recent: Nedávné
|
|
177
|
+
start_at: Datum zahájení
|
|
148
178
|
questions:
|
|
149
179
|
title: Volební otázky
|
|
150
180
|
show:
|
|
151
181
|
vote_button: Hlasovat
|
|
152
182
|
vote_results:
|
|
183
|
+
subtitle:
|
|
184
|
+
per_question: Výsledky jsou k dispozici na jednu otázku. Výsledky pro každou otázku můžete vidět po povolení hlasování a po zveřejnění výsledků.
|
|
153
185
|
title: Výsledky
|
|
154
186
|
models:
|
|
155
187
|
election:
|
|
@@ -159,15 +191,34 @@ cs:
|
|
|
159
191
|
start_at: Čas zahájení
|
|
160
192
|
status: Stav
|
|
161
193
|
title: Název
|
|
194
|
+
per_question_votes:
|
|
195
|
+
waiting:
|
|
196
|
+
edit_vote: Upravte svůj hlas
|
|
197
|
+
exit_button: Odejít z čekací místnosti
|
|
198
|
+
title: Čekání na další otázku
|
|
162
199
|
status:
|
|
163
200
|
active: Aktivní
|
|
164
201
|
finished: Dokončeno
|
|
165
202
|
not_started: Nezahájeno
|
|
166
203
|
ongoing: Probíhající
|
|
204
|
+
published_results: Zveřejněné výsledky
|
|
205
|
+
scheduled: Naplánováno
|
|
167
206
|
unpublished: Nezveřejněno
|
|
207
|
+
voting_enabled: Probíhá hlasování
|
|
168
208
|
votes:
|
|
209
|
+
cast:
|
|
210
|
+
invalid: Při odesílání vašeho hlasu došlo k chybě. Zkontrolujte zadané údaje a zkuste to znovu.
|
|
211
|
+
success: Váš hlas byl úspěšně odeslán.
|
|
212
|
+
check_census:
|
|
213
|
+
access: Přístup
|
|
214
|
+
election_not_open: Volby ještě nejsou otevřeny. Zkontrolujte prosím datum a zkuste to znovu.
|
|
215
|
+
failed: Vaši identitu nelze ověřit. Zkontrolujte zadané informace a zkuste to znovu.
|
|
216
|
+
form_title: Ověřte svou identitu
|
|
169
217
|
confirm:
|
|
218
|
+
edit_vote: Upravte svůj hlas
|
|
219
|
+
not_answered: Na tuto otázku jste neodpověděl.
|
|
170
220
|
title: Potvrďte svůj hlas
|
|
221
|
+
not_authorized: V těchto volbách nemáte oprávnění volit.
|
|
171
222
|
question:
|
|
172
223
|
back: Zpět
|
|
173
224
|
next: Další
|
data/config/locales/en.yml
CHANGED
data/config/locales/es-MX.yml
CHANGED
|
@@ -45,7 +45,6 @@ es-MX:
|
|
|
45
45
|
choose_census: Elige el tipo de censo que quieres vincular esta elección
|
|
46
46
|
created_at: Creado el
|
|
47
47
|
identifier: Identificador de usuaria
|
|
48
|
-
title: Tipo de censo
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: La vista previa de la lista está limitada a %{count} registro.
|
data/config/locales/es-PY.yml
CHANGED
|
@@ -45,7 +45,6 @@ es-PY:
|
|
|
45
45
|
choose_census: Elige el tipo de censo que quieres vincular esta elección
|
|
46
46
|
created_at: Creado el
|
|
47
47
|
identifier: Identificador de usuaria
|
|
48
|
-
title: Tipo de censo
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: La vista previa de la lista está limitada a %{count} registro.
|
data/config/locales/es.yml
CHANGED
|
@@ -22,7 +22,7 @@ es:
|
|
|
22
22
|
create: Crear
|
|
23
23
|
destroy: Eliminar
|
|
24
24
|
update: Actualizar
|
|
25
|
-
name:
|
|
25
|
+
name: Elecciones
|
|
26
26
|
settings:
|
|
27
27
|
global:
|
|
28
28
|
announcement: Aviso
|
|
@@ -45,7 +45,6 @@ es:
|
|
|
45
45
|
choose_census: Elige el tipo de censo que quieres vincular esta elección
|
|
46
46
|
created_at: Creado el
|
|
47
47
|
identifier: Identificador de usuaria
|
|
48
|
-
title: Tipo de censo
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: La vista previa de la lista está limitada a %{count} registro.
|
data/config/locales/eu.yml
CHANGED
|
@@ -45,7 +45,6 @@ eu:
|
|
|
45
45
|
choose_census: Hautatu hauteskunde hauetarako erabili nahi duzun errolda-mota
|
|
46
46
|
created_at: Sortze-data
|
|
47
47
|
identifier: Parte-hartzailearen identifikatzailea
|
|
48
|
-
title: Errolda-mota
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: Aurrebistaren zerrenda erregistro batera mugatuta dago.
|
|
@@ -181,7 +180,7 @@ eu:
|
|
|
181
180
|
unpublish: "%{user_name} parte-hartzaileak %{resource_name} hauteskundea despublikatu du %{space_name} espazioan"
|
|
182
181
|
update: "%{user_name} parte-hartzaileak %{resource_name} hauteskundea eguneratu du %{space_name} espazioan"
|
|
183
182
|
question:
|
|
184
|
-
update: "%{user_name} -
|
|
183
|
+
update: "%{user_name} parte-hartzaileak eguneratu ditu %{resource_name} aukerako galderak"
|
|
185
184
|
censuses:
|
|
186
185
|
census_ready_html: Erroldako datuak kargatuta daude eta prest daude % <b>%{election_title}{@eleccion_title}</b> bozketan erabiltzeko.
|
|
187
186
|
census_size_html:
|
data/config/locales/fi-plain.yml
CHANGED
|
@@ -45,7 +45,6 @@ fi-pl:
|
|
|
45
45
|
choose_census: Valitse henkilötietorekisterin tyyppi, jota haluat käyttää tälle vaalille
|
|
46
46
|
created_at: Luonnin ajankohta
|
|
47
47
|
identifier: Käyttäjän tunniste
|
|
48
|
-
title: Henkilötietorekisterin tyyppi
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: Esikatselulista on rajattu %{count} tietueeseen.
|
data/config/locales/fi.yml
CHANGED
|
@@ -45,7 +45,6 @@ fi:
|
|
|
45
45
|
choose_census: Valitse henkilötietorekisterin tyyppi, jota haluat käyttää tälle vaalille
|
|
46
46
|
created_at: Luonnin ajankohta
|
|
47
47
|
identifier: Käyttäjän tunniste
|
|
48
|
-
title: Henkilötietorekisterin tyyppi
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
one: Esikatselulista on rajattu %{count} tietueeseen.
|
data/config/locales/fr-CA.yml
CHANGED
|
@@ -41,8 +41,13 @@ fr-CA:
|
|
|
41
41
|
admin:
|
|
42
42
|
census:
|
|
43
43
|
edit:
|
|
44
|
+
choose_census: Choisissez le type de recensement que vous souhaitez utiliser pour cette élection
|
|
44
45
|
created_at: Créée le
|
|
45
46
|
identifier: Identifiant de l'utilisateur
|
|
47
|
+
preview:
|
|
48
|
+
title:
|
|
49
|
+
one: La liste de prévisualisation est limitée à %{count} enregistrement.
|
|
50
|
+
other: La liste de prévisualisation est limitée à %{count} enregistrements.
|
|
46
51
|
update:
|
|
47
52
|
error: Il y a eu une erreur lors de la génération ou de l'enregistrement du recensement.
|
|
48
53
|
success: Recensement mis à jour avec succès.
|
|
@@ -68,6 +73,7 @@ fr-CA:
|
|
|
68
73
|
publish_button: Publier les résultats
|
|
69
74
|
title: Résultats
|
|
70
75
|
status:
|
|
76
|
+
census: 'Recensement:'
|
|
71
77
|
results_availability:
|
|
72
78
|
after_end: Résultats disponibles après la fin de l'élection
|
|
73
79
|
per_question: Résultats disponibles par question
|
|
@@ -77,6 +83,8 @@ fr-CA:
|
|
|
77
83
|
create:
|
|
78
84
|
invalid: Il y a eu un problème lors de la création de l'élection.
|
|
79
85
|
success: Élection créée avec succès.
|
|
86
|
+
dashboard:
|
|
87
|
+
subtitle: 'Étape finale: éxaminez vos détails. Des modifications peuvent toujours être apportées avant de publier. Une fois publiée, vous serez toujours en mesure de mettre à jour la description de l''élection.'
|
|
80
88
|
edit:
|
|
81
89
|
title: Modifier l'élection
|
|
82
90
|
form:
|
|
@@ -139,6 +147,9 @@ fr-CA:
|
|
|
139
147
|
internal_users:
|
|
140
148
|
already_have_an_account?: Vous avez déjà un compte?
|
|
141
149
|
are_you_new?: Nouveau participant ?
|
|
150
|
+
info_html: |
|
|
151
|
+
Vous pouvez restreindre la participation à l'élection aux participants qui ont une autorisation.<br>
|
|
152
|
+
Notez que les participants devront satisfaire aux autorisations sélectionnées pour voter. Laisser toutes les cases à cocher vides permettra à toute personne enregistrée de voter.
|
|
142
153
|
internal_type_title: Autorisations supplémentaires requises pour voter (facultatif)
|
|
143
154
|
sign_in_description: Connectez-vous pour voter durant cette élection
|
|
144
155
|
sign_up_description: Créer un compte pour voter durant cette élection
|
|
@@ -181,6 +192,7 @@ fr-CA:
|
|
|
181
192
|
state_values:
|
|
182
193
|
finished: Terminées
|
|
183
194
|
ongoing: En cours
|
|
195
|
+
scheduled: Programmé
|
|
184
196
|
orders:
|
|
185
197
|
end_at: Date de fin
|
|
186
198
|
label: Trier par
|
data/config/locales/fr.yml
CHANGED
|
@@ -41,8 +41,13 @@ fr:
|
|
|
41
41
|
admin:
|
|
42
42
|
census:
|
|
43
43
|
edit:
|
|
44
|
+
choose_census: Choisissez le type de recensement que vous souhaitez utiliser pour cette élection
|
|
44
45
|
created_at: Créée le
|
|
45
46
|
identifier: Identifiant de l'utilisateur
|
|
47
|
+
preview:
|
|
48
|
+
title:
|
|
49
|
+
one: La liste de prévisualisation est limitée à %{count} enregistrement.
|
|
50
|
+
other: La liste de prévisualisation est limitée à %{count} enregistrements.
|
|
46
51
|
update:
|
|
47
52
|
error: Il y a eu une erreur lors de la génération ou de l'enregistrement du recensement.
|
|
48
53
|
success: Recensement mis à jour avec succès.
|
|
@@ -68,6 +73,7 @@ fr:
|
|
|
68
73
|
publish_button: Publier les résultats
|
|
69
74
|
title: Résultats
|
|
70
75
|
status:
|
|
76
|
+
census: 'Recensement:'
|
|
71
77
|
results_availability:
|
|
72
78
|
after_end: Résultats disponibles après la fin de l'élection
|
|
73
79
|
per_question: Résultats disponibles par question
|
|
@@ -77,6 +83,8 @@ fr:
|
|
|
77
83
|
create:
|
|
78
84
|
invalid: Il y a eu un problème lors de la création de l'élection.
|
|
79
85
|
success: Élection créée avec succès.
|
|
86
|
+
dashboard:
|
|
87
|
+
subtitle: 'Étape finale: éxaminez vos détails. Des modifications peuvent toujours être apportées avant de publier. Une fois publiée, vous serez toujours en mesure de mettre à jour la description de l''élection.'
|
|
80
88
|
edit:
|
|
81
89
|
title: Modifier l'élection
|
|
82
90
|
form:
|
|
@@ -139,6 +147,9 @@ fr:
|
|
|
139
147
|
internal_users:
|
|
140
148
|
already_have_an_account?: Vous avez déjà un compte?
|
|
141
149
|
are_you_new?: Nouveau participant ?
|
|
150
|
+
info_html: |
|
|
151
|
+
Vous pouvez restreindre la participation à l'élection aux participants qui ont une autorisation.<br>
|
|
152
|
+
Notez que les participants devront satisfaire aux autorisations sélectionnées pour voter. Laisser toutes les cases à cocher vides permettra à toute personne enregistrée de voter.
|
|
142
153
|
internal_type_title: Autorisations supplémentaires requises pour voter (facultatif)
|
|
143
154
|
sign_in_description: Connectez-vous pour voter durant cette élection
|
|
144
155
|
sign_up_description: Créer un compte pour voter durant cette élection
|
|
@@ -181,6 +192,7 @@ fr:
|
|
|
181
192
|
state_values:
|
|
182
193
|
finished: Terminées
|
|
183
194
|
ongoing: En cours
|
|
195
|
+
scheduled: Programmé
|
|
184
196
|
orders:
|
|
185
197
|
end_at: Date de fin
|
|
186
198
|
label: Trier par
|
data/config/locales/ja.yml
CHANGED
|
@@ -45,7 +45,6 @@ ja:
|
|
|
45
45
|
choose_census: この選挙に使用したいセンサスの種類を選択してください
|
|
46
46
|
created_at: 作成日時
|
|
47
47
|
identifier: ユーザーID
|
|
48
|
-
title: センサスの種類
|
|
49
48
|
preview:
|
|
50
49
|
title:
|
|
51
50
|
other: プレビューリストは %{count} レコードに制限されています。
|
|
@@ -105,6 +104,7 @@ ja:
|
|
|
105
104
|
invalid: 選挙の作成中に問題がありました。
|
|
106
105
|
success: 選挙を作成しました。
|
|
107
106
|
dashboard:
|
|
107
|
+
subtitle: '最終ステップ:入力内容を確認してください。公開前に修正を加えることが可能です。公開後も、選挙の説明内容を更新することができます。'
|
|
108
108
|
title: ダッシュボード
|
|
109
109
|
edit:
|
|
110
110
|
title: 選挙を編集
|
|
@@ -184,8 +184,24 @@ ja:
|
|
|
184
184
|
census_size_html:
|
|
185
185
|
other: 現在、 <strong>%{count}</strong> の投票対象者がこの選挙に参加しています(センサスで変更される可能性があります)。
|
|
186
186
|
internal_users:
|
|
187
|
+
already_have_an_account?: すでにアカウントをお持ちですか?
|
|
188
|
+
are_you_new?: 新しい参加者ですか?
|
|
189
|
+
info_html: |
|
|
190
|
+
選挙への参加を、認証済みの参加者のみに限定することができます。<br>
|
|
191
|
+
投票するには、参加者は選択した権限を満たす必要があります。すべてのチェックボックスを空のままにすると、登録済みの全員の投票が可能になります。
|
|
187
192
|
internal_type_title: 投票するための追加の必要な権限 (任意)
|
|
188
193
|
label: 登録済み参加者(動的)
|
|
194
|
+
sign_in_description: この選挙に投票するにはログインしてください
|
|
195
|
+
sign_up_description: この選挙に投票するアカウントを作成する
|
|
196
|
+
internal_users_form:
|
|
197
|
+
authorization_options_invalid: 残念ながら、必要なすべての権限を持っていても、今回の選挙では一部の権限が有効ではありません。
|
|
198
|
+
exit_button: 投票ブースを出る
|
|
199
|
+
invalid: この選挙で投票する権限がありません。
|
|
200
|
+
missing: ユーザーには必要な権限が逃しています。情報を確認してから、もう一度やり直してください。
|
|
201
|
+
not_authorized: '"%{adapter}" 認証が必要な条件に一致しません。'
|
|
202
|
+
not_granted: '"%{adapter}" 認証は許可されていません。'
|
|
203
|
+
resume_with_method: '%{name} で本人確認を再開'
|
|
204
|
+
verify_with_method: '%{name} で本人確認する'
|
|
189
205
|
token_csv:
|
|
190
206
|
example: |
|
|
191
207
|
email;token
|
|
@@ -200,25 +216,44 @@ ja:
|
|
|
200
216
|
upload_new_census: CSVファイルをアップロードする
|
|
201
217
|
token_csv_form:
|
|
202
218
|
email: Eメールアドレス
|
|
219
|
+
email_placeholder: 投票者のメールアドレスを入力してください
|
|
220
|
+
invalid: メールまたはトークンが無効です。詳細を確認して、もう一度お試しください。
|
|
221
|
+
token: トークン
|
|
222
|
+
token_placeholder: 投票者のトークンを入力してください
|
|
203
223
|
elections:
|
|
204
224
|
count:
|
|
205
225
|
elections_count:
|
|
206
226
|
other: "%{count} 選挙"
|
|
227
|
+
elections:
|
|
228
|
+
empty: 利用可能な選挙はありません。
|
|
229
|
+
empty_filters: フィルターに一致する選挙はありません。
|
|
207
230
|
filters:
|
|
208
231
|
all: 全て
|
|
209
232
|
state: ステータス:
|
|
210
233
|
state_values:
|
|
211
234
|
finished: 完了
|
|
212
235
|
ongoing: 進行中
|
|
236
|
+
scheduled: スケジュール済み
|
|
213
237
|
orders:
|
|
238
|
+
end_at: 終了日
|
|
239
|
+
label: ソート順
|
|
214
240
|
recent: 新しい
|
|
241
|
+
start_at: 開始日
|
|
215
242
|
questions:
|
|
243
|
+
subtitle: 'この投票プロセスに関する質問です:'
|
|
216
244
|
title: 選挙の質問
|
|
217
245
|
show:
|
|
246
|
+
active_voting_until: '有効な投票まで: %{end_date}'
|
|
218
247
|
vote_button: 投票
|
|
248
|
+
voted: すでに投票済みです。再度投票することは可能ですが、最後に投票した内容のみが集計対象となります。
|
|
219
249
|
votes_count:
|
|
220
250
|
other: "%{count}票"
|
|
251
|
+
voting_began: '%{start_date} に投票が開始します'
|
|
221
252
|
vote_results:
|
|
253
|
+
subtitle:
|
|
254
|
+
after_end: 選挙は終了しました。結果を確認できます。
|
|
255
|
+
per_question: 結果は質問ごとに確認できます。投票が有効化され、結果が公開されると、各質問の結果を確認できるようになります。
|
|
256
|
+
real_time: 結果はリアルタイムで確認できます。投票が行われている間も結果を閲覧可能です。
|
|
222
257
|
title: 結果
|
|
223
258
|
models:
|
|
224
259
|
election:
|
|
@@ -228,20 +263,48 @@ ja:
|
|
|
228
263
|
start_at: 開始日時
|
|
229
264
|
status: ステータス:
|
|
230
265
|
title: タイトル
|
|
266
|
+
per_question_votes:
|
|
267
|
+
waiting:
|
|
268
|
+
description: 次の質問が利用可能になるまでここでお待ちいただけます。準備が整い次第、自動的に次の質問にリダイレクトされます。
|
|
269
|
+
edit_vote: 投票を編集
|
|
270
|
+
exit_button: 待合室を出る
|
|
271
|
+
title: 次の質問を待っています
|
|
231
272
|
status:
|
|
232
273
|
active: 有効
|
|
233
274
|
finished: 完了
|
|
234
275
|
not_started: 開始前
|
|
235
276
|
ongoing: 進行中
|
|
277
|
+
published_results: 公開結果
|
|
236
278
|
scheduled: スケジュール済み
|
|
237
279
|
unpublished: 未公開
|
|
238
280
|
voting_enabled: 投票中
|
|
239
281
|
votes:
|
|
282
|
+
cast:
|
|
283
|
+
invalid: 投票時に問題が発生しました。入力した情報を確認して、もう一度お試しください。
|
|
284
|
+
success: 投票は正常に行われました。
|
|
285
|
+
check_census:
|
|
286
|
+
access: アクセス
|
|
287
|
+
election_not_open: 選挙はまだ開始されていません。日付を確認してから再度お試しください。
|
|
288
|
+
failed: 本人確認ができませんでした。入力した情報を確認して、もう一度お試しください。
|
|
289
|
+
form_title: 本人確認を行う
|
|
290
|
+
invalid: ユーザーがセンサスに見つかりません。
|
|
240
291
|
confirm:
|
|
292
|
+
cast_vote: 投票
|
|
293
|
+
edit_vote: 投票を編集
|
|
294
|
+
not_answered: この質問に答えていません。
|
|
241
295
|
title: 投票を確定
|
|
296
|
+
not_authorized: あなたはこの選挙に投票する権限がありません。
|
|
242
297
|
question:
|
|
243
298
|
back: 戻る
|
|
299
|
+
cast_vote: 投票
|
|
244
300
|
next: 次へ
|
|
301
|
+
receipt:
|
|
302
|
+
description: 投票期間中はいつでも再投票が可能です。以前の投票結果は新しい投票結果で上書きされます。
|
|
303
|
+
exit_button: 投票ブースを出る
|
|
304
|
+
title: 投票は正常に行われました
|
|
305
|
+
metadata:
|
|
306
|
+
progress:
|
|
307
|
+
published_results: '結果が公開されました: %{end_date}'
|
|
245
308
|
statistics:
|
|
246
309
|
elections_count: 選挙
|
|
247
310
|
layouts:
|
data/config/locales/sv.yml
CHANGED
|
@@ -40,7 +40,6 @@ sv:
|
|
|
40
40
|
choose_census: Välj vilken typ av folkräkning du vill använda för detta val
|
|
41
41
|
created_at: Skapad den
|
|
42
42
|
identifier: Identifierare för användare
|
|
43
|
-
title: Typ av folkräkning
|
|
44
43
|
preview:
|
|
45
44
|
title:
|
|
46
45
|
one: Förhandsgranskningen är begränsad till %{count} post.
|
|
@@ -32,6 +32,12 @@ module Decidim
|
|
|
32
32
|
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Elections::Engine.root}/app/views") # for partials
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
initializer "decidim_elections.data_migrate", after: "decidim_core.data_migrate" do
|
|
36
|
+
DataMigrate.configure do |config|
|
|
37
|
+
config.data_migrations_path << root.join("db/data").to_s
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
35
41
|
initializer "decidim.elections.default_censuses" do |_app|
|
|
36
42
|
Decidim::Elections.census_registry.register(:token_csv) do |manifest|
|
|
37
43
|
manifest.admin_form = "Decidim::Elections::Admin::Censuses::TokenCsvForm"
|
|
@@ -10,6 +10,7 @@ shared_examples "a csv token per question votable election" do
|
|
|
10
10
|
click_on "Access"
|
|
11
11
|
expect(page).to have_current_path(election_vote_path(question1))
|
|
12
12
|
expect(page).to have_content(translated_attribute(question1.body))
|
|
13
|
+
expect(page).to have_content(strip_tags(translated_attribute(question1.description)))
|
|
13
14
|
choose translated_attribute(question1.response_options.first.body)
|
|
14
15
|
click_on "Cast vote"
|
|
15
16
|
expect(page).to have_content("Your vote has been successfully cast.")
|
|
@@ -18,6 +19,7 @@ shared_examples "a csv token per question votable election" do
|
|
|
18
19
|
# wait for javascript to update the page
|
|
19
20
|
sleep 2
|
|
20
21
|
expect(page).to have_current_path(election_vote_path(question2))
|
|
22
|
+
expect(page).to have_content(strip_tags(translated_attribute(question2.description)))
|
|
21
23
|
click_on "Cast vote"
|
|
22
24
|
expect(page).to have_content("There was a problem casting your vote.")
|
|
23
25
|
check translated_attribute(question2.response_options.first.body)
|
|
@@ -52,6 +54,7 @@ shared_examples "a per question votable election" do
|
|
|
52
54
|
expect(page).to have_content(translated_attribute(question1.body))
|
|
53
55
|
expect(page).to have_content(translated_attribute(question2.body))
|
|
54
56
|
click_on "Vote"
|
|
57
|
+
expect(page).to have_content(strip_tags(translated_attribute(question1.description)))
|
|
55
58
|
choose translated_attribute(question1.response_options.first.body)
|
|
56
59
|
click_on "Cast vote"
|
|
57
60
|
expect(page).to have_current_path(waiting_election_votes_path)
|
|
@@ -61,6 +64,7 @@ shared_examples "a per question votable election" do
|
|
|
61
64
|
# wait for javascript to update the page
|
|
62
65
|
sleep 2
|
|
63
66
|
expect(page).to have_current_path(election_vote_path(question2))
|
|
67
|
+
expect(page).to have_content(strip_tags(translated_attribute(question2.description)))
|
|
64
68
|
check translated_attribute(question2.response_options.first.body)
|
|
65
69
|
click_on "Cast vote"
|
|
66
70
|
expect(page).to have_current_path(receipt_election_votes_path)
|
|
@@ -101,6 +105,7 @@ shared_examples "a per question votable election with published results" do
|
|
|
101
105
|
# wait for javascript to update the page
|
|
102
106
|
sleep 2
|
|
103
107
|
expect(page).to have_current_path(election_vote_path(question2))
|
|
108
|
+
expect(page).to have_content(strip_tags(translated_attribute(question2.description)))
|
|
104
109
|
check translated_attribute(question2.response_options.first.body)
|
|
105
110
|
click_on "Cast vote"
|
|
106
111
|
expect(page).to have_current_path(receipt_election_votes_path)
|
|
@@ -137,6 +142,7 @@ shared_examples "a per question votable election with already voted questions" d
|
|
|
137
142
|
expect(page).to have_content(translated_attribute(question2.body))
|
|
138
143
|
expect(page).to have_content(translated_attribute(question3.body))
|
|
139
144
|
click_on "Vote"
|
|
145
|
+
expect(page).to have_content(strip_tags(translated_attribute(question1.description)))
|
|
140
146
|
choose translated_attribute(question1.response_options.first.body)
|
|
141
147
|
click_on "Cast vote"
|
|
142
148
|
check translated_attribute(question2.response_options.first.body)
|
|
@@ -144,10 +150,12 @@ shared_examples "a per question votable election with already voted questions" d
|
|
|
144
150
|
expect(page).to have_current_path(waiting_election_votes_path)
|
|
145
151
|
click_on "Edit your vote"
|
|
146
152
|
expect(page).to have_current_path(election_vote_path(question1))
|
|
153
|
+
expect(page).to have_content(strip_tags(translated_attribute(question1.description)))
|
|
147
154
|
expect(find("input[value='#{question1.response_options.first.id}']")).to be_checked
|
|
148
155
|
choose translated_attribute(question1.response_options.second.body)
|
|
149
156
|
click_on "Cast vote"
|
|
150
157
|
expect(page).to have_current_path(election_vote_path(question2))
|
|
158
|
+
expect(page).to have_content(strip_tags(translated_attribute(question2.description)))
|
|
151
159
|
expect(find("input[value='#{question2.response_options.first.id}']")).to be_checked
|
|
152
160
|
expect(find("input[value='#{question2.response_options.second.id}']")).not_to be_checked
|
|
153
161
|
check translated_attribute(question2.response_options.second.body)
|
|
@@ -156,6 +164,7 @@ shared_examples "a per question votable election with already voted questions" d
|
|
|
156
164
|
question1.update!(published_results_at: Time.current)
|
|
157
165
|
click_on "Edit your vote"
|
|
158
166
|
expect(page).to have_current_path(election_vote_path(question2))
|
|
167
|
+
expect(page).to have_content(strip_tags(translated_attribute(question2.description)))
|
|
159
168
|
question2.update!(published_results_at: Time.current)
|
|
160
169
|
click_on "Cast vote"
|
|
161
170
|
expect(page).to have_current_path(waiting_election_votes_path)
|
|
@@ -22,10 +22,12 @@ end
|
|
|
22
22
|
def fill_in_votes
|
|
23
23
|
expect(page).to have_current_path(election_vote_path(election.questions.first))
|
|
24
24
|
expect(page).to have_content(translated_attribute(election.questions.first.body))
|
|
25
|
+
expect(page).to have_content(strip_tags(translated_attribute(election.questions.first.description)))
|
|
25
26
|
choose translated_attribute(election.questions.first.response_options.first.body)
|
|
26
27
|
click_on "Next"
|
|
27
28
|
expect(page).to have_current_path(election_vote_path(election.questions.second))
|
|
28
29
|
expect(page).to have_content(translated_attribute(election.questions.second.body))
|
|
30
|
+
expect(page).to have_content(strip_tags(translated_attribute(election.questions.second.description)))
|
|
29
31
|
check translated_attribute(election.questions.second.response_options.first.body)
|
|
30
32
|
check translated_attribute(election.questions.second.response_options.second.body)
|
|
31
33
|
click_on "Next"
|
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.0
|
|
4
|
+
version: 0.31.0
|
|
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: 2025-
|
|
11
|
+
date: 2025-11-20 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.0
|
|
19
|
+
version: 0.31.0
|
|
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.0
|
|
26
|
+
version: 0.31.0
|
|
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.0
|
|
33
|
+
version: 0.31.0
|
|
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.0
|
|
40
|
+
version: 0.31.0
|
|
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.0
|
|
47
|
+
version: 0.31.0
|
|
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.0
|
|
54
|
+
version: 0.31.0
|
|
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.0
|
|
61
|
+
version: 0.31.0
|
|
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.0
|
|
68
|
+
version: 0.31.0
|
|
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.0
|
|
75
|
+
version: 0.31.0
|
|
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.0
|
|
82
|
+
version: 0.31.0
|
|
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.0
|
|
89
|
+
version: 0.31.0
|
|
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.0
|
|
96
|
+
version: 0.31.0
|
|
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
|
|
@@ -139,6 +139,7 @@ files:
|
|
|
139
139
|
- app/forms/decidim/elections/censuses/token_csv_form.rb
|
|
140
140
|
- app/helpers/decidim/elections/admin/elections_helper.rb
|
|
141
141
|
- app/helpers/decidim/elections/application_helper.rb
|
|
142
|
+
- app/helpers/decidim/elections/label_helper.rb
|
|
142
143
|
- app/models/decidim/elections/application_record.rb
|
|
143
144
|
- app/models/decidim/elections/csv_census/data.rb
|
|
144
145
|
- app/models/decidim/elections/election.rb
|
|
@@ -156,7 +157,6 @@ files:
|
|
|
156
157
|
- app/packs/src/decidim/elections/live_results_update.js
|
|
157
158
|
- app/packs/src/decidim/elections/waiting_room.js
|
|
158
159
|
- app/packs/stylesheets/decidim/elections/elections.scss
|
|
159
|
-
- app/packs/stylesheets/decidim/elections/labels.scss
|
|
160
160
|
- app/packs/stylesheets/decidim/elections/live_results_update.scss
|
|
161
161
|
- app/permissions/decidim/elections/admin/permissions.rb
|
|
162
162
|
- app/permissions/decidim/elections/permissions.rb
|