decidim-elections 0.25.1 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/elections/election_m_cell.rb +1 -1
  3. data/app/cells/decidim/votings/content_blocks/highlighted_votings_cell.rb +12 -0
  4. data/app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb +1 -1
  5. data/app/cells/decidim/votings/voting_m_cell.rb +1 -1
  6. data/app/commands/decidim/elections/admin/add_user_as_trustee.rb +1 -1
  7. data/app/commands/decidim/elections/admin/report_missing_trustee.rb +68 -0
  8. data/app/commands/decidim/elections/admin/setup_election.rb +1 -1
  9. data/app/commands/decidim/elections/admin/start_tally.rb +1 -1
  10. data/app/commands/decidim/votings/admin/create_ballot_style.rb +8 -5
  11. data/app/commands/decidim/votings/admin/destroy_ballot_style.rb +11 -3
  12. data/app/commands/decidim/votings/admin/update_ballot_style.rb +6 -1
  13. data/app/commands/decidim/votings/census/admin/create_dataset.rb +13 -5
  14. data/app/controllers/concerns/decidim/monitoring_committee_polling_station_closures/admin/filterable.rb +1 -1
  15. data/app/controllers/concerns/decidim/polling_stations/admin/filterable.rb +1 -1
  16. data/app/controllers/decidim/elections/admin/steps_controller.rb +26 -7
  17. data/app/controllers/decidim/votings/admin/ballot_styles_controller.rb +1 -1
  18. data/app/forms/decidim/elections/admin/action_form.rb +4 -0
  19. data/app/forms/decidim/elections/admin/report_missing_trustee_form.rb +22 -0
  20. data/app/forms/decidim/elections/admin/setup_form.rb +4 -0
  21. data/app/models/decidim/elections/action.rb +1 -1
  22. data/app/models/decidim/elections/trustee.rb +4 -0
  23. data/app/models/decidim/votings/ballot_style.rb +6 -0
  24. data/app/models/decidim/votings/census/dataset.rb +2 -0
  25. data/app/models/decidim/votings/monitoring_committee_member.rb +6 -0
  26. data/app/models/decidim/votings/polling_officer.rb +5 -0
  27. data/app/models/decidim/votings/polling_station.rb +6 -0
  28. data/app/packs/entrypoints/decidim_elections_admin_trustees_process.js +1 -0
  29. data/app/packs/src/decidim/elections/admin/pending_action.js +1 -1
  30. data/app/packs/src/decidim/elections/admin/trustees_process.js +125 -0
  31. data/app/packs/src/decidim/elections/election_log.js +89 -73
  32. data/app/packs/src/decidim/elections/trustee/key_ceremony.js +3 -3
  33. data/app/packs/src/decidim/elections/trustee/tally.js +3 -3
  34. data/app/packs/src/decidim/elections/trustee/trustee_zone.js +29 -18
  35. data/app/packs/src/decidim/elections/voter/casting-vote.js +1 -1
  36. data/app/packs/src/decidim/elections/voter/setup-vote.js +5 -5
  37. data/app/packs/src/decidim/elections/voter/verify-vote.js +1 -1
  38. data/app/packs/src/decidim/votings/in-person-vote.js +1 -1
  39. data/app/presenters/decidim/elections/admin_log/election_presenter.rb +34 -9
  40. data/app/presenters/decidim/elections/admin_log/trustee_presenter.rb +50 -0
  41. data/app/presenters/decidim/elections/trustee_presenter.rb +5 -1
  42. data/app/presenters/decidim/votings/admin_log/ballot_style_presenter.rb +35 -0
  43. data/app/presenters/decidim/votings/admin_log/monitoring_committee_member_presenter.rb +50 -0
  44. data/app/presenters/decidim/votings/admin_log/polling_officer_presenter.rb +50 -0
  45. data/app/presenters/decidim/votings/admin_log/polling_station_presenter.rb +29 -0
  46. data/app/presenters/decidim/votings/admin_log/voting_presenter.rb +1 -1
  47. data/app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb +7 -6
  48. data/app/services/decidim/votings/voting_search.rb +2 -2
  49. data/app/views/decidim/elections/admin/steps/_create_election.html.erb +3 -3
  50. data/app/views/decidim/elections/admin/steps/_key_ceremony.html.erb +44 -9
  51. data/app/views/decidim/elections/admin/steps/_tally.html.erb +60 -10
  52. data/app/views/decidim/elections/admin/steps/index.html.erb +17 -15
  53. data/app/views/decidim/elections/elections/_filters_small_view.html.erb +3 -3
  54. data/app/views/decidim/elections/elections/election_log.html.erb +1 -1
  55. data/app/views/decidim/elections/elections/show.html.erb +1 -1
  56. data/app/views/decidim/elections/trustee_zone/elections/show.html.erb +1 -1
  57. data/app/views/decidim/elections/trustee_zone/trustees/show.html.erb +1 -1
  58. data/app/views/decidim/elections/votes/_onboarding_modal.html.erb +1 -1
  59. data/app/views/decidim/elections/votes/_show_casted.html.erb +1 -1
  60. data/app/views/decidim/elections/votes/_show_casting.html.erb +1 -1
  61. data/app/views/decidim/elections/votes/new.html.erb +3 -3
  62. data/app/views/decidim/elections/votes/verify.html.erb +1 -1
  63. data/app/views/decidim/votings/admin/votings/index.html.erb +1 -1
  64. data/app/views/decidim/votings/polling_officer_zone/closures/_modal_ballots_count_error.html.erb +3 -2
  65. data/app/views/decidim/votings/polling_officer_zone/closures/_modal_ballots_results_count_error.html.erb +3 -2
  66. data/app/views/decidim/votings/polling_officer_zone/closures/_sign_form.html.erb +4 -3
  67. data/app/views/decidim/votings/polling_officer_zone/closures/edit.html.erb +1 -1
  68. data/app/views/decidim/votings/polling_officer_zone/closures/new.html.erb +1 -1
  69. data/app/views/decidim/votings/polling_officer_zone/in_person_votes/new.html.erb +1 -1
  70. data/app/views/decidim/votings/polling_officer_zone/in_person_votes/show.html.erb +1 -1
  71. data/app/views/decidim/votings/votings/_filters_small_view.html.erb +3 -3
  72. data/app/views/decidim/votings/votings/_promoted_voting.html.erb +1 -1
  73. data/config/assets.rb +1 -0
  74. data/config/locales/ar.yml +12 -0
  75. data/config/locales/ca.yml +45 -11
  76. data/config/locales/cs.yml +41 -11
  77. data/config/locales/de.yml +0 -13
  78. data/config/locales/en.yml +41 -11
  79. data/config/locales/es-MX.yml +45 -11
  80. data/config/locales/es-PY.yml +45 -11
  81. data/config/locales/es.yml +45 -11
  82. data/config/locales/eu.yml +23 -11
  83. data/config/locales/fi-plain.yml +41 -11
  84. data/config/locales/fi.yml +41 -11
  85. data/config/locales/fr-CA.yml +408 -11
  86. data/config/locales/fr.yml +457 -60
  87. data/config/locales/ga-IE.yml +0 -4
  88. data/config/locales/gl.yml +19 -3
  89. data/config/locales/hu.yml +108 -0
  90. data/config/locales/it.yml +33 -11
  91. data/config/locales/ja.yml +381 -17
  92. data/config/locales/lb-LU.yml +24 -0
  93. data/config/locales/nl.yml +232 -7
  94. data/config/locales/no.yml +498 -1
  95. data/config/locales/pl.yml +6 -11
  96. data/config/locales/pt-BR.yml +1 -14
  97. data/config/locales/pt.yml +40 -9
  98. data/config/locales/ro-RO.yml +57 -12
  99. data/config/locales/sv.yml +104 -6
  100. data/config/locales/tr-TR.yml +4 -9
  101. data/config/locales/val-ES.yml +1 -0
  102. data/config/locales/zh-CN.yml +0 -5
  103. data/lib/decidim/elections/component.rb +2 -1
  104. data/lib/decidim/elections/test/factories.rb +2 -2
  105. data/lib/decidim/elections/version.rb +1 -1
  106. metadata +32 -22
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Votings
5
+ module AdminLog
6
+ # This class holds the logic to present a `Decidim::Votings::Voting`
7
+ # for the `AdminLog` log.
8
+ #
9
+ # Usage should be automatic and you shouldn't need to call this class
10
+ # directly, but here's an example:
11
+ #
12
+ # action_log = Decidim::ActionLog.last
13
+ # view_helpers # => this comes from the views
14
+ # PollingStationPresenter.new(action_log, view_helpers).present
15
+ class PollingStationPresenter < Decidim::Log::BasePresenter
16
+ private
17
+
18
+ def action_string
19
+ case action
20
+ when "create", "delete", "update"
21
+ "decidim.votings.admin_log.polling_station.#{action}"
22
+ else
23
+ super
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -11,7 +11,7 @@ module Decidim
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
14
- # ElectionPresenter.new(action_log, view_helpers).present
14
+ # VotingPresenter.new(action_log, view_helpers).present
15
15
  class VotingPresenter < Decidim::Log::BasePresenter
