decidim-elections 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +31 -0
  3. data/Rakefile +3 -0
  4. data/app/assets/config/decidim_elections_manifest.js +0 -0
  5. data/app/assets/images/decidim/elections/icon.svg +1 -0
  6. data/app/commands/decidim/elections/admin/create_answer.rb +71 -0
  7. data/app/commands/decidim/elections/admin/create_election.rb +48 -0
  8. data/app/commands/decidim/elections/admin/create_question.rb +52 -0
  9. data/app/commands/decidim/elections/admin/destroy_answer.rb +50 -0
  10. data/app/commands/decidim/elections/admin/destroy_election.rb +46 -0
  11. data/app/commands/decidim/elections/admin/destroy_question.rb +46 -0
  12. data/app/commands/decidim/elections/admin/update_answer.rb +73 -0
  13. data/app/commands/decidim/elections/admin/update_election.rb +48 -0
  14. data/app/commands/decidim/elections/admin/update_question.rb +52 -0
  15. data/app/controllers/decidim/elections/admin/answers_controller.rb +92 -0
  16. data/app/controllers/decidim/elections/admin/application_controller.rb +15 -0
  17. data/app/controllers/decidim/elections/admin/elections_controller.rb +82 -0
  18. data/app/controllers/decidim/elections/admin/questions_controller.rb +86 -0
  19. data/app/controllers/decidim/elections/application_controller.rb +13 -0
  20. data/app/controllers/decidim/elections/elections_controller.rb +9 -0
  21. data/app/forms/decidim/elections/admin/answer_form.rb +53 -0
  22. data/app/forms/decidim/elections/admin/election_form.rb +24 -0
  23. data/app/forms/decidim/elections/admin/question_form.rb +26 -0
  24. data/app/helpers/decidim/elections/application_helper.rb +10 -0
  25. data/app/models/decidim/elections/answer.rb +26 -0
  26. data/app/models/decidim/elections/application_record.rb +10 -0
  27. data/app/models/decidim/elections/election.rb +22 -0
  28. data/app/models/decidim/elections/question.rb +20 -0
  29. data/app/permissions/decidim/elections/admin/permissions.rb +42 -0
  30. data/app/permissions/decidim/elections/permissions.rb +16 -0
  31. data/app/types/decidim/elections/election_answer_type.rb +24 -0
  32. data/app/types/decidim/elections/election_question_type.rb +25 -0
  33. data/app/types/decidim/elections/election_type.rb +26 -0
  34. data/app/types/decidim/elections/elections_type.rb +32 -0
  35. data/app/views/decidim/elections/admin/answers/_form.html.erb +25 -0
  36. data/app/views/decidim/elections/admin/answers/edit.html.erb +7 -0
  37. data/app/views/decidim/elections/admin/answers/index.html.erb +46 -0
  38. data/app/views/decidim/elections/admin/answers/new.html.erb +7 -0
  39. data/app/views/decidim/elections/admin/answers/proposals_picker.html.erb +1 -0
  40. data/app/views/decidim/elections/admin/elections/_form.html.erb +28 -0
  41. data/app/views/decidim/elections/admin/elections/edit.html.erb +7 -0
  42. data/app/views/decidim/elections/admin/elections/index.html.erb +54 -0
  43. data/app/views/decidim/elections/admin/elections/new.html.erb +7 -0
  44. data/app/views/decidim/elections/admin/questions/_form.html.erb +27 -0
  45. data/app/views/decidim/elections/admin/questions/edit.html.erb +7 -0
  46. data/app/views/decidim/elections/admin/questions/index.html.erb +53 -0
  47. data/app/views/decidim/elections/admin/questions/new.html.erb +7 -0
  48. data/app/views/decidim/elections/elections/index.html.erb +1 -0
  49. data/app/views/decidim/elections/elections/show.html.erb +0 -0
  50. data/config/i18n-tasks.yml +10 -0
  51. data/config/locales/ar.yml +1 -0
  52. data/config/locales/bg-BG.yml +7 -0
  53. data/config/locales/ca.yml +132 -0
  54. data/config/locales/cs.yml +138 -0
  55. data/config/locales/da-DK.yml +1 -0
  56. data/config/locales/de.yml +132 -0
  57. data/config/locales/el.yml +132 -0
  58. data/config/locales/en.yml +133 -0
  59. data/config/locales/eo-UY.yml +1 -0
  60. data/config/locales/es-MX.yml +132 -0
  61. data/config/locales/es-PY.yml +132 -0
  62. data/config/locales/es.yml +132 -0
  63. data/config/locales/et-EE.yml +1 -0
  64. data/config/locales/eu.yml +1 -0
  65. data/config/locales/fi-plain.yml +132 -0
  66. data/config/locales/fi.yml +132 -0
  67. data/config/locales/fr-CA.yml +132 -0
  68. data/config/locales/fr.yml +132 -0
  69. data/config/locales/ga-IE.yml +1 -0
  70. data/config/locales/gl.yml +1 -0
  71. data/config/locales/hr-HR.yml +1 -0
  72. data/config/locales/hu.yml +1 -0
  73. data/config/locales/id-ID.yml +1 -0
  74. data/config/locales/is-IS.yml +1 -0
  75. data/config/locales/it.yml +132 -0
  76. data/config/locales/ja-JP.yml +129 -0
  77. data/config/locales/lt-LT.yml +1 -0
  78. data/config/locales/lv-LV.yml +135 -0
  79. data/config/locales/mt-MT.yml +1 -0
  80. data/config/locales/nl.yml +132 -0
  81. data/config/locales/no.yml +9 -0
  82. data/config/locales/pl.yml +138 -0
  83. data/config/locales/pt-BR.yml +1 -0
  84. data/config/locales/pt.yml +132 -0
  85. data/config/locales/ro-RO.yml +135 -0
  86. data/config/locales/ru.yml +1 -0
  87. data/config/locales/sk.yml +1 -0
  88. data/config/locales/sl.yml +5 -0
  89. data/config/locales/sr-CS.yml +1 -0
  90. data/config/locales/sv.yml +132 -0
  91. data/config/locales/tr-TR.yml +1 -0
  92. data/config/locales/uk.yml +1 -0
  93. data/db/migrate/20200430083618_create_decidim_elections_elections.rb +15 -0
  94. data/db/migrate/20200518082327_create_decidim_elections_questions.rb +14 -0
  95. data/db/migrate/20200518084144_create_decidim_elections_answers.rb +12 -0
  96. data/lib/decidim/elections.rb +13 -0
  97. data/lib/decidim/elections/admin.rb +10 -0
  98. data/lib/decidim/elections/admin_engine.rb +29 -0
  99. data/lib/decidim/elections/component.rb +123 -0
  100. data/lib/decidim/elections/engine.rb +23 -0
  101. data/lib/decidim/elections/seeds/city.jpeg +0 -0
  102. data/lib/decidim/elections/test/factories.rb +52 -0
  103. data/lib/decidim/elections/version.rb +10 -0
  104. metadata +201 -0
