decidim-elections 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
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,132 @@
1
+ es:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Descripción
6
+ image: Imagen
7
+ proposals: Propuestas relacionadas
8
+ title: Título
9
+ election:
10
+ description: Descripción
11
+ end_time: La votación acaba el
12
+ start_time: La votación empieza el
13
+ subtitle: Subtítulo
14
+ title: Título
15
+ question:
16
+ description: Descripción
17
+ max_selections: Número máximo de opciones
18
+ title: Título
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Es necesario volver a adjuntar el archivo
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Respuesta
29
+ other: Respuestas
30
+ decidim/elections/election:
31
+ one: Votación
32
+ other: Votaciones
33
+ decidim/elections/question:
34
+ one: Pregunta
35
+ other: Preguntas
36
+ decidim:
37
+ components:
38
+ elections:
39
+ name: Votaciones
40
+ settings:
41
+ global:
42
+ announcement: Aviso
43
+ step:
44
+ announcement: Aviso
45
+ elections:
46
+ actions:
47
+ confirm_destroy: '¿Estás segura?'
48
+ destroy: Destruir
49
+ edit: Editar
50
+ new: Nueva %{name}
51
+ preview: Previsualizar
52
+ title: Acciones
53
+ admin:
54
+ answers:
55
+ create:
56
+ invalid: Se ha producido un error al crear esta respuesta
57
+ success: Respuesta creada con éxito
58
+ destroy:
59
+ invalid: Se ha producido un error al borrar esta respuesta
60
+ success: Respuesta creada con éxito
61
+ edit:
62
+ title: Editar las respuestas
63
+ update: Actualizar respuesta
64
+ index:
65
+ title: Respuestas
66
+ new:
67
+ create: Crear respuesta
68
+ title: Nueva respuesta
69
+ update:
70
+ invalid: Se ha producido un error al crear esta respuesta
71
+ success: Respuesta actualizada con éxito
72
+ elections:
73
+ create:
74
+ invalid: Se ha producido un error al crear esta votación
75
+ success: Se ha creado la votación correctamente
76
+ destroy:
77
+ invalid: Se ha producido un error al crear esta votación
78
+ success: Se ha eliminado la votación correctamente
79
+ edit:
80
+ title: Editar la votación
81
+ update: Actualizar la votación
82
+ index:
83
+ title: Votaciones
84
+ new:
85
+ create: Crear una votación
86
+ title: Nueva votación
87
+ update:
88
+ invalid: Se ha producido un error al actualizar esta votación
89
+ success: Se ha actualizado la votación correctamente
90
+ models:
91
+ answer:
92
+ name: Respuesta
93
+ election:
94
+ name: Votación
95
+ question:
96
+ name: Pregunta
97
+ questions:
98
+ create:
99
+ invalid: Se ha producido un error al crear esta pregunta
100
+ success: Se ha creado la pregunta correctamente
101
+ destroy:
102
+ invalid: Se ha producido un error al eliminar esta pregunta
103
+ success: Se ha eliminado la pregunta correctamente
104
+ edit:
105
+ title: Editar la pregunta
106
+ update: Actualizar la pregunta
107
+ index:
108
+ title: Preguntas
109
+ new:
110
+ create: Crear una pregunta
111
+ title: Nueva pregunta
112
+ update:
113
+ invalid: Se ha producido un error al actualizar esta pregunta
114
+ success: La pregunta se ha actualizado correctamente
115
+ models:
116
+ answer:
117
+ fields:
118
+ proposals: Propuestas
119
+ title: Título
120
+ election:
121
+ fields:
122
+ end_time: Termina el
123
+ start_time: Empieza el
124
+ title: Título
125
+ question:
126
+ fields:
127
+ answers: Respuestas
128
+ max_selections: Número máximo de elementos a seleccionar
129
+ title: Título
130
+ participatory_processes:
131
+ statistics:
132
+ elections_count: Votaciones
@@ -0,0 +1 @@
1
+ et:
@@ -0,0 +1 @@
1
+ eu:
@@ -0,0 +1,132 @@
1
+ fi-pl:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Kuvaus
6
+ image: Kuva
7
+ proposals: Liittyvät ehdotukset
8
+ title: Otsikko
9
+ election:
10
+ description: Kuvaus
11
+ end_time: Äänestys päättyy
12
+ start_time: Äänestys alkaa
13
+ subtitle: Alaotsikko
14
+ title: Otsikko
15
+ question:
16
+ description: Kuvaus
17
+ max_selections: Valintojen enimmäismäärä
18
+ title: Otsikko
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Liitettävä uudelleen
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Vastaus
29
+ other: Vastaukset
30
+ decidim/elections/election:
31
+ one: Vaali
32
+ other: Vaalit
33
+ decidim/elections/question:
34
+ one: Kysymys
35
+ other: Kysymykset
36
+ decidim:
37
+ components:
38
+ elections:
39
+ name: Vaalit
40
+ settings:
41
+ global:
42
+ announcement: Ilmoitus
43
+ step:
44
+ announcement: Ilmoitus
45
+ elections:
46
+ actions:
47
+ confirm_destroy: Oletko varma?
48
+ destroy: Tuhoa
49
+ edit: Muokkaa
50
+ new: Uusi %{name}
51
+ preview: Esikatsele
52
+ title: Toiminnot
53
+ admin:
54
+ answers:
55
+ create:
56
+ invalid: Vastauksen luonti epäonnistui
57
+ success: Vastauksen luonti onnistui
58
+ destroy:
59
+ invalid: Vastauksen poisto epäonnistui
60
+ success: Vastauksen poisto onnistui
61
+ edit:
62
+ title: Muokkaa vastausta
63
+ update: Päivitä vastausta
64
+ index:
65
+ title: Vastaukset
66
+ new:
67
+ create: Luo vastaus
68
+ title: Uusi vastaus
69
+ update:
70
+ invalid: Vastauksen päivitys epäonnistui
71
+ success: Vastauksen päivitys onnistui
72
+ elections:
73
+ create:
74
+ invalid: Vaalin luonti epäonnistui
75
+ success: Vaalin luonti onnistui
76
+ destroy:
77
+ invalid: Vaalin poisto epäonnistui
78
+ success: Vaalin poisto onnistui
79
+ edit:
80
+ title: Muokkaa vaalia
81
+ update: Päivitä vaali
82
+ index:
83
+ title: Vaalit
84
+ new:
85
+ create: Luo vaali
86
+ title: Uusi vaali
87
+ update:
88
+ invalid: Vaalin päivitys epäonnistui
89
+ success: Vaalin päivitys onnistui
90
+ models:
91
+ answer:
92
+ name: Vastaus
93
+ election:
94
+ name: Vaali
95
+ question:
96
+ name: Kysymys
97
+ questions:
98
+ create:
99
+ invalid: Kysymyksen luonti epäonnistui
100
+ success: Kysymyksen luonti onnistui
101
+ destroy:
102
+ invalid: Kysymyksen poisto epäonnistui
103
+ success: Kysymyksen poisto onnistui
104
+ edit:
105
+ title: Muokkaa kysymystä
106
+ update: Päivitä kysymys
107
+ index:
108
+ title: Kysymykset
109
+ new:
110
+ create: Luo kysymys
111
+ title: Uusi kysymys
112
+ update:
113
+ invalid: Kysymyksen päivitys epäonnistui
114
+ success: Kysymyksen päivitys onnistui
115
+ models:
116
+ answer:
117
+ fields:
118
+ proposals: Ehdotukset
119
+ title: Otsikko
120
+ election:
121
+ fields:
122
+ end_time: Päättymisaika
123
+ start_time: Alkamisaika
124
+ title: Otsikko
125
+ question:
126
+ fields:
127
+ answers: Vastaukset
128
+ max_selections: Valintojen enimmäismäärä
129
+ title: Otsikko
130
+ participatory_processes:
131
+ statistics:
132
+ elections_count: Vaalia
@@ -0,0 +1,132 @@
1
+ fi:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Kuvaus
6
+ image: Kuva
7
+ proposals: Liittyvät ehdotukset
8
+ title: Otsikko
9
+ election:
10
+ description: Kuvaus
11
+ end_time: Äänestys päättyy
12
+ start_time: Äänestys alkaa
13
+ subtitle: Alaotsikko
14
+ title: Otsikko
15
+ question:
16
+ description: Kuvaus
17
+ max_selections: Valintojen enimmäismäärä
18
+ title: Otsikko
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Liitettävä uudelleen
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Vastaus
29
+ other: Vastaukset
30
+ decidim/elections/election:
31
+ one: Vaali
32
+ other: Vaalit
33
+ decidim/elections/question:
34
+ one: Kysymys
35
+ other: Kysymykset
36
+ decidim:
37
+ components:
38
+ elections:
39
+ name: Vaalit
40
+ settings:
41
+ global:
42
+ announcement: Ilmoitus
43
+ step:
44
+ announcement: Ilmoitus
45
+ elections:
46
+ actions:
47
+ confirm_destroy: Oletko varma?
48
+ destroy: Tuhoa
49
+ edit: Muokkaa
50
+ new: Uusi %{name}
51
+ preview: Esikatsele
52
+ title: Toiminnot
53
+ admin:
54
+ answers:
55
+ create:
56
+ invalid: Vastauksen luonti epäonnistui
57
+ success: Vastauksen luonti onnistui
58
+ destroy:
59
+ invalid: Vastauksen poisto epäonnistui
60
+ success: Vastauksen poisto onnistui
61
+ edit:
62
+ title: Muokkaa vastausta
63
+ update: Päivitä vastausta
64
+ index:
65
+ title: Vastaukset
66
+ new:
67
+ create: Luo vastaus
68
+ title: Uusi vastaus
69
+ update:
70
+ invalid: Vastauksen päivitys epäonnistui
71
+ success: Vastauksen päivitys onnistui
72
+ elections:
73
+ create:
74
+ invalid: Vaalin luonti epäonnistui
75
+ success: Vaalin luonti onnistui
76
+ destroy:
77
+ invalid: Vaalin poisto epäonnistui
78
+ success: Vaalin poisto onnistui
79
+ edit:
80
+ title: Muokkaa vaalia
81
+ update: Päivitä vaali
82
+ index:
83
+ title: Vaalit
84
+ new:
85
+ create: Luo vaali
86
+ title: Uusi vaali
87
+ update:
88
+ invalid: Vaalin päivitys epäonnistui
89
+ success: Vaalin päivitys onnistui
90
+ models:
91
+ answer:
92
+ name: Vastaus
93
+ election:
94
+ name: Vaali
95
+ question:
96
+ name: Kysymys
97
+ questions:
98
+ create:
99
+ invalid: Kysymyksen luonti epäonnistui
100
+ success: Kysymyksen luonti onnistui
101
+ destroy:
102
+ invalid: Kysymyksen poisto epäonnistui
103
+ success: Kysymyksen poisto onnistui
104
+ edit:
105
+ title: Muokkaa kysymystä
106
+ update: Päivitä kysymys
107
+ index:
108
+ title: Kysymykset
109
+ new:
110
+ create: Luo kysymys
111
+ title: Uusi kysymys
112
+ update:
113
+ invalid: Kysymyksen päivitys epäonnistui
114
+ success: Kysymyksen päivitys onnistui
115
+ models:
116
+ answer:
117
+ fields:
118
+ proposals: Ehdotukset
119
+ title: Otsikko
120
+ election:
121
+ fields:
122
+ end_time: Päättymisaika
123
+ start_time: Alkamisaika
124
+ title: Otsikko
125
+ question:
126
+ fields:
127
+ answers: Vastaukset
128
+ max_selections: Valintojen enimmäismäärä
129
+ title: Otsikko
130
+ participatory_processes:
131
+ statistics:
132
+ elections_count: Vaalia
@@ -0,0 +1,132 @@
1
+ fr-CA:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ description: Description
6
+ image: Image
7
+ proposals: Propositions associées
8
+ title: Titre
9
+ election:
10
+ description: Description
11
+ end_time: Le vote se termine à
12
+ start_time: Le vote commence à
13
+ subtitle: Sous-titre
14
+ title: Titre
15
+ question:
16
+ description: Description
17
+ max_selections: Nombre maximum de sélections
18
+ title: Titre
19
+ errors:
20
+ models:
21
+ answer:
22
+ attributes:
23
+ attachment:
24
+ needs_to_be_reattached: Doit être téléchargé de nouveau
25
+ activerecord:
26
+ models:
27
+ decidim/elections/answer:
28
+ one: Réponse
29
+ other: Réponses
30
+ decidim/elections/election:
31
+ one: Élection
32
+ other: Élections
33
+ decidim/elections/question:
34
+ one: Question
35
+ other: Questions
36
+ decidim:
37
+ components:
38
+ elections:
39
+ name: Élections
40
+ settings:
41
+ global:
42
+ announcement: Annonce
43
+ step:
44
+ announcement: Annonce
45
+ elections:
46
+ actions:
47
+ confirm_destroy: Êtes-vous certain ?
48
+ destroy: Détruire
49
+ edit: Modifier
50
+ new: Nouveau %{name}
51
+ preview: Aperçu
52
+ title: Actions
53
+ admin:
54
+ answers:
55
+ create:
56
+ invalid: Il y a eu un problème lors de la création de cette réponse
57
+ success: Réponse créée avec succès
58
+ destroy:
59
+ invalid: Un problème est survenu lors de la suppression de cette réponse
60
+ success: Réponse supprimée avec succès
61
+ edit:
62
+ title: Modifier la réponse
63
+ update: Mettre à jour la réponse
64
+ index:
65
+ title: Réponses
66
+ new:
67
+ create: Créer une réponse
68
+ title: Nouvelle réponse
69
+ update:
70
+ invalid: Un problème est survenu lors de la mise à jour de cette réponse
71
+ success: Réponse mise à jour avec succès
72
+ elections:
73
+ create:
74
+ invalid: Il y a eu un problème lors de la création de cette élection
75
+ success: Élection créée avec succès
76
+ destroy:
77
+ invalid: Il y a eu un problème lors de la suppression de cette élection
78
+ success: Élection supprimée avec succès
79
+ edit:
80
+ title: Modifier l'élection
81
+ update: Mettre à jour l'élection
82
+ index:
83
+ title: Élections
84
+ new:
85
+ create: Créer une élection
86
+ title: Nouvelle élection
87
+ update:
88
+ invalid: Il y a eu un problème lors de la mise à jour de cette élection
89
+ success: Élection mise à jour avec succès
90
+ models:
91
+ answer:
92
+ name: Réponse
93
+ election:
94
+ name: Élection
95
+ question:
96
+ name: Question
97
+ questions:
98
+ create:
99
+ invalid: Il y a eu un problème lors de la création de cette question
100
+ success: Question créée avec succès
101
+ destroy:
102
+ invalid: Un problème est survenu lors de la suppression de cette question
103
+ success: Question supprimée avec succès
104
+ edit:
105
+ title: Modifier la question
106
+ update: Mettre à jour la question
107
+ index:
108
+ title: Questions
109
+ new:
110
+ create: Créer une question
111
+ title: Nouvelle question
112
+ update:
113
+ invalid: Une erreur s'est produite lors de la mise à jour de cette question
114
+ success: Question mise à jour avec succès
115
+ models:
116
+ answer:
117
+ fields:
118
+ proposals: Propositions
119
+ title: Titre
120
+ election:
121
+ fields:
122
+ end_time: Prend fin à
123
+ start_time: Commence à
124
+ title: Titre
125
+ question:
126
+ fields:
127
+ answers: Réponses
128
+ max_selections: Nombre maximum de sélections
129
+ title: Titre
130
+ participatory_processes:
131
+ statistics:
132
+ elections_count: Élections