16
16
  private
17
17
 
@@ -16,12 +16,13 @@ module Decidim
16
16
  class DatasetPresenter < Decidim::Log::BasePresenter
17
17
  private
18
18
 
19
- def i18n_params
20
- {
21
- user_name: user_presenter.present,
22
- resource_name: Dataset.model_name.human,
23
- space_name: space_presenter.present
24
- }
19
+ def action_string
20
+ case action
21
+ when "create", "delete", "update"
22
+ "decidim.votings.admin_log.census.#{action}"
23
+ else
24
+ super
25
+ end
25
26
  end
26
27
  end
27
28
  end
@@ -18,9 +18,9 @@ module Decidim
18
18
  # Handle the search_text filter
19
19
  def search_search_text
20
20
  query
21
- .where("title->>'#{current_locale}' ILIKE ?", "%#{search_text}%")
21
+ .where(Arel.sql("title->>'#{current_locale}' ILIKE ?").to_s, "%#{search_text}%")
22
22
  .or(
23
- query.where("description->>'#{current_locale}' ILIKE ?", "%#{search_text}%")
23
+ query.where(Arel.sql("description->>'#{current_locale}' ILIKE ?").to_s, "%#{search_text}%")
24
24
  )
25
25
  end
26
26
 
@@ -7,9 +7,9 @@
7
7
  <ul class="no-bullet-indented">
