decidim-elections 0.23.3 → 0.24.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/assets/config/admin/decidim_votings_manifest.css +0 -0
- data/app/assets/config/admin/decidim_votings_manifest.js +4 -0
- data/app/assets/config/decidim_elections_manifest.css +3 -0
- data/app/assets/config/decidim_elections_manifest.js +6 -0
- data/app/assets/config/decidim_votings_manifest.css +3 -0
- data/app/assets/config/decidim_votings_manifest.js +0 -0
- data/app/assets/images/decidim/votings/icon.svg +1 -0
- data/app/assets/javascripts/decidim/elections/admin/pending_action.js.es6 +16 -0
- data/app/assets/javascripts/decidim/elections/admin/vote_statistics.js.es6 +11 -0
- data/app/assets/javascripts/decidim/elections/trustee_zone.js.es6 +54 -0
- data/app/assets/javascripts/decidim/elections/trustee_zone/key_ceremony.js.es6 +126 -0
- data/app/assets/javascripts/decidim/elections/trustee_zone/tally.js.es6 +104 -0
- data/app/assets/javascripts/decidim/elections/vote.js.es6 +107 -160
- data/app/assets/javascripts/decidim/elections/vote_questions.component.js.es6 +129 -0
- data/app/assets/javascripts/decidim/elections/vote_verify.js.es6 +71 -0
- data/app/assets/javascripts/decidim/votings/admin/monitoring_committee_members_form.js.es6 +35 -0
- data/app/assets/javascripts/decidim/votings/admin/polling_officers_form.js.es6 +35 -0
- data/app/assets/javascripts/decidim/votings/admin/polling_officers_picker.js.es6 +35 -0
- data/app/assets/javascripts/decidim/votings/admin/polling_stations_form.js.es6 +5 -0
- data/app/assets/stylesheets/decidim/elections/elections.scss +0 -4
- data/app/assets/stylesheets/decidim/elections/focus/_accordion.scss +36 -0
- data/app/assets/stylesheets/decidim/elections/focus/_evote.scss +58 -0
- data/app/assets/stylesheets/decidim/elections/trustee_zone.scss +24 -0
- data/app/assets/stylesheets/decidim/votings/votings.scss +1 -0
- data/app/assets/stylesheets/decidim/votings/votings/_votings-header.scss +99 -0
- data/app/assets/stylesheets/decidim/votings/votings/_votings-home-banner.scss +11 -0
- data/app/cells/decidim/votings/content_block_cell.rb +17 -0
- data/app/cells/decidim/votings/content_blocks/highlighted_votings/show.erb +30 -0
- data/app/cells/decidim/votings/content_blocks/highlighted_votings_cell.rb +33 -0
- data/app/cells/decidim/votings/content_blocks/highlighted_votings_settings_form/show.erb +3 -0
- data/app/cells/decidim/votings/content_blocks/highlighted_votings_settings_form_cell.rb +19 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/attachments_and_folders_cell.rb +15 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb +15 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/elections_cell.rb +15 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/header_cell.rb +15 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/metrics_cell.rb +15 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/polling_stations_cell.rb +15 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/stats_cell.rb +15 -0
- data/app/cells/decidim/votings/content_blocks/landing_page/timeline_cell.rb +15 -0
- data/app/cells/decidim/votings/polling_officers/polling_officers_picker/polling_officers.erb +12 -0
- data/app/cells/decidim/votings/polling_officers/polling_officers_picker/show.erb +14 -0
- data/app/cells/decidim/votings/polling_officers/polling_officers_picker_cell.rb +73 -0
- data/app/cells/decidim/votings/voting_cell.rb +19 -0
- data/app/cells/decidim/votings/voting_m/data.erb +21 -0
- data/app/cells/decidim/votings/voting_m/footer.erb +5 -0
- data/app/cells/decidim/votings/voting_m_cell.rb +94 -0
- data/app/commands/decidim/elections/admin/add_user_as_trustee.rb +81 -0
- data/app/commands/decidim/elections/admin/create_election.rb +2 -1
- data/app/commands/decidim/elections/admin/end_vote.rb +63 -0
- data/app/commands/decidim/elections/admin/publish_results.rb +59 -0
- data/app/commands/decidim/elections/admin/remove_trustee_from_participatory_space.rb +37 -0
- data/app/commands/decidim/elections/admin/setup_election.rb +160 -0
- data/app/commands/decidim/elections/admin/start_key_ceremony.rb +63 -0
- data/app/commands/decidim/elections/admin/start_tally.rb +63 -0
- data/app/commands/decidim/elections/admin/start_vote.rb +63 -0
- data/app/commands/decidim/elections/admin/update_action_status.rb +47 -0
- data/app/commands/decidim/elections/admin/update_answer_selection.rb +41 -0
- data/app/commands/decidim/elections/admin/update_trustee_participatory_space.rb +40 -0
- data/app/commands/decidim/elections/trustee_zone/update_election_bulletin_board_status.rb +39 -0
- data/app/commands/decidim/elections/trustee_zone/update_trustee.rb +41 -0
- data/app/commands/decidim/elections/voter/cast_vote.rb +59 -0
- data/app/commands/decidim/elections/voter/update_vote_status.rb +70 -0
- data/app/commands/decidim/votings/admin/create_monitoring_committee_member.rb +99 -0
- data/app/commands/decidim/votings/admin/create_polling_officer.rb +99 -0
- data/app/commands/decidim/votings/admin/create_polling_station.rb +59 -0
- data/app/commands/decidim/votings/admin/create_voting.rb +59 -0
- data/app/commands/decidim/votings/admin/destroy_monitoring_committee_member.rb +51 -0
- data/app/commands/decidim/votings/admin/destroy_polling_officer.rb +52 -0
- data/app/commands/decidim/votings/admin/destroy_polling_station.rb +40 -0
- data/app/commands/decidim/votings/admin/manage_polling_station.rb +64 -0
- data/app/commands/decidim/votings/admin/publish_voting.rb +40 -0
- data/app/commands/decidim/votings/admin/unpublish_voting.rb +40 -0
- data/app/commands/decidim/votings/admin/update_polling_station.rb +50 -0
- data/app/commands/decidim/votings/admin/update_voting.rb +85 -0
- data/app/constraints/decidim/votings/current_component.rb +28 -0
- data/app/constraints/decidim/votings/current_voting.rb +43 -0
- data/app/controllers/concerns/decidim/elections/orderable.rb +2 -2
- data/app/controllers/concerns/decidim/polling_officers/admin/filterable.rb +58 -0
- data/app/controllers/concerns/decidim/polling_stations/admin/filterable.rb +57 -0
- data/app/controllers/concerns/decidim/votings/admin/filterable.rb +27 -0
- data/app/controllers/concerns/decidim/votings/admin/voting_admin.rb +48 -0
- data/app/controllers/concerns/decidim/votings/needs_voting.rb +44 -0
- data/app/controllers/concerns/decidim/votings/orderable.rb +32 -0
- data/app/controllers/decidim/elections/admin/answers_controller.rb +32 -0
- data/app/controllers/decidim/elections/admin/elections_controller.rb +2 -2
- data/app/controllers/decidim/elections/admin/feedback_forms_controller.rb +55 -0
- data/app/controllers/decidim/elections/admin/steps_controller.rb +96 -0
- data/app/controllers/decidim/elections/admin/trustees_participatory_spaces_controller.rb +89 -0
- data/app/controllers/decidim/elections/elections_controller.rb +5 -1
- data/app/controllers/decidim/elections/feedbacks_controller.rb +38 -0
- data/app/controllers/decidim/elections/trustee_zone/application_controller.rb +45 -0
- data/app/controllers/decidim/elections/trustee_zone/elections_controller.rb +35 -0
- data/app/controllers/decidim/elections/trustee_zone/trustees_controller.rb +36 -0
- data/app/controllers/decidim/elections/votes_controller.rb +54 -2
- data/app/controllers/decidim/votings/admin/application_controller.rb +26 -0
- data/app/controllers/decidim/votings/admin/component_permissions_controller.rb +13 -0
- data/app/controllers/decidim/votings/admin/components_controller.rb +15 -0
- data/app/controllers/decidim/votings/admin/monitoring_committee_members_controller.rb +62 -0
- data/app/controllers/decidim/votings/admin/polling_officers_controller.rb +66 -0
- data/app/controllers/decidim/votings/admin/polling_stations_controller.rb +92 -0
- data/app/controllers/decidim/votings/admin/voting_attachment_collections_controller.rb +22 -0
- data/app/controllers/decidim/votings/admin/voting_attachments_controller.rb +21 -0
- data/app/controllers/decidim/votings/admin/votings_controller.rb +124 -0
- data/app/controllers/decidim/votings/admin/votings_landing_page_content_blocks_controller.rb +44 -0
- data/app/controllers/decidim/votings/admin/votings_landing_page_controller.rb +46 -0
- data/app/controllers/decidim/votings/application_controller.rb +26 -0
- data/app/controllers/decidim/votings/polling_officer_zone/application_controller.rb +33 -0
- data/app/controllers/decidim/votings/polling_officer_zone/polling_officers_controller.rb +17 -0
- data/app/controllers/decidim/votings/polling_officer_zone/polling_stations_controller.rb +22 -0
- data/app/controllers/decidim/votings/votings_controller.rb +98 -0
- data/app/events/decidim/elections/trustees/notify_new_trustee_event.rb +28 -0
- data/app/events/decidim/elections/trustees/notify_trustee_new_election_event.rb +14 -0
- data/app/events/decidim/elections/votes/vote_accepted_event.rb +24 -0
- data/app/events/decidim/votings/polling_officers/polling_station_assigned_event.rb +44 -0
- data/app/forms/decidim/elections/admin/action_form.rb +34 -0
- data/app/forms/decidim/elections/admin/answer_form.rb +3 -2
- data/app/forms/decidim/elections/admin/election_form.rb +3 -2
- data/app/forms/decidim/elections/admin/setup_form.rb +79 -0
- data/app/forms/decidim/elections/admin/trustees_participatory_space_form.rb +22 -0
- data/app/forms/decidim/elections/admin/vote_period_form.rb +37 -0
- data/app/forms/decidim/elections/ballot/verify_vote_form.rb +29 -0
- data/app/forms/decidim/elections/trustee_zone/trustee_form.rb +26 -0
- data/app/forms/decidim/elections/voter/encrypted_vote_form.rb +49 -0
- data/app/forms/decidim/votings/admin/monitoring_committee_member_form.rb +27 -0
- data/app/forms/decidim/votings/admin/polling_officer_form.rb +27 -0
- data/app/forms/decidim/votings/admin/polling_station_form.rb +58 -0
- data/app/forms/decidim/votings/admin/voting_form.rb +71 -0
- data/app/helpers/decidim/elections/admin/answers_helper.rb +19 -0
- data/app/helpers/decidim/elections/admin/steps_helper.rb +23 -0
- data/app/helpers/decidim/elections/admin/trustees_participatory_spaces_helper.rb +31 -0
- data/app/helpers/decidim/elections/elections_helper.rb +29 -0
- data/app/helpers/decidim/votings/admin/polling_officers_picker_helper.rb +29 -0
- data/app/helpers/decidim/votings/votings_helper.rb +20 -0
- data/app/models/decidim/elections/action.rb +13 -0
- data/app/models/decidim/elections/election.rb +54 -3
- data/app/models/decidim/elections/elections_trustee.rb +11 -0
- data/app/models/decidim/elections/question.rb +19 -0
- data/app/models/decidim/elections/trustee.rb +26 -0
- data/app/models/decidim/elections/trustees_participatory_space.rb +13 -0
- data/app/models/decidim/elections/vote.rb +15 -0
- data/app/models/decidim/votings/monitoring_committee_member.rb +24 -0
- data/app/models/decidim/votings/polling_officer.rb +76 -0
- data/app/models/decidim/votings/polling_station.rb +64 -0
- data/app/models/decidim/votings/voting.rb +138 -0
- data/app/permissions/decidim/elections/admin/permissions.rb +50 -10
- data/app/permissions/decidim/elections/permissions.rb +20 -2
- data/app/permissions/decidim/elections/trustee_zone/permissions.rb +32 -0
- data/app/permissions/decidim/votings/admin/permissions.rb +127 -0
- data/app/permissions/decidim/votings/permissions.rb +40 -0
- data/app/permissions/decidim/votings/polling_officer_zone/permissions.rb +32 -0
- data/app/presenters/decidim/elections/admin_log/election_presenter.rb +1 -1
- data/app/presenters/decidim/elections/trustee_presenter.rb +24 -0
- data/app/presenters/decidim/votings/admin_log/voting_presenter.rb +45 -0
- data/app/presenters/decidim/votings/polling_station_presenter.rb +27 -0
- data/app/presenters/decidim/votings/voting_presenter.rb +36 -0
- data/app/queries/decidim/elections/admin/pending_actions.rb +20 -0
- data/app/queries/decidim/elections/admin/votes_for_statistics.rb +24 -0
- data/app/queries/decidim/elections/elections_finished_to_end.rb +19 -0
- data/app/queries/decidim/elections/elections_ready_to_start.rb +25 -0
- data/app/queries/decidim/elections/trustees/by_participatory_space.rb +24 -0
- data/app/queries/decidim/elections/trustees/by_participatory_space_trustee_ids.rb +24 -0
- data/app/queries/decidim/elections/votes/election_votes.rb +19 -0
- data/app/queries/decidim/elections/votes/pending_votes.rb +20 -0
- data/app/queries/decidim/elections/votes/user_election_last_vote.rb +26 -0
- data/app/queries/decidim/elections/votes/user_votes.rb +19 -0
- data/app/queries/decidim/votings/admin/admin_users.rb +39 -0
- data/app/queries/decidim/votings/admin/polling_officers_join_polling_stations.rb +33 -0
- data/app/queries/decidim/votings/admin/polling_officers_join_polling_stations_and_user.rb +34 -0
- data/app/queries/decidim/votings/admin/polling_officers_join_user.rb +32 -0
- data/app/queries/decidim/votings/organization_prioritized_votings.rb +21 -0
- data/app/queries/decidim/votings/organization_promoted_votings.rb +16 -0
- data/app/queries/decidim/votings/organization_published_votings.rb +19 -0
- data/app/queries/decidim/votings/organization_votings.rb +16 -0
- data/app/queries/decidim/votings/prioritized_votings.rb +13 -0
- data/app/queries/decidim/votings/published_votings.rb +12 -0
- data/app/services/decidim/votings/voting_search.rb +46 -0
- data/app/views/decidim/elections/admin/answers/index.html.erb +12 -0
- data/app/views/decidim/elections/admin/elections/index.html.erb +13 -1
- data/app/views/decidim/elections/admin/proposals_imports/new.html.erb +1 -1
- data/app/views/decidim/elections/admin/questions/index.html.erb +5 -1
- data/app/views/decidim/elections/admin/shared/_trustees_secondary_nav.html.erb +3 -0
- data/app/views/decidim/elections/admin/steps/_create_election.html.erb +38 -0
- data/app/views/decidim/elections/admin/steps/_created.html.erb +16 -0
- data/app/views/decidim/elections/admin/steps/_key_ceremony.html.erb +16 -0
- data/app/views/decidim/elections/admin/steps/_key_ceremony_ended.html.erb +15 -0
- data/app/views/decidim/elections/admin/steps/_tally.html.erb +17 -0
- data/app/views/decidim/elections/admin/steps/_tally_ended.html.erb +9 -0
- data/app/views/decidim/elections/admin/steps/_vote.html.erb +21 -0
- data/app/views/decidim/elections/admin/steps/_vote_ended.html.erb +15 -0
- data/app/views/decidim/elections/admin/steps/_vote_stats.html.erb +31 -0
- data/app/views/decidim/elections/admin/steps/index.html.erb +43 -0
- data/app/views/decidim/elections/admin/trustees_participatory_spaces/_form.html.erb +19 -0
- data/app/views/decidim/elections/admin/trustees_participatory_spaces/index.html.erb +64 -0
- data/app/views/decidim/elections/admin/trustees_participatory_spaces/new.html.erb +7 -0
- data/app/views/decidim/elections/elections/_preview.html.erb +26 -0
- data/app/views/decidim/elections/elections/_results.html.erb +47 -0
- data/app/views/decidim/elections/elections/show.html.erb +43 -18
- data/app/views/decidim/elections/trustee_zone/elections/_backup_modal.html.erb +24 -0
- data/app/views/decidim/elections/trustee_zone/elections/_key_ceremony_steps.html.erb +44 -0
- data/app/views/decidim/elections/trustee_zone/elections/_restore_modal.html.erb +25 -0
- data/app/views/decidim/elections/trustee_zone/elections/_tally_steps.html.erb +43 -0
- data/app/views/decidim/elections/trustee_zone/elections/show.html.erb +38 -0
- data/app/views/decidim/elections/trustee_zone/elections/update.js.erb +5 -0
- data/app/views/decidim/elections/trustee_zone/trustees/show.html.erb +102 -0
- data/app/views/decidim/elections/votes/_election_votes_confirmed.html.erb +38 -17
- data/app/views/decidim/elections/votes/_election_votes_failed.html.erb +21 -0
- data/app/views/decidim/elections/votes/_election_votes_question.html.erb +4 -4
- data/app/views/decidim/elections/votes/cast_failed.js.erb +1 -0
- data/app/views/decidim/elections/votes/cast_success.js.erb +1 -0
- data/app/views/decidim/elections/votes/new.html.erb +41 -33
- data/app/views/decidim/elections/votes/verify.html.erb +78 -0
- data/app/views/decidim/votings/admin/monitoring_committee_members/_form.html.erb +27 -0
- data/app/views/decidim/votings/admin/monitoring_committee_members/index.html.erb +41 -0
- data/app/views/decidim/votings/admin/monitoring_committee_members/new.html.erb +7 -0
- data/app/views/decidim/votings/admin/polling_officers/_form.html.erb +27 -0
- data/app/views/decidim/votings/admin/polling_officers/index.html.erb +50 -0
- data/app/views/decidim/votings/admin/polling_officers/new.html.erb +7 -0
- data/app/views/decidim/votings/admin/polling_stations/_form.html.erb +40 -0
- data/app/views/decidim/votings/admin/polling_stations/edit.html.erb +7 -0
- data/app/views/decidim/votings/admin/polling_stations/index.html.erb +55 -0
- data/app/views/decidim/votings/admin/polling_stations/new.html.erb +7 -0
- data/app/views/decidim/votings/admin/votings/_form.html.erb +63 -0
- data/app/views/decidim/votings/admin/votings/edit.html.erb +31 -0
- data/app/views/decidim/votings/admin/votings/index.html.erb +87 -0
- data/app/views/decidim/votings/admin/votings/new.html.erb +13 -0
- data/app/views/decidim/votings/admin/votings/polling_officers_picker.html.erb +2 -0
- data/app/views/decidim/votings/polling_officer_zone/polling_officers/show.html.erb +42 -0
- data/app/views/decidim/votings/polling_officer_zone/polling_stations/show.html.erb +1 -0
- data/app/views/decidim/votings/votings/_count.html.erb +1 -0
- data/app/views/decidim/votings/votings/_filters.html.erb +25 -0
- data/app/views/decidim/votings/votings/_filters_small_view.html.erb +23 -0
- data/app/views/decidim/votings/votings/_promoted_voting.html.erb +27 -0
- data/app/views/decidim/votings/votings/_voting_details.html.erb +7 -0
- data/app/views/decidim/votings/votings/_votings.html.erb +25 -0
- data/app/views/decidim/votings/votings/index.html.erb +42 -0
- data/app/views/decidim/votings/votings/index.js.erb +10 -0
- data/app/views/decidim/votings/votings/show.html.erb +20 -0
- data/app/views/layouts/decidim/_voting_header.html.erb +16 -0
- data/app/views/layouts/decidim/admin/voting.html.erb +101 -0
- data/app/views/layouts/decidim/voting.html.erb +16 -0
- data/config/initializers/decidim_bulletin_board.rb +23 -0
- data/config/locales/ca.yml +39 -6
- data/config/locales/cs.yml +640 -6
- data/config/locales/de.yml +635 -6
- data/config/locales/el.yml +0 -2
- data/config/locales/en.yml +636 -6
- data/config/locales/es-MX.yml +6 -10
- data/config/locales/es-PY.yml +6 -10
- data/config/locales/es.yml +6 -10
- data/config/locales/fi-plain.yml +635 -6
- data/config/locales/fi.yml +635 -6
- data/config/locales/fr-CA.yml +422 -6
- data/config/locales/fr.yml +422 -6
- data/config/locales/gl.yml +63 -6
- data/config/locales/it.yml +97 -6
- data/config/locales/ja.yml +8 -6
- data/config/locales/lv.yml +0 -2
- data/config/locales/nl.yml +498 -6
- data/config/locales/no.yml +0 -5
- data/config/locales/pl.yml +579 -9
- data/config/locales/pt.yml +0 -6
- data/config/locales/ro-RO.yml +0 -6
- data/config/locales/sv.yml +7 -6
- data/config/locales/tr-TR.yml +114 -6
- data/config/locales/zh-CN.yml +0 -6
- data/db/migrate/20200915142713_add_questionnaire_to_existing_elections.rb +29 -0
- data/db/migrate/20200918153813_create_decidim_elections_trustees_participatory_spaces.rb +13 -0
- data/db/migrate/20200918153824_create_decidim_elections_elections_trustees.rb +10 -0
- data/db/migrate/20200918153835_create_decidim_elections_trustees.rb +12 -0
- data/db/migrate/20201026163334_add_blocked_at_and_bb_status_to_elections.rb +8 -0
- data/db/migrate/20201028090110_add_votes_to_decidim_elections_answers.rb +7 -0
- data/db/migrate/20201028135614_add_selected_to_decidim_elections_answers.rb +7 -0
- data/db/migrate/20201209110653_create_decidim_elections_votes.rb +14 -0
- data/db/migrate/20201216091123_add_name_to_trustees.rb +7 -0
- data/db/migrate/20210113113818_add_message_id_to_decidim_elections_votes.rb +7 -0
- data/db/migrate/20210113120115_create_decidim_elections_votings.rb +20 -0
- data/db/migrate/20210114100749_add_published_at_to_decidim_votings_votings.rb +7 -0
- data/db/migrate/20210114111850_add_user_to_decidim_elections_votes.rb +7 -0
- data/db/migrate/20210120164634_add_promoted_to_voting.rb +7 -0
- data/db/migrate/20210125124801_add_voting_type_to_voting_voting.rb +7 -0
- data/db/migrate/20210129124956_create_decidim_elections_actions.rb +14 -0
- data/db/migrate/20210204132111_add_votings_polling_stations.rb +19 -0
- data/db/migrate/20210208090441_add_polling_officers_to_votings.rb +12 -0
- data/db/migrate/20210210090738_add_votings_polling_station_references_to_votings_polling_officer.rb +8 -0
- data/db/migrate/20210216074707_add_monitoring_committee_member.rb +12 -0
- data/db/seeds/city.jpeg +0 -0
- data/lib/decidim/api/election_answer_type.rb +23 -0
- data/lib/decidim/api/election_question_type.rb +22 -0
- data/lib/decidim/api/election_type.rb +27 -0
- data/lib/decidim/api/elections_type.rb +32 -0
- data/lib/decidim/api/trustee_type.rb +16 -0
- data/lib/decidim/api/voting_type.rb +20 -0
- data/lib/decidim/elections.rb +19 -2
- data/lib/decidim/elections/admin_engine.rb +42 -1
- data/lib/decidim/elections/answer_serializer.rb +48 -0
- data/lib/decidim/elections/api.rb +11 -0
- data/lib/decidim/elections/component.rb +367 -24
- data/lib/decidim/elections/engine.rb +8 -1
- data/lib/decidim/elections/test/factories.rb +201 -4
- data/lib/decidim/elections/trustee_zone.rb +10 -0
- data/lib/decidim/elections/trustee_zone_engine.rb +35 -0
- data/lib/decidim/elections/version.rb +1 -1
- data/lib/decidim/votings.rb +16 -0
- data/lib/decidim/votings/admin.rb +10 -0
- data/lib/decidim/votings/admin_engine.rb +71 -0
- data/lib/decidim/votings/api.rb +7 -0
- data/lib/decidim/votings/engine.rb +147 -0
- data/lib/decidim/votings/participatory_space.rb +92 -0
- data/lib/decidim/votings/polling_officer_zone.rb +10 -0
- data/lib/decidim/votings/polling_officer_zone_engine.rb +33 -0
- data/lib/decidim/votings/query_extensions.rb +43 -0
- data/lib/decidim/votings/test/capybara_polling_officers_picker.rb +49 -0
- data/lib/decidim/votings/test/factories.rb +83 -0
- data/lib/decidim/votings/voting_serializer.rb +54 -0
- data/lib/tasks/decidim_elections.rake +68 -5
- metadata +304 -21
- data/app/types/decidim/elections/election_answer_type.rb +0 -24
- data/app/types/decidim/elections/election_question_type.rb +0 -25
- data/app/types/decidim/elections/election_type.rb +0 -27
- data/app/types/decidim/elections/elections_type.rb +0 -32
- data/config/i18n-tasks.yml +0 -10
- data/lib/decidim/elections/bulletin_board_client.rb +0 -35
data/config/locales/pt.yml
CHANGED
@@ -48,8 +48,6 @@ pt:
|
|
48
48
|
confirm_destroy: Tem a certeza?
|
49
49
|
destroy: Destruir
|
50
50
|
edit: Editar
|
51
|
-
edit_answers: Editar respostas
|
52
|
-
edit_questions: Editar perguntas
|
53
51
|
import: Importar propostas para perguntas
|
54
52
|
new: Novo %{name}
|
55
53
|
preview: Pré-visualizar
|
@@ -140,12 +138,9 @@ pt:
|
|
140
138
|
one: "%{count} eleição"
|
141
139
|
other: "%{count} eleições"
|
142
140
|
show:
|
143
|
-
back: Todas as eleições
|
144
141
|
preview: Pré-visualizar
|
145
|
-
vote: Votar
|
146
142
|
voting_period_status:
|
147
143
|
finished: A votação começou em %{start_time} e terminou em %{end_time}
|
148
|
-
ongoing: A votação termina em %{end_time}
|
149
144
|
upcoming: A votação começa em %{start_time}
|
150
145
|
models:
|
151
146
|
answer:
|
@@ -178,7 +173,6 @@ pt:
|
|
178
173
|
header: Voto confirmado
|
179
174
|
lead: O seu voto já foi transmitido!
|
180
175
|
text: 'Pode verificar que o seu voto foi adicionado corretamente à caixa de voto com o seguinte identificador: <strong class="evote__poll-id">%{e_vote_poll_id}</strong>'
|
181
|
-
verify_text: Para verificá-lo, copie o identificador e cole-o na <a href="evote-verify">página de verificação de voto</a>
|
182
176
|
encrypting:
|
183
177
|
header: A codificar voto...
|
184
178
|
text: O seu voto está a ser encriptado para garantir que pode transmiti-lo anonimamente.
|
data/config/locales/ro-RO.yml
CHANGED
@@ -51,8 +51,6 @@ ro:
|
|
51
51
|
confirm_destroy: Ești sigur?
|
52
52
|
destroy: Distruge
|
53
53
|
edit: Editare
|
54
|
-
edit_answers: Editare răspunsuri
|
55
|
-
edit_questions: Editare întrebări
|
56
54
|
import: Importă propunerile pentru răspunsuri
|
57
55
|
new: '%{name} nou'
|
58
56
|
preview: Previzualizare
|
@@ -144,12 +142,9 @@ ro:
|
|
144
142
|
few: "%{count} alegeri"
|
145
143
|
other: "%{count} alegeri"
|
146
144
|
show:
|
147
|
-
back: Toate alegerile
|
148
145
|
preview: Previzualizare
|
149
|
-
vote: Votează
|
150
146
|
voting_period_status:
|
151
147
|
finished: Votarea a început la %{start_time} și s-a încheiat la %{end_time}
|
152
|
-
ongoing: Votarea se termină la %{end_time}
|
153
148
|
upcoming: Votarea începe la %{start_time}
|
154
149
|
models:
|
155
150
|
answer:
|
@@ -182,7 +177,6 @@ ro:
|
|
182
177
|
header: Votare confirmată
|
183
178
|
lead: Votul tău a fost deja exprimat!
|
184
179
|
text: 'Poți verifica dacă votul tău a fost adăugat cu succes în urna de vot cu următorul identificator: <strong class="evote__poll-id">%{e_vote_poll_id}</strong>'
|
185
|
-
verify_text: Pentru a verifica, copiați identificatorul și lipiți-l pe pagina <a href="evote-verify">pentru verificarea votului</a>
|
186
180
|
encrypting:
|
187
181
|
header: Codificarea votului...
|
188
182
|
text: Votul tău este criptat pentru a te asigura că îl poți trimite anonim.
|
data/config/locales/sv.yml
CHANGED
@@ -52,8 +52,6 @@ sv:
|
|
52
52
|
confirm_destroy: Är du säker?
|
53
53
|
destroy: Förstör
|
54
54
|
edit: Redigera
|
55
|
-
edit_answers: Redigera svar
|
56
|
-
edit_questions: Redigera frågor
|
57
55
|
import: Importera förslag till svar
|
58
56
|
new: Ny %{name}
|
59
57
|
preview: Förhandsgranska
|
@@ -101,6 +99,8 @@ sv:
|
|
101
99
|
update:
|
102
100
|
invalid: Det gick inte att uppdatera valet
|
103
101
|
success: Val har uppdaterats
|
102
|
+
exports:
|
103
|
+
elections: Val
|
104
104
|
models:
|
105
105
|
answer:
|
106
106
|
name: Svar
|
@@ -134,6 +134,11 @@ sv:
|
|
134
134
|
update:
|
135
135
|
invalid: Det gick inte att uppdatera denna fråga
|
136
136
|
success: Frågan har uppdaterats
|
137
|
+
steps:
|
138
|
+
vote_stats:
|
139
|
+
no_vote_statistics_yet: Ingen röstningsstatistik ännu
|
140
|
+
title: Röstningsstatistik
|
141
|
+
votes: Röster
|
137
142
|
admin_log:
|
138
143
|
election:
|
139
144
|
publish: "%{user_name} publicerade valet %{resource_name}"
|
@@ -170,12 +175,9 @@ sv:
|
|
170
175
|
filter_by: Filtrera efter
|
171
176
|
unfold: Veckla ut
|
172
177
|
show:
|
173
|
-
back: Alla val
|
174
178
|
preview: Förhandsgranska
|
175
|
-
vote: Rösta
|
176
179
|
voting_period_status:
|
177
180
|
finished: Omröstningen började den %{start_time} och slutade den %{end_time}
|
178
|
-
ongoing: Omröstningen slutar den %{end_time}
|
179
181
|
upcoming: Omröstningen börjar den %{start_time}
|
180
182
|
models:
|
181
183
|
answer:
|
@@ -212,7 +214,6 @@ sv:
|
|
212
214
|
header: Rösta bekräftad
|
213
215
|
lead: Din röst har redan skickats!
|
214
216
|
text: 'Du kan kontrollera att din röst har lagts till i röstsedeln med följande identifierare: <strong class="evote__poll-id">%{e_vote_poll_id}</strong>'
|
215
|
-
verify_text: För att kontrollera det, kopiera identifieraren och klistra in den på <a href="evote-verify">röstverifieringssidan</a>
|
216
217
|
encrypting:
|
217
218
|
header: Kodar omröstning...
|
218
219
|
text: Din röst krypteras så att du kan skicka den anonymt.
|
data/config/locales/tr-TR.yml
CHANGED
@@ -26,6 +26,10 @@ tr:
|
|
26
26
|
attributes:
|
27
27
|
attachment:
|
28
28
|
needs_to_be_reattached: Yeniden bağlanması gerekiyor
|
29
|
+
trustee:
|
30
|
+
attributes:
|
31
|
+
public_key:
|
32
|
+
cant_be_changed: değiştirilemez
|
29
33
|
activerecord:
|
30
34
|
models:
|
31
35
|
decidim/elections/answer:
|
@@ -53,9 +57,10 @@ tr:
|
|
53
57
|
confirm_destroy: Emin misin?
|
54
58
|
destroy: Yok et
|
55
59
|
edit: Düzenle
|
56
|
-
|
57
|
-
edit_questions: Soruları Düzenle
|
60
|
+
feedback: Seçmen geri bildirimi
|
58
61
|
import: Teklifleri yanıtlara aktarın
|
62
|
+
manage_answers: Cevapları yönet
|
63
|
+
manage_questions: Soruları yönet
|
59
64
|
new: Yeni %{name}
|
60
65
|
preview: Önizleme
|
61
66
|
publish: Yayınla
|
@@ -78,6 +83,14 @@ tr:
|
|
78
83
|
new:
|
79
84
|
create: Cevap oluştur
|
80
85
|
title: Yeni cevap
|
86
|
+
select:
|
87
|
+
disable: Cevabın seçimini kaldır
|
88
|
+
enable: Cevabı seçildi olarak işaretle
|
89
|
+
invalid: Bu cevabı seçerken bir sorun oluştu
|
90
|
+
success: Cevap başarıyla seçildi
|
91
|
+
unselect:
|
92
|
+
invalid: Bu cevabın seçimi kaldırılırken bir sorun oluştu
|
93
|
+
success: Cevabın seçimi başarıyla kaldırıldı
|
81
94
|
update:
|
82
95
|
invalid: Bu klasör güncellenirken bir hata oluştu
|
83
96
|
success: Cevap başarıyla güncellendi
|
@@ -104,6 +117,9 @@ tr:
|
|
104
117
|
update:
|
105
118
|
invalid: Bu seçim güncellenirken bir sorun oluştu
|
106
119
|
success: Seçim başarıyla güncellendi
|
120
|
+
exports:
|
121
|
+
elections: Seçimler
|
122
|
+
feedback_form_answers: Cevapların geri bildirimi
|
107
123
|
models:
|
108
124
|
answer:
|
109
125
|
name: Cevap
|
@@ -111,6 +127,8 @@ tr:
|
|
111
127
|
name: Seçim
|
112
128
|
question:
|
113
129
|
name: Soru
|
130
|
+
trustee:
|
131
|
+
name: Vekil
|
114
132
|
proposals_imports:
|
115
133
|
create:
|
116
134
|
invalid: Teklifleri cevaplara aktarırken bir sorun oluştu
|
@@ -119,6 +137,7 @@ tr:
|
|
119
137
|
create: Teklifleri yanıtlara aktarın
|
120
138
|
no_components: Bu katılımcı alanda, teklifleri yanıtlara aktarmak için başka teklif bileşeni yoktur.
|
121
139
|
select_component: Lütfen modülü bileşeni seçin
|
140
|
+
title: Teklifleri içe aktar
|
122
141
|
questions:
|
123
142
|
create:
|
124
143
|
invalid: Yeni bir soru oluşturulurken bir hata oluştu
|
@@ -137,6 +156,27 @@ tr:
|
|
137
156
|
update:
|
138
157
|
invalid: Bu soru güncellenirken bir hata oluştu
|
139
158
|
success: Soru başarıyla güncellendi
|
159
|
+
trustees_participatory_spaces:
|
160
|
+
actions:
|
161
|
+
disable: Devre dışı
|
162
|
+
enable: Dikkate al
|
163
|
+
create:
|
164
|
+
exists: Bu katılımcı alan için vekil var
|
165
|
+
invalid: Vekil oluşturulurken bir sorun meydana geldi
|
166
|
+
success: Vekil başarıyla oluşturuldu
|
167
|
+
delete:
|
168
|
+
invalid: Bu vekili kaldırırken bir sorun oluştu
|
169
|
+
success: Vekil başarıyla kaldırıldı
|
170
|
+
form:
|
171
|
+
select_user: Kullanıcı seçin
|
172
|
+
index:
|
173
|
+
title: Vekiller
|
174
|
+
new:
|
175
|
+
create: Vekil Oluşturun
|
176
|
+
title: Yeni Vekil
|
177
|
+
update:
|
178
|
+
invalid: '%{trustee} vekili güncellenirken bir sorun oluştu'
|
179
|
+
success: Vekil %{trustee} başarıyla güncellendi
|
140
180
|
admin_log:
|
141
181
|
election:
|
142
182
|
publish: "%{user_name}, %{resource_name} seçimini yayınladı"
|
@@ -172,14 +212,28 @@ tr:
|
|
172
212
|
filter: Filtrele
|
173
213
|
filter_by: Şuna göre filtrele
|
174
214
|
unfold: Aç
|
215
|
+
preview:
|
216
|
+
available_answers: Mevcut cevaplar
|
217
|
+
description: Oylama sürecinde bulacağınız sorular bunlar
|
218
|
+
title: Seçim soruları
|
219
|
+
results:
|
220
|
+
description: Bunlar, her soru için oylamanın sonuçlarıdır
|
221
|
+
selected: Seçili
|
222
|
+
title: Seçim sonuçları
|
223
|
+
votes:
|
224
|
+
one: "%{count} oy"
|
225
|
+
other: "%{count} oy"
|
175
226
|
show:
|
176
|
-
back:
|
227
|
+
back: Mevcut seçimler
|
177
228
|
preview: Önizleme
|
178
|
-
vote: Oy ver
|
179
229
|
voting_period_status:
|
180
230
|
finished: Oylama %{start_time} tarihinde başladı ve %{end_time} tarihinde sona erdi
|
181
|
-
ongoing: Oylama %{end_time} tarihinde sona eriyor
|
182
231
|
upcoming: Oylama %{start_time} tarihinde başlıyor
|
232
|
+
feedback:
|
233
|
+
answer:
|
234
|
+
invalid: Geri bildiriminizi gönderirken bir sorun oluştu.
|
235
|
+
spam_detected: Formu yanıtlarken bir sorun oluştu. Belki çok hızlı davrandın, tekrar deneyebilir misin?
|
236
|
+
success: Geri bildirim başarıyla gönderildi.
|
183
237
|
models:
|
184
238
|
answer:
|
185
239
|
fields:
|
@@ -195,10 +249,54 @@ tr:
|
|
195
249
|
answers: Cevaplar
|
196
250
|
max_selections: Maks. Alan sayısı seçimler
|
197
251
|
title: Başlık
|
252
|
+
trustees_participatory_space:
|
253
|
+
fields:
|
254
|
+
considered: dikkate al
|
255
|
+
email: E-posta
|
256
|
+
inactive: aktif değil
|
257
|
+
name: Adı
|
258
|
+
notification: Bildirim gönderildi
|
259
|
+
public_key: Herkese açık anahtar
|
260
|
+
status: Statü
|
198
261
|
orders:
|
199
262
|
label: Seçimleri şuna göre sırala
|
200
263
|
older: Daha eski
|
201
264
|
recent: En son
|
265
|
+
trustee_zone:
|
266
|
+
menu:
|
267
|
+
trustee_zone: Vekil bölgesi
|
268
|
+
trustees:
|
269
|
+
show:
|
270
|
+
elections:
|
271
|
+
list:
|
272
|
+
election: Seçim
|
273
|
+
voting_period: Oylama süresi
|
274
|
+
no_elections: Vekil olarak hareket ettiğiniz hiçbir seçim yoktur.
|
275
|
+
title: Seçimler
|
276
|
+
identification_keys:
|
277
|
+
cancel: İptal Et
|
278
|
+
generate: Kimlik anahtarları oluşturun
|
279
|
+
generate_error: Kimlik anahtarları oluşturulurken bir hata meydana geldi.
|
280
|
+
generate_legend: Vekil olarak seçimlere katılmak için bir kimlik anahtarı çifti oluşturmanız gerekir.
|
281
|
+
generate_legend_1: Düğmeye bastıktan sonra, oluşturulan tanımlama anahtarları ile dosyayı indirmelisiniz.
|
282
|
+
generate_legend_2: İndirilen dosyayı temiz bir USB cihazına kopyalayın
|
283
|
+
generate_legend_3: Bilgisayarınızda dosyanın bir kopyası olmadığından emin olun (ör. İndirilenler ve Masaüstü klasörlerini kontrol edin).
|
284
|
+
generate_legend_4: Dosyanın başka bir kopyasını farklı bir harici cihazda oluşturun ve çok güvenli bir yerde saklayın.
|
285
|
+
submit: Gönder
|
286
|
+
submit_legend: Yukarıda açıklanan tüm adımları izledikten sonra, açık kimlik anahtarını Decidim sunucusuna gönderme işlemini tamamlayın.
|
287
|
+
submit_title: Genel kimlik anahtarını gönderin
|
288
|
+
title: Vekil kimlik anahtarları
|
289
|
+
upload: Kimlik anahtarlarınızı yükleyin
|
290
|
+
upload_error:
|
291
|
+
invalid_format: Yüklenen dosya herhangi bir kimlik anahtarı içermiyor.
|
292
|
+
invalid_key: Yüklenen dosyadaki kimlik anahtarları yüklenemez.
|
293
|
+
invalid_public_key: Yüklenen dosyadaki tanımlama anahtarları, Decidim tarafından saklanan genel tanımlama anahtarıyla eşleşmiyor.
|
294
|
+
upload_legend: Decidim'de sizin genel kimlik anahtarlarınız var, ancak tarayıcınızda hala bu anahtarlar yok. Kimlik anahtarlarınızın olduğu dosyayı, oluşturduktan sonra oluşturduğunuz yedekten bilgisayarınıza aktarmanız gerekir.
|
295
|
+
not_supported_browser_description: Vekil olarak hareket etmek için kullanılamayan bir web tarayıcısı kullanıyorsunuz gibi görünüyor. Vekil görevlerinizi tamamlayabilmek için tarayıcınızın en son sürümünü kullandığınızdan emin olun veya en popüler tarayıcılardan herhangi birini kullanmayı deneyin.
|
296
|
+
not_supported_browser_title: Vekil kişi olarak hareket etmek için tarayıcıyı yükseltin
|
297
|
+
trustee_role_description: Bu platformda kutlanan bazı seçimlerde Vekil olarak görev yapmakla görevlendirildiniz.
|
298
|
+
update:
|
299
|
+
success: Tanımlama genel anahtarınız başarıyla saklandı.
|
202
300
|
votes:
|
203
301
|
confirm:
|
204
302
|
answer: Cevap
|
@@ -216,7 +314,6 @@ tr:
|
|
216
314
|
header: Oy onaylandı
|
217
315
|
lead: Oyunuz çoktan verildi!
|
218
316
|
text: 'Aşağıdaki tanımlayıcıyla oyunuzun başarıyla oy sandığına eklenip eklenmediğini kontrol edebilirsiniz: <strong class = "evote__poll-id">%{e_vote_poll_id} </strong>'
|
219
|
-
verify_text: Kontrol etmek için, tanımlayıcıyı kopyalayın ve <a href="evote-verify"> oy doğrulama sayfasına </a> yapıştırın
|
220
317
|
encrypting:
|
221
318
|
header: Oy kodlanıyor...
|
222
319
|
text: Anonim olarak kullanabilmeniz için oyunuz şifreleniyor.
|
@@ -249,6 +346,17 @@ tr:
|
|
249
346
|
email_outro: Bu bildirimi, %{participatory_space_title} adlı kişiyi takip ettiğiniz için aldınız. Önceki bağlantıyı izleyerek bildirim almayı durdurabilirsiniz.
|
250
347
|
email_subject: '%{resource_title} seçimi artık %{participatory_space_title} için aktif.'
|
251
348
|
notification_title: <a href="%{resource_path}">%{resource_title} </a> seçimi artık %{participatory_space_title} için aktif.
|
349
|
+
trustees:
|
350
|
+
new_election:
|
351
|
+
email_intro: '%{resource_title} seçimi için vekil olarak eklendiniz.'
|
352
|
+
email_outro: Bu bildirimi, %{resource_title} seçiminde vekil kişi olarak eklendiğiniz için aldınız.
|
353
|
+
email_subject: '%{resource_title} seçimi için vekil olarak eklendiniz..'
|
354
|
+
notification_title: <a href="%{resource_path}">%{resource_title} </a> seçimi için bir vekilsiniz.
|
355
|
+
new_trustee:
|
356
|
+
email_intro: Bir yönetici sizi %{resource_name} için güvenilen kişi olarak ekledi. Genel anahtarınızı <a href='%{trustee_zone_url}'> güvenilen bölgenizde </a> oluşturmalısınız
|
357
|
+
email_outro: Bu bildirimi, %{resource_name} için vekil kişi olarak eklendiğiniz için aldınız.
|
358
|
+
email_subject: '%{resource_name} için vekil birisiniz.'
|
359
|
+
notification_title: <a href="%{participatory_space_url}">%{resource_name} </a> için vekil birisiniz.
|
252
360
|
pages:
|
253
361
|
home:
|
254
362
|
statistics:
|
data/config/locales/zh-CN.yml
CHANGED
@@ -50,8 +50,6 @@ zh-CN:
|
|
50
50
|
confirm_destroy: 您确定吗?
|
51
51
|
destroy: 破坏的
|
52
52
|
edit: 编辑
|
53
|
-
edit_answers: 编辑答案
|
54
|
-
edit_questions: 编辑问题
|
55
53
|
import: 导入建议以答案
|
56
54
|
new: 新建 %{name}
|
57
55
|
preview: 预览
|
@@ -169,12 +167,9 @@ zh-CN:
|
|
169
167
|
filter_by: 筛选方式
|
170
168
|
unfold: 展开...
|
171
169
|
show:
|
172
|
-
back: 所有选举
|
173
170
|
preview: 预览
|
174
|
-
vote: 投票
|
175
171
|
voting_period_status:
|
176
172
|
finished: 投票开始于 %{start_time} ,结束于 %{end_time}
|
177
|
-
ongoing: 投票结束于 %{end_time}
|
178
173
|
upcoming: 投票开始于 %{start_time}
|
179
174
|
models:
|
180
175
|
answer:
|
@@ -212,7 +207,6 @@ zh-CN:
|
|
212
207
|
header: 已确认投票
|
213
208
|
lead: 您的投票已被投出!
|
214
209
|
text: '您可以检查您的投票是否已成功地添加到选票箱,其标识符如下: <strong class="evote__poll-id">%{e_vote_poll_id}</strong>'
|
215
|
-
verify_text: 要检查它,请复制标识符并粘贴在 <a href="evote-verify">投票验证页面</a>
|
216
210
|
encrypting:
|
217
211
|
header: 编码投票...
|
218
212
|
text: 您的投票正在加密,以确保您可以匿名投射。
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddQuestionnaireToExistingElections < ActiveRecord::Migration[5.2]
|
4
|
+
class Election < ApplicationRecord
|
5
|
+
self.table_name = :decidim_elections_elections
|
6
|
+
|
7
|
+
has_one :questionnaire,
|
8
|
+
class_name: "Questionnaire",
|
9
|
+
dependent: :destroy,
|
10
|
+
inverse_of: :questionnaire_for,
|
11
|
+
as: :questionnaire_for
|
12
|
+
end
|
13
|
+
|
14
|
+
class Questionnaire < ApplicationRecord
|
15
|
+
self.table_name = :decidim_forms_questionnaires
|
16
|
+
|
17
|
+
belongs_to :questionnaire_for, polymorphic: true
|
18
|
+
end
|
19
|
+
|
20
|
+
def change
|
21
|
+
Election.find_each do |election|
|
22
|
+
next unless election.questionnaire
|
23
|
+
|
24
|
+
election.update!(
|
25
|
+
questionnaire: Questionnaire.new
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimElectionsTrusteesParticipatorySpaces < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_elections_trustees_participatory_spaces do |t|
|
6
|
+
t.references :participatory_space, polymorphic: true, index: { name: "index_elections_trustees_spaces_on_space_type_and_id" }
|
7
|
+
t.references :decidim_elections_trustee, null: false, index: { name: "index_elections_trustees_spaces_on_elections_trustee_id" }
|
8
|
+
t.boolean :considered, null: false, default: true
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimElectionsElectionsTrustees < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_elections_elections_trustees do |t|
|
6
|
+
t.belongs_to :decidim_elections_election, null: false, index: { name: "index_elections_trustees_on_decidim_elections_election_id" }
|
7
|
+
t.belongs_to :decidim_elections_trustee, null: false, index: { name: "index_elections_trustees_on_decidim_elections_trustee_id" }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimElectionsTrustees < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_elections_trustees do |t|
|
6
|
+
t.references :decidim_user, null: false, index: true
|
7
|
+
t.string :public_key
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimElectionsVotes < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_elections_votes do |t|
|
6
|
+
t.belongs_to :decidim_elections_election, null: false, index: { name: "index_elections_votes_on_decidim_elections_election_id" }
|
7
|
+
t.string :voter_id, null: false
|
8
|
+
t.string :encrypted_vote_hash, null: false
|
9
|
+
t.string :status, null: false
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|