decidim-elections 0.22.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/decidim_elections_manifest.js +2 -0
- data/app/assets/javascripts/decidim/elections/vote.js.es6 +170 -0
- data/app/assets/stylesheets/decidim/elections/elections.scss +10 -0
- data/app/assets/stylesheets/decidim/elections/focus/_evote.scss +279 -0
- data/app/assets/stylesheets/decidim/elections/focus/_focus.scss +128 -0
- data/app/cells/decidim/elections/election_cell.rb +22 -0
- data/app/cells/decidim/elections/election_m/data.erb +19 -0
- data/app/cells/decidim/elections/election_m/footer.erb +5 -0
- data/app/cells/decidim/elections/election_m_cell.rb +103 -0
- data/app/cells/decidim/elections/voting_step_navigation/show.erb +29 -0
- data/app/cells/decidim/elections/voting_step_navigation_cell.rb +42 -0
- data/app/commands/decidim/elections/admin/create_election.rb +14 -3
- data/app/commands/decidim/elections/admin/create_question.rb +2 -1
- data/app/commands/decidim/elections/admin/destroy_election.rb +4 -0
- data/app/commands/decidim/elections/admin/import_proposals_to_elections.rb +87 -0
- data/app/commands/decidim/elections/admin/publish_election.rb +54 -0
- data/app/commands/decidim/elections/admin/unpublish_election.rb +43 -0
- data/app/commands/decidim/elections/admin/update_election.rb +15 -3
- data/app/commands/decidim/elections/admin/update_question.rb +2 -1
- data/app/controllers/concerns/decidim/elections/orderable.rb +36 -0
- data/app/controllers/decidim/elections/admin/answers_controller.rb +9 -1
- data/app/controllers/decidim/elections/admin/elections_controller.rb +26 -0
- data/app/controllers/decidim/elections/admin/proposals_imports_controller.rb +53 -0
- data/app/controllers/decidim/elections/elections_controller.rb +68 -0
- data/app/controllers/decidim/elections/votes_controller.rb +50 -0
- data/app/events/decidim/elections/election_published_event.rb +8 -0
- data/app/forms/decidim/elections/admin/answer_import_proposals_form.rb +41 -0
- data/app/forms/decidim/elections/admin/election_form.rb +15 -2
- data/app/forms/decidim/elections/admin/question_form.rb +1 -0
- data/app/helpers/decidim/elections/application_helper.rb +12 -0
- data/app/helpers/decidim/elections/election_cells_helper.rb +12 -0
- data/app/helpers/decidim/elections/votes_helper.rb +21 -0
- data/app/models/decidim/elections/answer.rb +5 -1
- data/app/models/decidim/elections/election.rb +69 -0
- data/app/models/decidim/elections/question.rb +9 -2
- data/app/permissions/decidim/elections/admin/permissions.rb +13 -3
- data/app/permissions/decidim/elections/permissions.rb +35 -0
- data/app/presenters/decidim/elections/admin_log/election_presenter.rb +41 -0
- data/app/presenters/decidim/elections/election_presenter.rb +28 -0
- data/app/queries/decidim/elections/filtered_elections.rb +37 -0
- data/app/services/decidim/elections/election_search.rb +35 -0
- data/app/types/decidim/elections/election_question_type.rb +2 -2
- data/app/types/decidim/elections/election_type.rb +2 -1
- data/app/types/decidim/elections/elections_type.rb +1 -1
- data/app/views/decidim/elections/admin/answers/index.html.erb +2 -1
- data/app/views/decidim/elections/admin/elections/_form.html.erb +2 -4
- data/app/views/decidim/elections/admin/elections/index.html.erb +23 -1
- data/app/views/decidim/elections/admin/proposals_imports/new.html.erb +24 -0
- data/app/views/decidim/elections/admin/questions/_form.html.erb +4 -0
- data/app/views/decidim/elections/admin/questions/index.html.erb +3 -1
- data/app/views/decidim/elections/elections/_count.html.erb +1 -0
- data/app/views/decidim/elections/elections/_election.html.erb +1 -0
- data/app/views/decidim/elections/elections/_elections.html.erb +24 -0
- data/app/views/decidim/elections/elections/_filters.html.erb +24 -0
- data/app/views/decidim/elections/elections/_filters_small_view.html.erb +18 -0
- data/app/views/decidim/elections/elections/index.html.erb +24 -0
- data/app/views/decidim/elections/elections/index.js.erb +10 -0
- data/app/views/decidim/elections/elections/show.html.erb +62 -0
- data/app/views/decidim/elections/votes/_election_votes_confirm.html.erb +53 -0
- data/app/views/decidim/elections/votes/_election_votes_confirm_footer.html.erb +24 -0
- data/app/views/decidim/elections/votes/_election_votes_confirmed.html.erb +26 -0
- data/app/views/decidim/elections/votes/_election_votes_encrypting.html.erb +20 -0
- data/app/views/decidim/elections/votes/_election_votes_header.html.erb +8 -0
- data/app/views/decidim/elections/votes/_election_votes_modal.html.erb +46 -0
- data/app/views/decidim/elections/votes/_election_votes_question.html.erb +49 -0
- data/app/views/decidim/elections/votes/_election_votes_steps_header.html.erb +12 -0
- data/app/views/decidim/elections/votes/new.html.erb +44 -0
- data/app/views/layouts/decidim/_election_votes_header.html.erb +13 -0
- data/app/views/layouts/decidim/election_votes.html.erb +24 -0
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/bg.yml +7 -0
- data/config/locales/ca.yml +136 -6
- data/config/locales/cs.yml +133 -1
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +93 -1
- data/config/locales/el.yml +11 -1
- data/config/locales/en.yml +131 -1
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +131 -1
- data/config/locales/es-PY.yml +131 -1
- data/config/locales/es.yml +134 -4
- data/config/locales/et.yml +1 -0
- data/config/locales/fi-plain.yml +131 -1
- data/config/locales/fi.yml +131 -1
- data/config/locales/fr-CA.yml +131 -1
- data/config/locales/fr.yml +131 -1
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +18 -0
- data/config/locales/is.yml +1 -0
- data/config/locales/it.yml +88 -1
- data/config/locales/ja-JP.yml +95 -8
- data/config/locales/ja.yml +254 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/{lv-LV.yml → lv.yml} +11 -1
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +88 -1
- data/config/locales/no.yml +64 -0
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +124 -1
- data/config/locales/pt.yml +84 -1
- data/config/locales/ro-RO.yml +85 -1
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sv.yml +121 -1
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +254 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20200601141412_add_published_at_to_elections.rb +7 -0
- data/db/migrate/20200807125040_remove_subtitle_from_decidim_elections.rb +7 -0
- data/db/migrate/20200910103648_add_min_selections_to_decidim_elections_questions.rb +7 -0
- data/lib/decidim/elections.rb +5 -0
- data/lib/decidim/elections/admin_engine.rb +7 -0
- data/lib/decidim/elections/bulletin_board_client.rb +35 -0
- data/lib/decidim/elections/component.rb +17 -12
- data/lib/decidim/elections/engine.rb +8 -1
- data/lib/decidim/elections/test/factories.rb +59 -6
- data/lib/decidim/elections/version.rb +1 -1
- data/lib/tasks/decidim_elections.rake +16 -0
- metadata +79 -13
data/lib/decidim/elections.rb
CHANGED
@@ -9,5 +9,10 @@ module Decidim
|
|
9
9
|
# This namespace holds the logic of the `Elections` component. This component
|
10
10
|
# allows users to create elections in a participatory space.
|
11
11
|
module Elections
|
12
|
+
autoload :BulletinBoardClient, "decidim/elections/bulletin_board_client"
|
13
|
+
|
14
|
+
def self.bulletin_board
|
15
|
+
@bulletin_board ||= BulletinBoardClient.new(Rails.application.secrets.bulletin_board || {})
|
16
|
+
end
|
12
17
|
end
|
13
18
|
end
|
@@ -11,9 +11,16 @@ module Decidim
|
|
11
11
|
|
12
12
|
routes do
|
13
13
|
resources :elections do
|
14
|
+
member do
|
15
|
+
put :publish
|
16
|
+
put :unpublish
|
17
|
+
end
|
14
18
|
resources :questions do
|
15
19
|
resources :answers do
|
16
20
|
get :proposals_picker, on: :collection
|
21
|
+
collection do
|
22
|
+
resource :proposals_import, only: [:new, :create]
|
23
|
+
end
|
17
24
|
end
|
18
25
|
end
|
19
26
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Elections
|
5
|
+
class BulletinBoardClient
|
6
|
+
def initialize(params)
|
7
|
+
@server = params[:server].presence
|
8
|
+
@api_key = params[:api_key].presence
|
9
|
+
@identification_private_key = params[:identification_private_key]&.strip.presence
|
10
|
+
|
11
|
+
@private_key = OpenSSL::PKey::RSA.new(identification_private_key_content) if identification_private_key
|
12
|
+
end
|
13
|
+
|
14
|
+
def public_key
|
15
|
+
private_key&.public_key
|
16
|
+
end
|
17
|
+
|
18
|
+
def configured?
|
19
|
+
private_key && server && api_key
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :identification_private_key, :server, :api_key, :private_key
|
25
|
+
|
26
|
+
def identification_private_key_content
|
27
|
+
@identification_private_key_content ||= if identification_private_key.starts_with?("-----")
|
28
|
+
identification_private_key
|
29
|
+
else
|
30
|
+
File.read(Rails.application.root.join(identification_private_key))
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -6,14 +6,15 @@ Decidim.register_component(:elections) do |component|
|
|
6
6
|
component.engine = Decidim::Elections::Engine
|
7
7
|
component.admin_engine = Decidim::Elections::AdminEngine
|
8
8
|
component.icon = "decidim/elections/icon.svg"
|
9
|
+
component.stylesheet = "decidim/elections/elections"
|
9
10
|
component.permissions_class_name = "Decidim::Elections::Permissions"
|
10
|
-
|
11
|
+
component.query_type = "Decidim::Elections::ElectionsType"
|
11
12
|
# component.on(:before_destroy) do |instance|
|
12
13
|
# # Code executed before removing the component
|
13
14
|
# end
|
14
15
|
|
15
16
|
# These actions permissions can be configured in the admin panel
|
16
|
-
|
17
|
+
component.actions = %w(vote)
|
17
18
|
|
18
19
|
component.settings(:global) do |settings|
|
19
20
|
settings.attribute :announcement, type: :text, translated: true, editor: true
|
@@ -23,8 +24,15 @@ Decidim.register_component(:elections) do |component|
|
|
23
24
|
settings.attribute :announcement, type: :text, translated: true, editor: true
|
24
25
|
end
|
25
26
|
|
27
|
+
component.register_stat :elections_count, primary: true, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |components, start_at, end_at|
|
28
|
+
elections = Decidim::Elections::FilteredElections.for(components, start_at, end_at)
|
29
|
+
elections.count
|
30
|
+
end
|
31
|
+
|
26
32
|
component.register_resource(:election) do |resource|
|
27
33
|
resource.model_class_name = "Decidim::Elections::Election"
|
34
|
+
resource.actions = %w(vote)
|
35
|
+
resource.card = "decidim/elections/election"
|
28
36
|
end
|
29
37
|
|
30
38
|
component.register_resource(:question) do |resource|
|
@@ -35,10 +43,6 @@ Decidim.register_component(:elections) do |component|
|
|
35
43
|
resource.model_class_name = "Decidim::Elections::Answer"
|
36
44
|
end
|
37
45
|
|
38
|
-
component.register_stat :elections_count, primary: true, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |components, _start_at, _end_at|
|
39
|
-
Decidim::Elections::Election.where(component: components).count
|
40
|
-
end
|
41
|
-
|
42
46
|
component.seeds do |participatory_space|
|
43
47
|
admin_user = Decidim::User.find_by(
|
44
48
|
organization: participatory_space.organization,
|
@@ -68,12 +72,12 @@ Decidim.register_component(:elections) do |component|
|
|
68
72
|
{
|
69
73
|
component: component,
|
70
74
|
title: Decidim::Faker::Localized.sentence(2),
|
71
|
-
subtitle: Decidim::Faker::Localized.sentence(2),
|
72
75
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
73
76
|
Decidim::Faker::Localized.paragraph(3)
|
74
77
|
end,
|
75
78
|
start_time: 3.weeks.from_now,
|
76
|
-
end_time: 3.weeks.from_now + 4.hours
|
79
|
+
end_time: 3.weeks.from_now + 4.hours,
|
80
|
+
published_at: Faker::Boolean.boolean(0.5) ? 1.week.ago : nil
|
77
81
|
},
|
78
82
|
visibility: "all"
|
79
83
|
)
|
@@ -88,9 +92,10 @@ Decidim.register_component(:elections) do |component|
|
|
88
92
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
89
93
|
Decidim::Faker::Localized.paragraph(3)
|
90
94
|
end,
|
91
|
-
max_selections: Faker::Number.between(
|
95
|
+
max_selections: Faker::Number.between(1, 5),
|
92
96
|
weight: Faker::Number.number(1),
|
93
|
-
random_answers_order: Faker::Boolean.boolean(0.5)
|
97
|
+
random_answers_order: Faker::Boolean.boolean(0.5),
|
98
|
+
min_selections: Faker::Number.between(0, 1)
|
94
99
|
},
|
95
100
|
visibility: "all"
|
96
101
|
)
|
@@ -113,8 +118,8 @@ Decidim.register_component(:elections) do |component|
|
|
113
118
|
Decidim::Attachment.create!(
|
114
119
|
title: Decidim::Faker::Localized.sentence(2),
|
115
120
|
description: Decidim::Faker::Localized.sentence(5),
|
116
|
-
|
117
|
-
|
121
|
+
attached_to: answer,
|
122
|
+
file: File.new(File.join(__dir__, "seeds", "city.jpeg")) # Keep after attached_to
|
118
123
|
)
|
119
124
|
end
|
120
125
|
end
|
@@ -10,11 +10,18 @@ module Decidim
|
|
10
10
|
isolate_namespace Decidim::Elections
|
11
11
|
|
12
12
|
routes do
|
13
|
-
resources :elections, only: [:index, :show]
|
13
|
+
resources :elections, only: [:index, :show] do
|
14
|
+
resource :vote
|
15
|
+
end
|
14
16
|
|
15
17
|
root to: "elections#index"
|
16
18
|
end
|
17
19
|
|
20
|
+
initializer "decidim_elections.add_cells_view_paths" do
|
21
|
+
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Elections::Engine.root}/app/cells")
|
22
|
+
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Elections::Engine.root}/app/views") # for partials
|
23
|
+
end
|
24
|
+
|
18
25
|
initializer "decidim_elections.assets" do |app|
|
19
26
|
app.config.assets.precompile += %w(decidim_elections_manifest.js decidim_elections_manifest.css)
|
20
27
|
end
|
@@ -10,37 +10,90 @@ FactoryBot.define do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
factory :election, class: "Decidim::Elections::Election" do
|
13
|
+
upcoming
|
13
14
|
title { generate_localized_title }
|
14
|
-
subtitle { Decidim::Faker::Localized.sentence(3) }
|
15
15
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
16
|
-
start_time { 1.day.from_now }
|
17
16
|
end_time { 3.days.from_now }
|
17
|
+
published_at { nil }
|
18
18
|
component { create(:elections_component) }
|
19
19
|
|
20
|
+
trait :upcoming do
|
21
|
+
start_time { 1.day.from_now }
|
22
|
+
end
|
23
|
+
|
20
24
|
trait :started do
|
21
|
-
start_time {
|
25
|
+
start_time { 2.days.ago }
|
26
|
+
end
|
27
|
+
|
28
|
+
trait :ongoing do
|
29
|
+
started
|
30
|
+
end
|
31
|
+
|
32
|
+
trait :finished do
|
33
|
+
started
|
34
|
+
end_time { 1.day.ago }
|
35
|
+
end
|
36
|
+
|
37
|
+
trait :published do
|
38
|
+
published_at { Time.current }
|
22
39
|
end
|
23
40
|
|
24
41
|
trait :complete do
|
25
42
|
after(:build) do |election, _evaluator|
|
26
|
-
|
43
|
+
election.questions << build(:question, :yes_no, election: election, weight: 1)
|
44
|
+
election.questions << build(:question, :candidates, election: election, weight: 3)
|
45
|
+
election.questions << build(:question, :projects, election: election, weight: 2)
|
46
|
+
election.questions << build(:question, :nota, election: election, weight: 4)
|
27
47
|
end
|
28
48
|
end
|
29
49
|
end
|
30
50
|
|
31
51
|
factory :question, class: "Decidim::Elections::Question" do
|
52
|
+
transient do
|
53
|
+
more_information { false }
|
54
|
+
answers { 3 }
|
55
|
+
end
|
56
|
+
|
32
57
|
election
|
33
58
|
title { generate_localized_title }
|
34
59
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
60
|
+
min_selections { 1 }
|
35
61
|
max_selections { 1 }
|
36
62
|
weight { Faker::Number.number(1) }
|
37
63
|
random_answers_order { true }
|
38
64
|
|
39
65
|
trait :complete do
|
40
|
-
after(:build) do |question,
|
41
|
-
|
66
|
+
after(:build) do |question, evaluator|
|
67
|
+
overrides = { question: question }
|
68
|
+
overrides[:description] = nil unless evaluator.more_information
|
69
|
+
question.answers = build_list(:election_answer, evaluator.answers, overrides)
|
42
70
|
end
|
43
71
|
end
|
72
|
+
|
73
|
+
trait :yes_no do
|
74
|
+
complete
|
75
|
+
random_answers_order { false }
|
76
|
+
end
|
77
|
+
|
78
|
+
trait :candidates do
|
79
|
+
complete
|
80
|
+
max_selections { 6 }
|
81
|
+
answers { 10 }
|
82
|
+
end
|
83
|
+
|
84
|
+
trait :projects do
|
85
|
+
complete
|
86
|
+
max_selections { 3 }
|
87
|
+
answers { 6 }
|
88
|
+
more_information { true }
|
89
|
+
end
|
90
|
+
|
91
|
+
trait :nota do
|
92
|
+
complete
|
93
|
+
max_selections { 4 }
|
94
|
+
answers { 8 }
|
95
|
+
min_selections { 0 }
|
96
|
+
end
|
44
97
|
end
|
45
98
|
|
46
99
|
factory :election_answer, class: "Decidim::Elections::Answer" do
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :decidim_elections do
|
4
|
+
desc "Add a new client to the bulletin board"
|
5
|
+
|
6
|
+
IDENTIFICATION_PRIVATE_KEY_SIZE = 4096
|
7
|
+
|
8
|
+
task :generate_identification_keys do
|
9
|
+
identification_private_key = OpenSSL::PKey::RSA.new(IDENTIFICATION_PRIVATE_KEY_SIZE)
|
10
|
+
|
11
|
+
puts identification_private_key.to_s
|
12
|
+
puts "\n"
|
13
|
+
puts identification_private_key.public_key.to_s
|
14
|
+
puts "\nAbove are the generated private and public keys.\n\nSee Decidim docs at docs/services/bulletin_board.md in order to set them up.\n\n"
|
15
|
+
end
|
16
|
+
end
|
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.
|
4
|
+
version: 0.23.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Diez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-core
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.23.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.
|
26
|
+
version: 0.23.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-proposals
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.23.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.
|
40
|
+
version: 0.23.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-admin
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.23.0
|
48
48
|
type: :development
|
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.
|
54
|
+
version: 0.23.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim-dev
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.23.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.
|
68
|
+
version: 0.23.0
|
69
69
|
description: The Elections module adds elections to any participatory space.
|
70
70
|
email:
|
71
71
|
- leo@codegram.com
|
@@ -77,31 +77,55 @@ files:
|
|
77
77
|
- Rakefile
|
78
78
|
- app/assets/config/decidim_elections_manifest.js
|
79
79
|
- app/assets/images/decidim/elections/icon.svg
|
80
|
+
- app/assets/javascripts/decidim/elections/vote.js.es6
|
81
|
+
- app/assets/stylesheets/decidim/elections/elections.scss
|
82
|
+
- app/assets/stylesheets/decidim/elections/focus/_evote.scss
|
83
|
+
- app/assets/stylesheets/decidim/elections/focus/_focus.scss
|
84
|
+
- app/cells/decidim/elections/election_cell.rb
|
85
|
+
- app/cells/decidim/elections/election_m/data.erb
|
86
|
+
- app/cells/decidim/elections/election_m/footer.erb
|
87
|
+
- app/cells/decidim/elections/election_m_cell.rb
|
88
|
+
- app/cells/decidim/elections/voting_step_navigation/show.erb
|
89
|
+
- app/cells/decidim/elections/voting_step_navigation_cell.rb
|
80
90
|
- app/commands/decidim/elections/admin/create_answer.rb
|
81
91
|
- app/commands/decidim/elections/admin/create_election.rb
|
82
92
|
- app/commands/decidim/elections/admin/create_question.rb
|
83
93
|
- app/commands/decidim/elections/admin/destroy_answer.rb
|
84
94
|
- app/commands/decidim/elections/admin/destroy_election.rb
|
85
95
|
- app/commands/decidim/elections/admin/destroy_question.rb
|
96
|
+
- app/commands/decidim/elections/admin/import_proposals_to_elections.rb
|
97
|
+
- app/commands/decidim/elections/admin/publish_election.rb
|
98
|
+
- app/commands/decidim/elections/admin/unpublish_election.rb
|
86
99
|
- app/commands/decidim/elections/admin/update_answer.rb
|
87
100
|
- app/commands/decidim/elections/admin/update_election.rb
|
88
101
|
- app/commands/decidim/elections/admin/update_question.rb
|
102
|
+
- app/controllers/concerns/decidim/elections/orderable.rb
|
89
103
|
- app/controllers/decidim/elections/admin/answers_controller.rb
|
90
104
|
- app/controllers/decidim/elections/admin/application_controller.rb
|
91
105
|
- app/controllers/decidim/elections/admin/elections_controller.rb
|
106
|
+
- app/controllers/decidim/elections/admin/proposals_imports_controller.rb
|
92
107
|
- app/controllers/decidim/elections/admin/questions_controller.rb
|
93
108
|
- app/controllers/decidim/elections/application_controller.rb
|
94
109
|
- app/controllers/decidim/elections/elections_controller.rb
|
110
|
+
- app/controllers/decidim/elections/votes_controller.rb
|
111
|
+
- app/events/decidim/elections/election_published_event.rb
|
95
112
|
- app/forms/decidim/elections/admin/answer_form.rb
|
113
|
+
- app/forms/decidim/elections/admin/answer_import_proposals_form.rb
|
96
114
|
- app/forms/decidim/elections/admin/election_form.rb
|
97
115
|
- app/forms/decidim/elections/admin/question_form.rb
|
98
116
|
- app/helpers/decidim/elections/application_helper.rb
|
117
|
+
- app/helpers/decidim/elections/election_cells_helper.rb
|
118
|
+
- app/helpers/decidim/elections/votes_helper.rb
|
99
119
|
- app/models/decidim/elections/answer.rb
|
100
120
|
- app/models/decidim/elections/application_record.rb
|
101
121
|
- app/models/decidim/elections/election.rb
|
102
122
|
- app/models/decidim/elections/question.rb
|
103
123
|
- app/permissions/decidim/elections/admin/permissions.rb
|
104
124
|
- app/permissions/decidim/elections/permissions.rb
|
125
|
+
- app/presenters/decidim/elections/admin_log/election_presenter.rb
|
126
|
+
- app/presenters/decidim/elections/election_presenter.rb
|
127
|
+
- app/queries/decidim/elections/filtered_elections.rb
|
128
|
+
- app/services/decidim/elections/election_search.rb
|
105
129
|
- app/types/decidim/elections/election_answer_type.rb
|
106
130
|
- app/types/decidim/elections/election_question_type.rb
|
107
131
|
- app/types/decidim/elections/election_type.rb
|
@@ -115,26 +139,49 @@ files:
|
|
115
139
|
- app/views/decidim/elections/admin/elections/edit.html.erb
|
116
140
|
- app/views/decidim/elections/admin/elections/index.html.erb
|
117
141
|
- app/views/decidim/elections/admin/elections/new.html.erb
|
142
|
+
- app/views/decidim/elections/admin/proposals_imports/new.html.erb
|
118
143
|
- app/views/decidim/elections/admin/questions/_form.html.erb
|
119
144
|
- app/views/decidim/elections/admin/questions/edit.html.erb
|
120
145
|
- app/views/decidim/elections/admin/questions/index.html.erb
|
121
146
|
- app/views/decidim/elections/admin/questions/new.html.erb
|
147
|
+
- app/views/decidim/elections/elections/_count.html.erb
|
148
|
+
- app/views/decidim/elections/elections/_election.html.erb
|
149
|
+
- app/views/decidim/elections/elections/_elections.html.erb
|
150
|
+
- app/views/decidim/elections/elections/_filters.html.erb
|
151
|
+
- app/views/decidim/elections/elections/_filters_small_view.html.erb
|
122
152
|
- app/views/decidim/elections/elections/index.html.erb
|
153
|
+
- app/views/decidim/elections/elections/index.js.erb
|
123
154
|
- app/views/decidim/elections/elections/show.html.erb
|
155
|
+
- app/views/decidim/elections/votes/_election_votes_confirm.html.erb
|
156
|
+
- app/views/decidim/elections/votes/_election_votes_confirm_footer.html.erb
|
157
|
+
- app/views/decidim/elections/votes/_election_votes_confirmed.html.erb
|
158
|
+
- app/views/decidim/elections/votes/_election_votes_encrypting.html.erb
|
159
|
+
- app/views/decidim/elections/votes/_election_votes_header.html.erb
|
160
|
+
- app/views/decidim/elections/votes/_election_votes_modal.html.erb
|
161
|
+
- app/views/decidim/elections/votes/_election_votes_question.html.erb
|
162
|
+
- app/views/decidim/elections/votes/_election_votes_steps_header.html.erb
|
163
|
+
- app/views/decidim/elections/votes/new.html.erb
|
164
|
+
- app/views/layouts/decidim/_election_votes_header.html.erb
|
165
|
+
- app/views/layouts/decidim/election_votes.html.erb
|
124
166
|
- config/i18n-tasks.yml
|
167
|
+
- config/locales/am-ET.yml
|
125
168
|
- config/locales/ar.yml
|
126
169
|
- config/locales/bg-BG.yml
|
170
|
+
- config/locales/bg.yml
|
127
171
|
- config/locales/ca.yml
|
128
172
|
- config/locales/cs.yml
|
129
173
|
- config/locales/da-DK.yml
|
174
|
+
- config/locales/da.yml
|
130
175
|
- config/locales/de.yml
|
131
176
|
- config/locales/el.yml
|
132
177
|
- config/locales/en.yml
|
133
178
|
- config/locales/eo-UY.yml
|
179
|
+
- config/locales/eo.yml
|
134
180
|
- config/locales/es-MX.yml
|
135
181
|
- config/locales/es-PY.yml
|
136
182
|
- config/locales/es.yml
|
137
183
|
- config/locales/et-EE.yml
|
184
|
+
- config/locales/et.yml
|
138
185
|
- config/locales/eu.yml
|
139
186
|
- config/locales/fi-plain.yml
|
140
187
|
- config/locales/fi.yml
|
@@ -143,16 +190,24 @@ files:
|
|
143
190
|
- config/locales/ga-IE.yml
|
144
191
|
- config/locales/gl.yml
|
145
192
|
- config/locales/hr-HR.yml
|
193
|
+
- config/locales/hr.yml
|
146
194
|
- config/locales/hu.yml
|
147
195
|
- config/locales/id-ID.yml
|
148
196
|
- config/locales/is-IS.yml
|
197
|
+
- config/locales/is.yml
|
149
198
|
- config/locales/it.yml
|
150
199
|
- config/locales/ja-JP.yml
|
200
|
+
- config/locales/ja.yml
|
201
|
+
- config/locales/ko-KR.yml
|
202
|
+
- config/locales/ko.yml
|
151
203
|
- config/locales/lt-LT.yml
|
152
|
-
- config/locales/
|
204
|
+
- config/locales/lt.yml
|
205
|
+
- config/locales/lv.yml
|
153
206
|
- config/locales/mt-MT.yml
|
207
|
+
- config/locales/mt.yml
|
154
208
|
- config/locales/nl.yml
|
155
209
|
- config/locales/no.yml
|
210
|
+
- config/locales/om-ET.yml
|
156
211
|
- config/locales/pl.yml
|
157
212
|
- config/locales/pt-BR.yml
|
158
213
|
- config/locales/pt.yml
|
@@ -160,21 +215,32 @@ files:
|
|
160
215
|
- config/locales/ru.yml
|
161
216
|
- config/locales/sk.yml
|
162
217
|
- config/locales/sl.yml
|
218
|
+
- config/locales/so-SO.yml
|
163
219
|
- config/locales/sr-CS.yml
|
164
220
|
- config/locales/sv.yml
|
221
|
+
- config/locales/ti-ER.yml
|
165
222
|
- config/locales/tr-TR.yml
|
166
223
|
- config/locales/uk.yml
|
224
|
+
- config/locales/vi-VN.yml
|
225
|
+
- config/locales/vi.yml
|
226
|
+
- config/locales/zh-CN.yml
|
227
|
+
- config/locales/zh-TW.yml
|
167
228
|
- db/migrate/20200430083618_create_decidim_elections_elections.rb
|
168
229
|
- db/migrate/20200518082327_create_decidim_elections_questions.rb
|
169
230
|
- db/migrate/20200518084144_create_decidim_elections_answers.rb
|
231
|
+
- db/migrate/20200601141412_add_published_at_to_elections.rb
|
232
|
+
- db/migrate/20200807125040_remove_subtitle_from_decidim_elections.rb
|
233
|
+
- db/migrate/20200910103648_add_min_selections_to_decidim_elections_questions.rb
|
170
234
|
- lib/decidim/elections.rb
|
171
235
|
- lib/decidim/elections/admin.rb
|
172
236
|
- lib/decidim/elections/admin_engine.rb
|
237
|
+
- lib/decidim/elections/bulletin_board_client.rb
|
173
238
|
- lib/decidim/elections/component.rb
|
174
239
|
- lib/decidim/elections/engine.rb
|
175
240
|
- lib/decidim/elections/seeds/city.jpeg
|
176
241
|
- lib/decidim/elections/test/factories.rb
|
177
242
|
- lib/decidim/elections/version.rb
|
243
|
+
- lib/tasks/decidim_elections.rake
|
178
244
|
homepage: https://github.com/decidim/decidim-elections
|
179
245
|
licenses:
|
180
246
|
- AGPL-3.0
|
@@ -187,14 +253,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
253
|
requirements:
|
188
254
|
- - ">="
|
189
255
|
- !ruby/object:Gem::Version
|
190
|
-
version: '2.
|
256
|
+
version: '2.6'
|
191
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
258
|
requirements:
|
193
259
|
- - ">="
|
194
260
|
- !ruby/object:Gem::Version
|
195
261
|
version: '0'
|
196
262
|
requirements: []
|
197
|
-
rubygems_version: 3.
|
263
|
+
rubygems_version: 3.0.3
|
198
264
|
signing_key:
|
199
265
|
specification_version: 4
|
200
266
|
summary: A decidim elections module
|