8
8
  <% form.messages.each do |key, value| %>
9
9
  <% if form.errors.include?(key) %>
10
- <li><%= icon "x", role: "img", "aria-hidden": true %>&nbsp;<%= form.errors.messages[key][0].html_safe %></li>
10
+ <li><%= icon "x", class: "text-alert", role: "img", "aria-hidden": true %>&nbsp;<%= form.errors.messages[key][0].html_safe %></li>
11
11
  <% else %>
12
- <li><%= icon "check", role: "img", "aria-hidden": true %>&nbsp;<%= value.html_safe %></li>
12
+ <li><%= icon "check", class: "text-success", role: "img", "aria-hidden": true %>&nbsp;<%= value.html_safe %></li>
13
13
  <% end %>
14
14
  <% end %>
15
15
  </ul>
@@ -24,7 +24,7 @@
24
24
  .sort_by {|trustee, used| used ? 0 : 1}
25
25
  .each do |trustee, used| %>
26
26
  <li <%= "class=text-muted" if !used %>>
27
- <%= icon trustee.public_key ? "check" : "x", role: "img", "aria-hidden": true %>
27
+ <%= icon trustee.public_key ? "check" : "x", class: "text-#{trustee.public_key ? "success": "alert"}", role: "img", "aria-hidden": true %>
28
28
  <%= trustee.user.name || trustee.name %> <%= t(".public_key.#{used}").html_safe %>
29
29
  <% if used %>
30
30
  <%= f.hidden_field :trustee_ids, multiple: true, value: trustee.id %>
@@ -3,14 +3,49 @@
3
3
  <h2 class="card-title"><%= t(".title") %></h2>
4
4
  </div>
5
5
 
6
- <div class="card-section">
7
- <h4><%= t(".trustees") %></h4>
8
- <ul>
9
- <% election.trustees.each do |trustee| %>
10
- <li>
11
- <%= trustee.name %>
12
- </li>
13
- <% end %>
14
- </ul>
6
+ <div id="trustees_process" class="card-section"
7
+ data-api-endpoint-url="<%= bulletin_board_server %>"
8
+ data-authority-public-key="<%= authority_public_key %>"
9
+ data-process-type="key_ceremony"
10
+ data-election-unique-id="<%= election_unique_id %>">
11
+ <div class="table-scroll">
12
+ <table class="table-list">
13
+ <thead>
14
+ <tr>
15
+ <th><%= t("models.trustees_participatory_space.fields.name", scope: "decidim.elections") %></th>
16
+ <th><%= t("models.trustees_participatory_space.fields.status", scope: "decidim.elections") %></th>
17
+ <th><%= t("models.trustees_participatory_space.fields.email", scope: "decidim.elections") %></th>
18
+ <th><%= t("models.trustees_participatory_space.fields.public_key", scope: "decidim.elections") %></th>
19
+ <th></th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ <% election.trustees.each do |trustee| %>
24
+ <tr class="trustee loading" data-trustee-id="<%= trustee.id %>" data-trustee-slug="<%= trustee.slug %>">
25
+ <td>
26
+ <%= trustee.name %>
27
+ </td>
28
+ <td>
29
+ <div class="loading"><span class="loading-spinner"></span></div>
30
+ <div class="active hide"><%= icon "task", class: "text-success" %></div>
31
+ </td>
32
+ <td>
33
+ <%= trustee.user.email %>
34
+ </td>
35
+ <td>
36
+ <%= present(trustee).public_key_thumbprint %>
37
+ </td>
38
+ <td></td>
39
+ </tr>
40
+ <% end %>
41
+ </tbody>
42
+ </table>
43
+ </div>
15
44
  </div>
16
45
  </div>
46
+
47
+ <div class="button--double form-general-submit">
48
+ <%= link_to t("steps.key_ceremony.continue", scope: "decidim.elections.admin"), election_steps_path(election), class: "button disabled js-continue-link" %>
49
+ </div>
50
+
51
+ <%= javascript_pack_tag "decidim_elections_admin_trustees_process" %>
@@ -3,15 +3,65 @@
3
3
  <h2 class="card-title"><%= t(".title") %></h2>
4
4
  </div>
5
5
 