@@ -0,0 +1 @@
1
+ mt:
@@ -0,0 +1,132 @@
1
+ nl:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Beschrijving
6
+ image: Afbeelding
7
+ proposals: Verwante voorstellen
8
+ title: Aanspreektitel
9
+ election:
10
+ description: Beschrijving
11
+ end_time: Stemming eindigt op
12
+ start_time: Stemming begint om
13
+ subtitle: Ondertiteling
14
+ title: Aanspreektitel
15
+ question:
16
+ description: Beschrijving
17
+ max_selections: Maximum aantal selecties
18
+ title: Aanspreektitel
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Moet opnieuw worden gekoppeld
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Beantwoorden
29
+ other: Antwoorden
30
+ decidim/elections/election:
31
+ one: Verkiezing
32
+ other: Verkiezingen
33
+ decidim/elections/question:
34
+ one: Vraag
35
+ other: vragen
36
+ decidim:
37
+ components:
38
+ elections:
39
+ name: Verkiezingen
40
+ settings:
41
+ global:
42
+ announcement: Mededeling
43
+ step:
44
+ announcement: Mededeling
45
+ elections:
46
+ actions:
47
+ confirm_destroy: Weet je het zeker?
48
+ destroy: Vernietig
49
+ edit: Bewerken
50
+ new: Nieuwe %{name}
51
+ preview: Voorvertoning
52
+ title: acties
53
+ admin:
54
+ answers:
55
+ create:
56
+ invalid: Er is een fout opgetreden bij het maken van dit antwoord
57
+ success: Antwoord succesvol aangemaakt
58
+ destroy:
59
+ invalid: Er was een probleem bij het verwijderen van dit antwoord
60
+ success: Antwoord succesvol verwijderd
61
+ edit:
62
+ title: Antwoord bewerken
63
+ update: Antwoord bijwerken
64
+ index:
65
+ title: Antwoorden
66
+ new:
67
+ create: Antwoord maken
68
+ title: Nieuw antwoord
69
+ update:
70
+ invalid: Er was een probleem bij het bijwerken van dit antwoord
71
+ success: Antwoord succesvol bijgewerkt
72
+ elections:
73
+ create:
74
+ invalid: Er is een fout opgetreden bij het maken van deze verkiezing
75
+ success: Verkiezing succesvol aangemaakt
76
+ destroy:
77
+ invalid: Er was een probleem bij het verwijderen van deze verkiezingen
78
+ success: Verkiezing succesvol verwijderd
79
+ edit:
80
+ title: Bewerken van verkiezing
81
+ update: Keuze bijwerken
82
+ index:
83
+ title: Verkiezingen
84
+ new:
85
+ create: Maak verkiezing aan
86
+ title: Nieuwe verkiezing
87
+ update:
88
+ invalid: Er is een probleem opgetreden bij het bijwerken van deze verkiezingen
89
+ success: Verkiezing succesvol bijgewerkt
90
+ models:
91
+ answer:
92
+ name: Beantwoorden
93
+ election:
94
+ name: Verkiezing
95
+ question:
96
+ name: Vraag
97
+ questions:
98
+ create:
99
+ invalid: Er is een fout opgetreden bij het maken van deze vraag
100
+ success: Vraag met succes aangemaakt
101
+ destroy:
102
+ invalid: Er was een probleem bij het verwijderen van deze vraag
103
+ success: Vraag succesvol verwijderd
104
+ edit:
105
+ title: Vraag bewerken
106
+ update: Vraag bijwerken
107
+ index:
108
+ title: vragen
109
+ new:
110
+ create: Vraag aanmaken
111
+ title: Nieuwe vraag
112
+ update:
113
+ invalid: Er is een fout opgetreden bij het bijwerken van deze vraag
114
+ success: Vraag met succes bijgewerkt
115
+ models:
116
+ answer:
117
+ fields:
118
+ proposals: Voorstellen
119
+ title: Aanspreektitel
120
+ election:
121
+ fields:
122
+ end_time: Beëindigen op
123
+ start_time: Begint om
124
+ title: Aanspreektitel
125
+ question:
126
+ fields:
127
+ answers: Antwoorden
128
+ max_selections: Max. selectie
129
+ title: Aanspreektitel
130
+ participatory_processes:
131
+ statistics:
132
+ elections_count: Verkiezingen
@@ -0,0 +1,9 @@
1
+ "no":
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Beskrivelse
6
+ election:
7
+ description: Beskrivelse
8
+ question:
9
+ description: Beskrivelse
@@ -0,0 +1,138 @@
1
+ pl:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Opis
6
+ image: Obraz
7
+ proposals: Powiązane propozycje
8
+ title: Tytuł
9
+ election:
10
+ description: Opis
11
+ end_time: Głosowanie kończy się
12
+ start_time: Głosowanie rozpoczyna się
13
+ subtitle: Podtytuł
14
+ title: Tytuł
15
+ question:
16
+ description: Opis
17
+ max_selections: Maksymalna liczba wyborów
18
+ title: Tytuł
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Załącz ponownie
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Odpowiedź
29
+ few: Odpowiedzi
30
+ many: Odpowiedzi
31
+ other: Odpowiedzi
32
+ decidim/elections/election:
33
+ one: Wybór
34
+ few: Wybory
35
+ many: Wybory
36
+ other: Wybory
37
+ decidim/elections/question:
38
+ one: Pytanie
39
+ few: Pytania
40
+ many: Pytania
41
+ other: Pytania
42
+ decidim:
43
+ components:
44
+ elections:
45
+ name: Wybory
46
+ settings:
47
+ global:
48
+ announcement: Ogłoszenie
49
+ step:
50
+ announcement: Ogłoszenie
51
+ elections:
52
+ actions:
53
+ confirm_destroy: Na pewno?
54
+ destroy: Usuń
55
+ edit: Edytuj
56
+ new: Nowy %{name}
57
+ preview: Podgląd
58
+ title: Działania
59
+ admin:
60
+ answers:
61
+ create:
62
+ invalid: Wystąpił błąd podczas tworzenia odpowiedzi
63
+ success: Odpowiedź została utworzona
64
+ destroy:
65
+ invalid: Wystąpił błąd podczas usuwania odpowiedzi
66
+ success: Odpowiedź została usunięta
67
+ edit:
68
+ title: Edytuj odpowiedź
69
+ update: Aktualizuj odpowiedź
70
+ index:
71
+ title: Odpowiedzi
72
+ new:
73
+ create: Utwórz odpowiedź
74
+ title: Nowa odpowiedź
75
+ update:
76
+ invalid: Wystąpił błąd podczas aktualizowania odpowiedzi
77
+ success: Odpowiedź została zaktualizowana
78
+ elections:
79
+ create:
80
+ invalid: Wystąpił błąd podczas tworzenia wyboru
81
+ success: Wybór został utworzony
82
+ destroy:
83
+ invalid: Wystąpił błąd podczas usuwania wyboru
84
+ success: Wybór został usunięty
85
+ edit:
86
+ title: Edytuj wybór
87
+ update: Aktualizuj wybór
88
+ index:
89
+ title: Wybory
90
+ new:
91
+ create: Utwórz wybór
92
+ title: Nowy wybór
93
+ update:
94
+ invalid: Wystąpił błąd podczas aktualizowania wyboru
95
+ success: Wybór zostały zaktualizowany
96
+ models:
97
+ answer:
98
+ name: Odpowiedź
99
+ election:
100
+ name: Wybór
101
+ question:
102
+ name: Pytanie
103
+ questions:
104
+ create:
105
+ invalid: Wystąpił błąd podczas tworzenia pytania
106
+ success: Pytanie zostało utworzone
107
+ destroy:
108
+ invalid: Wystąpił błąd podczas usuwania pytania
109
+ success: Pytanie zostało usunięte
110
+ edit:
111
+ title: Edytuj pytanie
112
+ update: Zaktualizuj pytanie
113
+ index:
114
+ title: Pytania
115
+ new:
116
+ create: Utwórz pytanie
117
+ title: Nowe pytanie
118
+ update:
119
+ invalid: Wystąpił błąd podczas aktualizowania tego pytania
120
+ success: Pytanie zostało zaktualizowane
121
+ models:
122
+ answer:
123
+ fields:
124
+ proposals: Propozycje
125
+ title: Tytuł
126
+ election:
127
+ fields:
128
+ end_time: Kończy się
129
+ start_time: Zaczyna się
130
+ title: Tytuł
131
+ question:
132
+ fields:
133
+ answers: Odpowiedzi
134
+ max_selections: Maks. liczba opcji do zaznaczenia
135
+ title: Tytuł
136
+ participatory_processes:
137
+ statistics:
138
+ elections_count: Wybory
@@ -0,0 +1 @@
1
+ pt:
@@ -0,0 +1,132 @@
1
+ pt:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Descrição
6
+ image: Imagem
7
+ proposals: Propostas relacionadas
8
+ title: Título
9
+ election:
10
+ description: Descrição
11
+ end_time: Votação termina às
12
+ start_time: Votação inicia-se às
13
+ subtitle: Subtítulo
14
+ title: Título
15
+ question:
16
+ description: Descrição
17
+ max_selections: Número máximo de seleções
18
+ title: Título
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Necessita de ser recolocado
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Resposta
29
+ other: Respostas
30
+ decidim/elections/election:
31
+ one: Eleição
32
+ other: Eleições
33
+ decidim/elections/question:
34
+ one: Pergunta
35
+ other: Perguntas
36
+ decidim:
37
+ components:
38
+ elections:
39
+ name: Eleições
40
+ settings:
41
+ global:
42
+ announcement: Anúncio
43
+ step:
44
+ announcement: Anúncio
45
+ elections:
46
+ actions:
47
+ confirm_destroy: Tem a certeza?
48
+ destroy: Destruir
49
+ edit: Editar
50
+ new: Novo %{name}
51
+ preview: Pré-visualizar
52
+ title: Ações
53
+ admin:
54
+ answers:
55
+ create:
56
+ invalid: Ocorreu um problema ao criar esta resposta
57
+ success: Resposta criada corretamente
58
+ destroy:
59
+ invalid: Ocorreu um problema ao eliminar esta resposta
60
+ success: Resposta eliminada corretamente
61
+ edit:
62
+ title: Editar resposta
63
+ update: Atualizar resposta
64
+ index:
65
+ title: Respostas
66
+ new:
67
+ create: Criar resposta
68
+ title: Nova resposta
69
+ update:
70
+ invalid: Ocorreu um problema ao atualizar esta resposta
71
+ success: Resposta atualizada corretamente
72
+ elections:
73
+ create:
74
+ invalid: Ocorreu um problema ao criar esta eleição
75
+ success: Eleição criada corretamente
76
+ destroy:
77
+ invalid: Ocorreu um problema ao eliminar esta eleição
78
+ success: Eleição eliminada corretamente
79
+ edit:
80
+ title: Editar eleição
81
+ update: Atualizar eleição
82
+ index:
83
+ title: Eleições
84
+ new:
85
+ create: Criar eleição
86
+ title: Nova eleição
87
+ update:
88
+ invalid: Ocorreu um problema ao atualizar esta eleição
89
+ success: Eleição atualizada corretamente
90
+ models:
91
+ answer:
92
+ name: Resposta
93
+ election:
94
+ name: Eleição
95
+ question:
96
+ name: Pergunta
97
+ questions:
98
+ create:
99
+ invalid: Ocorreu um problema ao criar esta pergunta
100
+ success: Pergunta criada corretamente
101
+ destroy:
102
+ invalid: Ocorreu um problema ao eliminar esta pergunta
103
+ success: Pergunta eliminada corretamente
104
+ edit:
105
+ title: Editar pergunta
106
+ update: Atualizar pergunta
107
+ index:
108
+ title: Perguntas
109
+ new:
110
+ create: Criar pergunta
111
+ title: Nova pergunta
112
+ update:
113
+ invalid: Ocorreu um problema ao atualizar esta pergunta
114
+ success: Pergunta atualizada corretamente
115
+ models:
116
+ answer:
117
+ fields:
118
+ proposals: Propostas
119
+ title: Título
120
+ election:
121
+ fields:
122
+ end_time: Termina às
123
+ start_time: Inicia às
124
+ title: Título
125
+ question:
126
+ fields:
127
+ answers: Respostas
128
+ max_selections: Máx. de seleções
129
+ title: Título
130
+ participatory_processes:
131
+ statistics:
132
+ elections_count: Eleições
@@ -0,0 +1,135 @@
1
+ ro:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Descriere
6
+ image: Imagine
7
+ proposals: Propuneri conexe
8
+ title: Titlu
9
+ election:
10
+ description: Descriere
11
+ end_time: Votarea se încheie la
12
+ start_time: Votarea începe la
13
+ subtitle: Subtitrare
14
+ title: Titlu
15
+ question:
16
+ description: Descriere
17
+ max_selections: Numărul maxim de selecții
18
+ title: Titlu
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Trebuie să fie reatașate
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Răspuns
29
+ few: Răspunsuri
30
+ other: Răspunsuri
31
+ decidim/elections/election:
32
+ one: Alegeri
33
+ few: Alegeri
34
+ other: Alegeri
35
+ decidim/elections/question:
36
+ one: Întrebare
37
+ few: Întrebări
38
+ other: Întrebări
39
+ decidim:
40
+ components:
41
+ elections:
42
+ name: Alegeri
43
+ settings:
44
+ global:
45
+ announcement: Anunţ
46
+ step:
47
+ announcement: Anunţ
48
+ elections:
49
+ actions:
50
+ confirm_destroy: Ești sigur?
51
+ destroy: Distruge
52
+ edit: Editare
53
+ new: '%{name} nou'
54
+ preview: Previzualizare
55
+ title: Acțiuni
56
+ admin:
57
+ answers:
58
+ create:
59
+ invalid: A apărut o problemă la crearea acestui răspuns
60
+ success: Răspuns creat cu succes
61
+ destroy:
62
+ invalid: A apărut o eroare la ștergerea acestui răspuns
63
+ success: Răspuns șters cu succes
64
+ edit:
65
+ title: Editare răspuns
66
+ update: Actualizare răspuns
67
+ index:
68
+ title: Răspunsuri
69
+ new:
70
+ create: Creează răspuns
71
+ title: Răspuns nou
72
+ update:
73
+ invalid: A apărut o problemă la actualizarea acestui răspuns
74
+ success: Răspuns actualizat cu succes
75
+ elections:
76
+ create:
77
+ invalid: A apărut o problemă la crearea acestor alegeri
78
+ success: Alegeri create cu succes
79
+ destroy:
80
+ invalid: A apărut o eroare la ștergerea acestor alegeri
81
+ success: Alegerile au fost șterse
82
+ edit:
83
+ title: Editare alegeri
84
+ update: Actualizează alegerea
85
+ index:
86
+ title: Alegeri
87
+ new:
88
+ create: Creați alegeri
89
+ title: Alegeri noi
90
+ update:
91
+ invalid: A apărut o eroare la actualizarea acestei alegeri
92
+ success: Alegerile au fost actualizate
93
+ models:
94
+ answer:
95
+ name: Răspuns
96
+ election:
97
+ name: Alegeri
98
+ question:
99
+ name: Întrebare
100
+ questions:
101
+ create:
102
+ invalid: A apărut o problemă la crearea acestei întrebări
103
+ success: Întrebare creată cu succes
104
+ destroy:
105
+ invalid: A apărut o eroare la ștergerea acestei întrebări
106
+ success: Întrebarea a fost ștearsă
107
+ edit:
108
+ title: Editare întrebare
109
+ update: Actualizare întrebare
110
+ index:
111
+ title: Întrebări
112
+ new:
113
+ create: Crează întrebare
114
+ title: Întrebare nouă
115
+ update:
116
+ invalid: A apărut o eroare la actualizarea acestei întrebări
117
+ success: Întrebare actualizată cu succes
118
+ models:
119
+ answer:
120
+ fields:
121
+ proposals: Propuneri
122
+ title: Titlu
123
+ election:
124
+ fields:
125
+ end_time: Sfârșit la
126
+ start_time: Începe la
127
+ title: Titlu
128
+ question:
129
+ fields:
130
+ answers: Răspunsuri
131
+ max_selections: Selecții maxime
132
+ title: Titlu
133
+ participatory_processes:
134
+ statistics:
135
+ elections_count: Alegeri