6
- <div class="card-section">
7
- <h4><%= t(".trustees") %></h4>
8
- <ul>
9
- <% election.trustees.each do |trustee| %>
10
- <li>
11
- <%= trustee.name %>
12
- </li>
13
- <% end %>
14
- </ul>
15
- </div>
6
+ <div id="trustees_process" class="card-section"
7
+ data-api-endpoint-url="<%= bulletin_board_server %>"
8
+ data-authority-public-key="<%= authority_public_key %>"
9
+ data-process-type="tally"
10
+ data-election-unique-id="<%= election_unique_id %>"
11
+ data-missing-trustees-allowed="<%= missing_trustees_allowed %>"
12
+ data-check-pending-action-path="<%= election_step_path(election, current_step, check_pending_action: 1) %>">
13
+
14
+ <% if missing_trustees_allowed > 0 %>
15
+ <ul>
16
+ <%= content_tag :li, t(".mark_as_missing_description") %>
17
+ <%= content_tag :li, t(".tally_completion", quorum: quorum) %>
18
+ <%= content_tag :li, t(".undo_mark_as_missing") %>
19
+ </ul>
20
+ <% end %>
21
+ <div class="table-scroll">
22
+ <table class="table-list">
23
+ <thead>
24
+ <tr>
25
+ <th><%= t("models.trustees_participatory_space.fields.name", scope: "decidim.elections") %></th>
26
+ <th><%= t("models.trustees_participatory_space.fields.status", scope: "decidim.elections") %></th>
27
+ <th><%= t("models.trustees_participatory_space.fields.email", scope: "decidim.elections") %></th>
28
+ <th><%= t("models.trustees_participatory_space.fields.public_key", scope: "decidim.elections") %></th>
29
+ <th></th>
30
+ </tr>
31
+ </thead>
32
+ <tbody>
33
+ <% election.trustees.each do |trustee| %>
34
+ <tr class="trustee loading" data-trustee-id="<%= trustee.id %>" data-trustee-slug="<%= trustee.slug %>">
35
+ <td>
36
+ <%= trustee.name %>
37
+ </td>
38
+ <td>
39
+ <div class="loading"><span class="loading-spinner"></span></div>
40
+ <div class="active hide"><%= icon "task", class: "text-success" %></div>
41
+ <div class="missing hide"><%= icon "x", class: "text-alert" %></div>
42
+ </td>
43
+ <td>
44
+ <%= trustee.user.email %>
45
+ </td>
46
+ <td>
47
+ <%= present(trustee).public_key_thumbprint %>
48
+ </td>
49
+ <td class="table-list__actions">
50
+ <%= f.button type: :button, formaction: election_step_path(election, current_step, trustee_id: trustee.id),
51
+ class: "button tiny alert hollow hide js-report-missing-trustee" do %>
52
+ <%= icon "circle-x" %> <%= t(".mark_as_missing") %>
53
+ <% end %>
54
+ </td>
55
+ </tr>
56
+ <% end %>
57
+ </tbody>
58
+ </table>
59
+ </div>
16
60
  </div>
17
61
  </div>
62
+
63
+ <div class="button--double form-general-submit">
64
+ <%= link_to t("steps.tally.continue", scope: "decidim.elections.admin"), election_steps_path(election), class: "button disabled js-continue-link" %>
65
+ </div>
66
+
67
+ <%= javascript_pack_tag "decidim_elections_admin_trustees_process" %>
@@ -17,23 +17,25 @@
17
17
  <%= decidim_form_for(@form, url: election_step_path(election, current_step), method: :patch, html: { class: "form step #{current_step}" }) do |f| %>
18
18
  <%= render partial: current_step.to_s, locals: { form: @form, f: f } %>
19
19
 
20
- <div class="button--double form-general-submit">
21
- <%= f.hidden_field :current_step %>
22
- <%= f.button type: :submit, class: "button", disabled: @form.invalid? do %>
23
- <% if @form.pending_action %>
24
- <span class='loading-spinner'></span> <%= t("steps.processing", scope: "decidim.elections.admin") %>
25
- <% else %>
26
- <%= t("steps.#{current_step}.submit", scope: "decidim.elections.admin") %>
27
- <% end %>
28
- <% end %>
29
- </div>
20
+ <%= f.hidden_field :current_step %>
30
21
 
31
- <% if @form.pending_action %>
32
- <div id="pending_action"
33
- data-api-endpoint-url="<%= bulletin_board_server %>"
34
- data-message-id="<%= @form.pending_action.message_id %>"></div>
22
+ <% if @form.main_button? %>
23
+ <div class="button--double form-general-submit">
24
+ <%= f.button type: :submit, class: "button", disabled: @form.invalid? do %>
25
+ <% if @form.pending_action %>
26
+ <span class='loading-spinner'></span> <%= t("steps.processing", scope: "decidim.elections.admin") %>
27
+ <% else %>
28
+ <%= t("steps.#{current_step}.submit", scope: "decidim.elections.admin") %>
29
+ <% end %>
30
+ <% end %>
31
+ </div>
32
+ <% if @form.pending_action %>
33
+ <div id="pending_action"
34
+ data-api-endpoint-url="<%= bulletin_board_server %>"
35
+ data-message-id="<%= @form.pending_action.message_id %>"></div>
35
36
 
36
- <%= javascript_pack_tag "decidim_elections_admin_pending_action" %>
37
+ <%= javascript_pack_tag "decidim_elections_admin_pending_action" %>
38
+ <% end %>
37
39
  <% end %>
38
40
  <% end %>
39
41
  <% else %>
@@ -1,13 +1,13 @@
1
1
  <div class="filters-controls hide-for-mediumlarge">
2
- <button data-open="filter-box" class="filters-controls__trigger">
2
+ <button data-open="filter-box" class="filters-controls__trigger" aria-controls="filter-box" aria-haspopup="dialog">
3
3
  <%= t ".filter" %>
4
4
  <%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(".unfold"), role: "img" %>
5
5
  </button>
6
6
  </div>
7
7
 
8
- <div class="reveal" id="filter-box" data-reveal>
8
+ <div class="reveal" id="filter-box" data-reveal role="dialog" aria-modal="true" aria-labelledby="filter-box-label">
9
9
  <div class="reveal__header">
10
- <h3 class="reveal__title"><%= t ".filter_by" %>:</h3>
10
+ <h3 id="filter-box-label" class="reveal__title"><%= t ".filter_by" %>:</h3>
11
11
  <button class="close-button" data-close aria-label="<%= t(".close_modal") %>" type="button">
12
12
  <span aria-hidden="true">&times;</span>
13
13
  </button>
@@ -179,4 +179,4 @@
179
179
  </div>
180
180
  </div>
181
181
 
182
- <%= javascript_pack_tag "decidim_elections_election_log", integrity: true %>
182
+ <%= javascript_pack_tag "decidim_elections_election_log" %>
@@ -45,7 +45,7 @@ edit_link(
45
45
  <% end %>
46
46
  <div class="columns medium-8 mediumlarge-7">
47
47
  <div class="section">
48
- <p><%= decidim_sanitize(simple_format(translated_attribute(election.description)), strip_tags: true) %></p>
48
+ <p><%= decidim_sanitize_editor(simple_format(translated_attribute(election.description)), strip_tags: true) %></p>
49
49
 
50
50
  <%= cell("decidim/elections/election_vote_cta", election) %>
51
51
 
@@ -18,5 +18,5 @@
18
18
  <%= render("#{current_step}_steps") %>
19
19
  </div>
20
20
 
21
- <%= javascript_pack_tag "decidim_elections_trustee_#{current_step}", integrity: true %>
21
+ <%= javascript_pack_tag "decidim_elections_trustee_#{current_step}" %>
22
22
  <% end %>
@@ -99,4 +99,4 @@
99
99
  <% end %>
100
100
  </div>
101
101
 
102
- <%= javascript_pack_tag "decidim_elections_trustee_trustee_zone", integrity: true %>
102
+ <%= javascript_pack_tag "decidim_elections_trustee_trustee_zone" %>
@@ -20,4 +20,4 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <%= javascript_pack_tag "decidim_elections_onboarding", integrity: true %>
23
+ <%= javascript_pack_tag "decidim_elections_onboarding" %>
@@ -8,7 +8,7 @@
8
8
 
9
9
  <h2 class="h4"><%= t("decidim.elections.votes.confirmed.lead") %></h2>
10
10
  <div class="evote__content">
11
- <%= t("decidim.elections.votes.confirmed.text", e_vote_poll_id: params[:id]).html_safe %>
11
+ <%= t("decidim.elections.votes.confirmed.text", e_vote_poll_id: h(params[:id])).html_safe %>
12
12
  <p>
13
13
  <%= t("decidim.elections.votes.confirmed.verify_link", link: election_vote_verify_path(election, vote_id: params[:id])).html_safe %>
14
14
  </p>
@@ -22,4 +22,4 @@
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
- <%= javascript_pack_tag "decidim_elections_voter_casting_vote", integrity: true %>
25
+ <%= javascript_pack_tag "decidim_elections_voter_casting_vote" %>
@@ -58,8 +58,8 @@
58
58
  </div>
59
59
 
60
60
  <% if preview_mode? %>
61
- <%= javascript_pack_tag "decidim_elections_voter_setup_preview", integrity: true %>
61
+ <%= javascript_pack_tag "decidim_elections_voter_setup_preview" %>
62
62
  <% else %>
63
- <%= javascript_pack_tag "decidim_elections_voter_setup_vote", integrity: true %>
63
+ <%= javascript_pack_tag "decidim_elections_voter_setup_vote" %>
64
64
  <% end %>
65
- <%= javascript_pack_tag "decidim_elections_voter_new_vote", integrity: true %>
65
+ <%= javascript_pack_tag "decidim_elections_voter_new_vote" %>
@@ -72,4 +72,4 @@
72
72
 
73
73
  </div>
74
74
 
75
- <%= javascript_pack_tag "decidim_elections_voter_verify_vote", integrity: true %>
75
+ <%= javascript_pack_tag "decidim_elections_voter_verify_vote" %>
@@ -26,7 +26,7 @@
26
26
  <tr>
27
27
  <td>
28
28
  <% if voting.promoted? %>
29
- <span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.voting.fields.promoted", scope: "decidim.votings.admin") %>">
29
+ <span data-tooltip class="icon-state icon-highlight" data-disable-hover="false" title="<%= t("models.voting.fields.promoted", scope: "decidim.votings.admin") %>">
30
30
  <%= icon "star" %>
31
31
  </span>
32
32
  <% end %>
@@ -1,9 +1,10 @@
1
1
  <div id="wrapper-modal-closure-count-error">
2
- <div class="reveal" data-reveal id="modal-closure-count-error" data-append-to="div#wrapper-modal-closure-count-error">
2
+ <div class="reveal" data-reveal id="modal-closure-count-error" data-append-to="div#wrapper-modal-closure-count-error" role="dialog" aria-modal="true" aria-labelledby="modal-closure-count-error-label">
3
3
  <div class="reveal__header">
4
4
  <%= content_tag :h3,
5
5
  t("title", scope: "decidim.votings.polling_officer_zone.closures.new.modal_ballots_count_error"),
6
- class: "reveal__title" %>
6
+ class: "reveal__title",
7
+ id: "modal-closure-count-error-label" %>
7
8
 
8
9
  <button class="close-button" data-close aria-label="<%= t("close_modal", scope: "decidim.votings.polling_officer_zone.closures.new.modal_ballots_count_error") %>" type="button">
9
10
  <span aria-hidden="true">×</span>
@@ -1,8 +1,9 @@
1
- <div class="reveal" data-reveal id="modal-closure-results-count-error">
1
+ <div class="reveal" data-reveal id="modal-closure-results-count-error" role="dialog" aria-modal="true" aria-labelledby="modal-closure-results-count-error-label">
2
2
  <div class="reveal__header">
3
3
  <%= content_tag :h3,
4
4
  t("title", scope: "decidim.votings.polling_officer_zone.closures.edit.modal_ballots_results_count_error"),
5
- class: "reveal__title" %>
5
+ class: "reveal__title",
6
+ id: "modal-closure-results-count-error-label" %>
6
7
 
7
8
  <button class="close-button" data-close aria-label="<%= t("close_modal", scope: "decidim.votings.polling_officer_zone.closures.edit.modal_ballots_results_count_error") %>" type="button">
8
9
  <span aria-hidden="true">×</span>
@@ -15,17 +15,18 @@
15
15
  data: { open: "modal-closure-sign" },
16
16
  aria: {
17
17
  controls: "modal-closure-sign",
18
- haspopup: true
18
+ haspopup: "dialog"
19
19
  },
20
20
  disabled: true,
21
21
  tabindex: "0" %>
22
22
 
23
23
  <div id="wrapper-modal-closure-sign">
24
- <div class="reveal" data-reveal id="modal-closure-sign" data-append-to="div#wrapper-modal-closure-sign">
24
+ <div class="reveal" data-reveal id="modal-closure-sign" data-append-to="div#wrapper-modal-closure-sign" role="dialog" aria-modal="true" aria-labelledby="modal-closure-sign-label">
25
25
  <div class="reveal__header">
26
26
  <%= content_tag :h3,
27
27
  t("title", scope: "decidim.votings.polling_officer_zone.closures.sign"),
28
- class: "reveal__title" %>
28
+ class: "reveal__title",
29
+ id: "modal-closure-sign-label" %>
29
30
 
30
31
  <button class="close-button" data-close aria-label="<%= t("close_modal", scope: "decidim.votings.polling_officer_zone.closures.sign") %>" type="button">
31
32
  <span aria-hidden="true">×</span>
@@ -39,7 +39,7 @@
39
39
  data: { open: "modal-closure-results-count-error" },
40
40
  aria: {
41
41
  controls:"modal-closure-results-count-error",
42
- haspopup: "true"
42
+ haspopup: "dialog"
43
43
  } %>
44
44
  <% end %>
45
45
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  <%= render "modal_ballots_count_error", form: form %>
50
50
 
51
- <button id="btn-modal-closure-count-error" class="button button--sc expanded mt-sm mb-none hide" data-open="modal-closure-count-error" aria-controls="modal-closure-count-error" aria-haspopup="true" tabindex="0">
51
+ <button id="btn-modal-closure-count-error" class="button button--sc expanded mt-sm mb-none hide" data-open="modal-closure-count-error" aria-controls="modal-closure-count-error" aria-haspopup="dialog" tabindex="0">
52
52
  <%= t(".submit") %>
53
53
  </button>
54
54
  <% end %>
@@ -18,4 +18,4 @@
18
18
  <% end %>
19
19
  </div>
20
20
 
21
- <%= javascript_pack_tag "decidim_votings_in_person_vote", integrity: true %>
21
+ <%= javascript_pack_tag "decidim_votings_in_person_vote" %>
@@ -22,4 +22,4 @@
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
- <%= javascript_pack_tag "decidim_votings_in_person_vote", integrity: true %>
25
+ <%= javascript_pack_tag "decidim_votings_in_person_vote" %>
@@ -1,5 +1,5 @@
1
1
  <div class="filters-controls hide-for-mediumlarge">
2
- <button data-open="filter-box" class="filters-controls__trigger">
2
+ <button data-open="filter-box" class="filters-controls__trigger" aria-controls="filter-box" aria-haspopup="dialog">
3
3
  <%= t ".filter" %>
4
4
  <%= icon "caret-bottom",
5
5
  class: "icon--small float-right",
@@ -8,9 +8,9 @@
8
8
  </button>
9
9
  </div>
10
10
 
11
- <div class="reveal" id="filter-box" data-reveal>
11
+ <div class="reveal" id="filter-box" data-reveal role="dialog" aria-modal="true" aria-labelledby="filter-box-label">
12
12
  <div class="reveal__header">
13
- <h3 class="reveal__title"><%= t ".filter_by" %>:</h3>
13
+ <h3 id="filter-box-label" class="reveal__title"><%= t ".filter_by" %>:</h3>
14
14
  <button class="close-button" data-close
15
15
  aria-label="<%= t(".close_modal") %>"
16
16
  type="button">
@@ -5,7 +5,7 @@
5
5
  <%= link_to voting_path(promoted_voting), class: "card__link" do %>
6
6
  <h2 class="card__title"><%= translated_attribute promoted_voting.title %></h2>
7
7
  <% end %>
8
- <%= decidim_sanitize html_truncate(translated_attribute(promoted_voting.description), length: 630, separator: "...") %>
8
+ <%= decidim_sanitize_editor html_truncate(translated_attribute(promoted_voting.description), length: 630, separator: "...") %>
9
9
  <%= link_to voting_path(promoted_voting), class: "button small hollow card__button" do %>
10
10
  <%= t("votings.promoted_voting.more_info", scope: "layouts.decidim") %>
11
11
  <% end %>
data/config/assets.rb CHANGED
@@ -8,6 +8,7 @@ Decidim::Webpacker.register_entrypoints(
8
8
  decidim_elections_election_log: "#{base_path}/app/packs/entrypoints/decidim_elections_election_log.js",
9
9
  decidim_elections_onboarding: "#{base_path}/app/packs/entrypoints/decidim_elections_onboarding.js",
10
10
  decidim_elections_admin_pending_action: "#{base_path}/app/packs/entrypoints/decidim_elections_admin_pending_action.js",
11
+ decidim_elections_admin_trustees_process: "#{base_path}/app/packs/entrypoints/decidim_elections_admin_trustees_process.js",
11
12
  decidim_elections_admin_vote_statistics: "#{base_path}/app/packs/entrypoints/decidim_elections_admin_vote_statistics.js",
12
13
  decidim_elections_trustee_key_ceremony: "#{base_path}/app/packs/entrypoints/decidim_elections_trustee_key_ceremony.js",
13
14
  decidim_elections_trustee_tally: "#{base_path}/app/packs/entrypoints/decidim_elections_trustee_tally.js",
@@ -1 +1,13 @@
1
1
  ar:
2
+ decidim:
3
+ elections:
4
+ trustee_zone:
5
+ trustees:
6
+ show:
7
+ identification_keys:
8
+ cancel: إلغاء
9
+ votings:
10
+ polling_officer_zone:
11
+ closures:
12
+ sign:
13
+ cancel: إلغاء
@@ -253,8 +253,8 @@ ca:
253
253
  title: Elecció creada
254
254
  trustees: Garants
255
255
  key_ceremony:
256
+ continue: Continuar
256
257
  title: Cerimònia de claus
257
- trustees: Garants
258
258
  key_ceremony_ended:
259
259
  errors:
260
260
  time_before: L'elecció està llesta per començar. Has d'esperar fins a %{hours} hores abans de l'hora d'inici (%{start_time}) per iniciar el període de votació.
@@ -274,8 +274,14 @@ ca:
274
274
  submit: Enviar
275
275
  title: Resultats publicats
276
276
  tally:
277
+ continue: Continuar
278
+ invalid: S'ha produït un error en notificar l'absència de la garant
279
+ mark_as_missing: Marcar com absent
280
+ mark_as_missing_description: Totes les garants haurien de participar en aquest procés, però si una garant no en pot prendre part, la pots marcar com a absent.
281
+ success: La notificació d'absència de la garant ha estat enviada correctament
282
+ tally_completion: El procés es completarà quan totes les garants estiguin actives o marcades com a absents. Fan falta com un mínim de %{quorum} garant per a completar el procés.
277
283
  title: Procés de recompte
278
- trustees: Garants
284
+ undo_mark_as_missing: Una garant marcada com a absent per error podrà participar abans de la finalització del procés. Pot actuar com de costum i la seva absència serà ignorada.
279
285
  tally_ended:
280
286
  answer: Resposta
281
287
  not_selected: No seleccionat
@@ -328,14 +334,20 @@ ca:
328
334
  success: El garant %{trustee} s'ha actualitzat correctament
329
335
  admin_log:
330
336
  election:
331
- end_vote: "%{user_name} ha finalittzat el període de votació per l'elecció %{resource_name} al Bulletin Board"
332
- publish: "%{user_name} ha publicat la votació %{resource_name}"
333
- publish_results: "%{user_name} ha publicat els resultats de l'elecció %{resource_name} al Bulletin Board"
334
- setup: "%{user_name} ha creat l'elecció %{resource_name} al Bulletin Board"
335
- start_key_ceremony: "%{user_name} va començar la cerimònia de claus per l'elecció %{resource_name} al Bulletin Board"
336
- start_tally: "%{user_name} ha iniciat el recompte per a l'elecció %{resource_name} al Bulletin Board"
337
- start_vote: "%{user_name} ha iniciat el període de votació per a l'elecció %{resource_name} al Bulletin Board"
338
- unpublish: "%{user_name} ha despublicat la votació %{resource_name}"
337
+ create: "%{user_name} ha creat l'elecció %{resource_name} a %{space_name}"
338
+ delete: "%{user_name} ha eliminat l'elecció %{resource_name} a %{space_name}"
339
+ end_vote: "%{user_name} ha tancat el període de votació per a l'elecció %{resource_name} a %{space_name}"
340
+ publish: "%{user_name} ha publicat l'elecció %{resource_name} a %{space_name}"
341
+ publish_results: "%{user_name} ha publicat els resultats de l'elecció %{resource_name} a %{space_name}"
342
+ report_missing_trustee: "%{user_name} ha notificat %{trustee_name} com a absent durant el recompte de les eleccions %{resource_name} a %{space_name}"
343
+ setup: "%{user_name} ha creat l'elecció %{resource_name} a %{space_name}"
344
+ start_key_ceremony: "%{user_name} ha iniciat la cerimònia de claus per l'elecció %{resource_name} a %{space_name}"
345
+ start_tally: "%{user_name} ha iniciat el recompte de l'elecció %{resource_name} a %{space_name}"
346
+ start_vote: "%{user_name} ha iniciat el període de votació per a l'elecció %{resource_name} a %{space_name}"
347
+ unpublish: "%{user_name} ha despublicat l'elecció %{resource_name} a %{space_name}"
348
+ update: "%{user_name} ha actualitzat l'elecció %{resource_name} a %{space_name}"
349
+ trustee:
350
+ create: "%{user_name} ha assignat a la usuària %{trustee_user} com a garant"
339
351
  election_m:
340
352
  badge_name:
341
353
  finished: Acabada
@@ -343,6 +355,10 @@ ca:
343
355
  upcoming: Properes
344
356
  end_date: Finalitza
345
357
  footer:
358
+ remaining_time:
359
+ one: "Queden <strong>%{count} hora %{minutes} minuts</strong> per votar."
360
+ other: "Queden <strong>%{count} hores %{minutes} minuts</strong> per votar."
361
+ zero: "Queden <strong>%{minutes} minuts</strong> per votar."
346
362
  view: Veure
347
363
  vote: Votar
348
364
  label:
@@ -988,6 +1004,24 @@ ca:
988
1004
  invalid: S'ha produït un error en actualitzar aquesta votació
989
1005
  success: La votació s'ha actualitzat correctament
990
1006
  admin_log:
1007
+ ballot_style:
1008
+ create: "%{user_name} ha creat un estil de papereta amb codi %{ballot_style_code} a l'espai %{space_name}"
1009
+ delete: "%{user_name} ha eliminat l'estil de papereta amb codi %{ballot_style_code} a l'espai %{space_name}"
1010
+ update: "%{user_name} ha actualitzat l'estil de papereta amb codi %{ballot_style_code} a l'espai %{space_name}"
1011
+ census:
1012
+ create: "%{user_name} ha creat el cens per l'espai %{space_name}"
1013
+ delete: "%{user_name} ha eliminat el cens per l'espai %{space_name}"
1014
+ update: "%{user_name} ha actualitzat el cens per l'espai %{space_name}"
1015
+ monitoring_committee_member:
1016
+ create: "%{user_name} ha assignat a la usuària %{monitoring_committee_member_user} com a membre de la comissió de seguiment a l'espai %{space_name}"
1017
+ delete: "%{user_name} desassignat a la usuària %{monitoring_committee_member_user} com a membre de la comissió de seguiment a l'espai %{space_name}"
1018
+ polling_officer:
1019
+ create: "%{user_name} ha assignat a la usuària %{polling_officer_user} com a gestora de mesa a l'espai %{space_name}"
1020
+ delete: "%{user_name} ha desassignat a la usuària %{polling_officer_user} com a gestora de mesa a l'espai %{space_name}"
1021
+ polling_station:
1022
+ create: "%{user_name} ha creat el punt de votació %{resource_name} a l'espai %{space_name}"
1023
+ delete: "%{user_name} ha eliminat el punt de votació %{resource_name} a l'espai %{space_name}"
1024
+ update: "%{user_name} ha actualitzat el punt de votació %{resource_name} a l'espai %{space_name}"
991
1025
  voting:
992
1026
  create: "%{user_name} ha creat la votació %{resource_name}"
993
1027
  publish: "%{user_name} ha publicat la votació %{resource_name}"
@@ -997,7 +1031,7 @@ ca:
997
1031
  census:
998
1032
  create:
999
1033
  invalid: Hi ha hagut un error en pujar el cens, prova-ho de nou més tard.
1000
- invalid_csv_header: La capçalera CSV no el nombre correcte de camps. Consulta les instruccions amb atenció
1034
+ invalid_csv_header: Les capçaleres al CSV manquen o no son correctes. Si us plau, rellegeix atentament les instruccions
1001
1035
  creating_data:
1002
1036
  info_message: "<strong>Si us plau espera</strong>, processades %{processed_count} de %{raw_count} fileres al fitxer de %{file}."
1003
1037
  delete: