decidim-sortitions 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE-AGPLv3.txt +661 -0
  3. data/README.md +31 -0
  4. data/Rakefile +3 -0
  5. data/app/assets/config/decidim_sortitions_manifest.css +1 -0
  6. data/app/assets/config/decidim_sortitions_manifest.js +1 -0
  7. data/app/assets/images/decidim/sortitions/icon.svg +4 -0
  8. data/app/assets/javascripts/decidim/sortitions/admin/sortitions.js +2 -0
  9. data/app/assets/javascripts/decidim/sortitions/social_share.js +2 -0
  10. data/app/assets/stylesheets/decidim/sortitions/_sortitions.scss +45 -0
  11. data/app/assets/stylesheets/decidim/sortitions/social_share.css.scss +18 -0
  12. data/app/commands/decidim/sortitions/admin/create_sortition.rb +81 -0
  13. data/app/commands/decidim/sortitions/admin/destroy_sortition.rb +45 -0
  14. data/app/commands/decidim/sortitions/admin/update_sortition.rb +45 -0
  15. data/app/controllers/concerns/decidim/sortitions/orderable.rb +50 -0
  16. data/app/controllers/decidim/sortitions/admin/application_controller.rb +28 -0
  17. data/app/controllers/decidim/sortitions/admin/sortitions_controller.rb +104 -0
  18. data/app/controllers/decidim/sortitions/application_controller.rb +13 -0
  19. data/app/controllers/decidim/sortitions/sortition_widgets_controller.rb +20 -0
  20. data/app/controllers/decidim/sortitions/sortitions_controller.rb +45 -0
  21. data/app/events/decidim/sortitions/create_sortition_event.rb +8 -0
  22. data/app/forms/decidim/sortitions/admin/destroy_sortition_form.rb +20 -0
  23. data/app/forms/decidim/sortitions/admin/edit_sortition_form.rb +22 -0
  24. data/app/forms/decidim/sortitions/admin/sortition_form.rb +44 -0
  25. data/app/helpers/decidim/sortitions/admin/sortitions_helper.rb +24 -0
  26. data/app/helpers/decidim/sortitions/sortitions_helper.rb +38 -0
  27. data/app/models/decidim/sortitions/abilities/admin/admin_ability.rb +23 -0
  28. data/app/models/decidim/sortitions/abilities/admin/process_admin_ability.rb +46 -0
  29. data/app/models/decidim/sortitions/application_record.rb +9 -0
  30. data/app/models/decidim/sortitions/sortition.rb +81 -0
  31. data/app/queries/decidim/sortitions/admin/participatory_space_proposal_features.rb +29 -0
  32. data/app/queries/decidim/sortitions/admin/participatory_space_proposals.rb +49 -0
  33. data/app/queries/decidim/sortitions/filtered_sortitions.rb +37 -0
  34. data/app/services/decidim/sortitions/admin/draw.rb +31 -0
  35. data/app/services/decidim/sortitions/sortition_search.rb +47 -0
  36. data/app/views/decidim/sortitions/admin/sortitions/_form.html.erb +41 -0
  37. data/app/views/decidim/sortitions/admin/sortitions/confirm_destroy.html.erb +21 -0
  38. data/app/views/decidim/sortitions/admin/sortitions/edit.html.erb +27 -0
  39. data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +57 -0
  40. data/app/views/decidim/sortitions/admin/sortitions/new.html.erb +11 -0
  41. data/app/views/decidim/sortitions/admin/sortitions/show.html.erb +55 -0
  42. data/app/views/decidim/sortitions/sortition_widgets/show.html.erb +4 -0
  43. data/app/views/decidim/sortitions/sortitions/_count.html.erb +1 -0
  44. data/app/views/decidim/sortitions/sortitions/_filters.html.erb +31 -0
  45. data/app/views/decidim/sortitions/sortitions/_filters_small_view.html.erb +18 -0
  46. data/app/views/decidim/sortitions/sortitions/_filters_small_view0.html.erb +18 -0
  47. data/app/views/decidim/sortitions/sortitions/_linked_sortitions.html.erb +29 -0
  48. data/app/views/decidim/sortitions/sortitions/_proposal.html.erb +24 -0
  49. data/app/views/decidim/sortitions/sortitions/_proposal_badge.html.erb +3 -0
  50. data/app/views/decidim/sortitions/sortitions/_results_count.html.erb +8 -0
  51. data/app/views/decidim/sortitions/sortitions/_sortition.html.erb +25 -0
  52. data/app/views/decidim/sortitions/sortitions/_sortition_author.html.erb +17 -0
  53. data/app/views/decidim/sortitions/sortitions/_sortition_cancel_author.html.erb +17 -0
  54. data/app/views/decidim/sortitions/sortitions/_sortitions.html.erb +14 -0
  55. data/app/views/decidim/sortitions/sortitions/_sortitions_count.html.erb +1 -0
  56. data/app/views/decidim/sortitions/sortitions/_tags.html.erb +16 -0
  57. data/app/views/decidim/sortitions/sortitions/index.html.erb +21 -0
  58. data/app/views/decidim/sortitions/sortitions/index.js.erb +10 -0
  59. data/app/views/decidim/sortitions/sortitions/show.html.erb +134 -0
  60. data/config/initializers/social_share_button.rb +5 -0
  61. data/config/locales/ca.yml +155 -0
  62. data/config/locales/en.yml +154 -0
  63. data/config/locales/es.yml +155 -0
  64. data/db/migrate/20171215161358_create_decidim_module_sortitions_sortitions.rb +23 -0
  65. data/db/migrate/20171220164658_add_witnesses_to_sortitions.rb +7 -0
  66. data/db/migrate/20171220164744_add_additional_info_to_sortitions.rb +7 -0
  67. data/db/migrate/20180102100101_add_author_to_sortitions.rb +7 -0
  68. data/db/migrate/20180102101128_add_reference_to_sortitions.rb +8 -0
  69. data/db/migrate/20180103082645_add_title_to_sortition.rb +7 -0
  70. data/db/migrate/20180103123055_drop_decidim_category_id_from_sortitions.rb +13 -0
  71. data/db/migrate/20180103160301_add_cancel_data_to_sortition.rb +9 -0
  72. data/db/migrate/20180104143054_make_sortition_reference_nullable.rb +7 -0
  73. data/db/migrate/20180104145344_add_candidate_proposals_to_sortitions.rb +7 -0
  74. data/db/migrate/20180108132729_rename_sortitions_table.rb +7 -0
  75. data/lib/decidim/sortitions.rb +24 -0
  76. data/lib/decidim/sortitions/admin.rb +10 -0
  77. data/lib/decidim/sortitions/admin_engine.rb +35 -0
  78. data/lib/decidim/sortitions/engine.rb +26 -0
  79. data/lib/decidim/sortitions/feature.rb +43 -0
  80. data/lib/decidim/sortitions/test/factories.rb +37 -0
  81. data/lib/decidim/sortitions/version.rb +7 -0
  82. metadata +208 -0
@@ -0,0 +1,154 @@
1
+ ---
2
+ en:
3
+ activemodel:
4
+ attributes:
5
+ sortition:
6
+ title: Title
7
+ dice: Result of die roll (roll a 6-sided die (or look for another random way to generate a number from 1 to 6) and enter here, as opposed to witness the resulting number, this contributes to the quality and guarantees of the randomness of the result
8
+ target_items: Number of proposals to be selected (indicates the number of proposals you want to be selected by drawing lots of the group of proposals you have previously chosen)
9
+ decidim_category_id: Categories of the set of proposals in which you want to apply the draw
10
+ decidim_proposals_feature_id: Proposals set
11
+ witnesses: Witnesses
12
+ additional_info: Sortition information
13
+ pages:
14
+ home:
15
+ statistics:
16
+ sortitions_count: Sortitions
17
+ decidim:
18
+ events:
19
+ sortitions:
20
+ sortition_created:
21
+ email_intro: The sortition "%{resource_title}" has been added to "%{participatory_space_title}" that you are following.
22
+ email_outro: You have received this notification because you are following "%{participatory_space_title}". You can unfollow it from the previous link.
23
+ email_subject: New sortition added to %{participatory_space_title}
24
+ notification_title: "The sortition <a href=\"%{resource_path}\">%{resource_title}</a> has been added to %{participatory_space_title}"
25
+ participatory_processes:
26
+ statistics:
27
+ sortitions_count: Sortitions
28
+ features:
29
+ sortitions:
30
+ name: Sortitions
31
+ settings:
32
+ global:
33
+ comments_enabled: Comments enabled
34
+ sortitions:
35
+ admin:
36
+ actions:
37
+ new: New
38
+ edit: Edit
39
+ show: Sortition details
40
+ destroy: Cancel the sortition
41
+ models:
42
+ sortition:
43
+ name:
44
+ one: Sortition
45
+ other: Sortitions
46
+ fields:
47
+ id: Identifier
48
+ title: Title
49
+ reference: Reference
50
+ dice: Dice
51
+ request_timestamp: Draw time
52
+ target_items: Items to select
53
+ seed: Seed
54
+ category: Category
55
+ decidim_proposals_feature: Proposals feature
56
+ similar_count: Similar sortitions
57
+ created_at: Creation date
58
+ sortitions:
59
+ index:
60
+ title: Sortitions
61
+ linked_sortitions:
62
+ selected_proposals:
63
+ one: selected proposal
64
+ other: selected proposals
65
+ new:
66
+ title: New sortition
67
+ create: Create
68
+ confirm: By pressing the next button Decidim will record the date and time (with precision of seconds) and together with the dice roll, this information will be used to generate a random selection. The action will be irreversible, once the button is clicked the result of this draw will be published, together with the data entered in this form and can not be modified, please check the content carefully
69
+ edit:
70
+ title: Update the information about the sortition
71
+ update: Update
72
+ form:
73
+ title: New sortition for proposals
74
+ all_categories: All categories
75
+ select_proposal_feature: Select the proposals set
76
+ create:
77
+ success: Sortition successfully created
78
+ error: There was an error creating a new sortition.
79
+ update:
80
+ success: Sortition successfully update
81
+ error: There was an error updating the sortition.
82
+ show:
83
+ selected_proposals: Proposals selected for draw
84
+ confirm_destroy:
85
+ title: Cancellation of the sortition
86
+ confirm_destroy: Are you sure you want to cancel this sortition?
87
+ destroy: Cancel sortition
88
+ destroy:
89
+ success: Sortition successfully cancelled
90
+ error: Can not cancel the sortition.
91
+ sortitions:
92
+ count:
93
+ proposals_count:
94
+ one: 1 proposal
95
+ other: "%{count} proposals"
96
+ author:
97
+ deleted: Deleted user
98
+ verified_user_group: Verified organization
99
+ proposal:
100
+ view_proposal: View proposal
101
+ sortitions_count:
102
+ count:
103
+ one: 1 sortition
104
+ other: "%{count} sortitions"
105
+ results_count:
106
+ count:
107
+ one: selected proposal
108
+ other: selected proposals
109
+ show:
110
+ witnesses: Witnesses
111
+ cancelled: Cancelled sortition
112
+ sortition_reproducibility_details: Sortition reproducibility details
113
+ proposals_selected_by_sortition: Proposals selected by sortition
114
+ introduction: >
115
+ This page contains the results of the sortition %{reference}. By means of this sortition,
116
+ %{target_items} number of results have been selected randomly and with an equal probability
117
+ distribution from the set of proposals displayed bellow. Together with the results, the information displayed on
118
+ this page provides all the information required to maximize guarantees and to reproduce the results. The key to
119
+ the quality of this sortition is the double randomness provided by a the rolling of a dice(verified by witnesses)
120
+ and the precise time of the sortition that provides input for an algorithm that generates a random selection.
121
+ The time-seed for the sortition is so accurate (seconds) that it is impossible to control by humans
122
+ thus providing a double "uncontrollable" input to guarantee a fair result.
123
+ dice_result: (1) Dice result
124
+ time_seed: (2) Time seed
125
+ mathematical_result: Result (1) x (2)
126
+ algorithm: Sortition's Algorithm code
127
+ candidate_proposal_ids: Sortition proposals order and IDs
128
+ candidate_proposals_info: >
129
+ The sortition was carried out among the following proposals (%{category_label}), with the
130
+ following IDs (in bold the selected proposals)
131
+ any_category: from all categories
132
+ category: from the %{category} category
133
+ filters:
134
+ search: Search
135
+ category: Category
136
+ category_prompt: Select a category
137
+ state: State
138
+ all: All
139
+ active: Active
140
+ cancelled: Cancelled
141
+ filters_small_view:
142
+ close_modal: Close modal
143
+ filter: Filter
144
+ filter_by: Filter by
145
+ unfold: Unfold
146
+ orders:
147
+ label: 'Order sortitions by:'
148
+ random: Random
149
+ recent: Recent
150
+ sortition:
151
+ selected_proposals:
152
+ one: 1 proposal selected
153
+ other: "%{count} proposals selected"
154
+ view_sortition: View sortition
@@ -0,0 +1,155 @@
1
+ ---
2
+ es:
3
+ activemodel:
4
+ attributes:
5
+ sortition:
6
+ title: Título
7
+ dice: Resultado de la tirada de dado (tira un dado de 6 caras (o busca otra manera aleatoria de generar un número del 1 al 6) e introduce aquí, frente a testigo el número resultante, esto contribuye a la calidad y garantías de la aleatoriedad del resultado
8
+ target_items: Número de propuestas a seleccionar (indica el número de propuestas que quieres que sean seleccionadas mediante sorteo del conjunto de propuestas que has escogido previamente)
9
+ decidim_category_id: Categorías del conjunto de propuestas en las que quieres aplicar el sorteo
10
+ decidim_proposals_feature_id: Conjunto de propuestas
11
+ witnesses: Testigos
12
+ additional_info: Información adicional
13
+ pages:
14
+ home:
15
+ statistics:
16
+ sortitions_count: Sorteos
17
+ decidim:
18
+ events:
19
+ sortitions:
20
+ sortition_created:
21
+ email_intro: "Se ha añadido el sorteo \"%{resource_title}\" a \"%{participatory_space_title}\" que estás siguiendo."
22
+ email_outro: "Has recibido esta notificación porqué estás siguiendo \"%{participatory_space_title}\". Puedes dejar de seguirlo siguien el enlace anterior."
23
+ email_subject: Nuevo sorteo añadido a %{participatory_space_title}
24
+ notification_title: "Se ha añadido el sorteo <a href=\"%{resource_path}\">%{resource_title}</a> a %{participatory_space_title}"
25
+ participatory_processes:
26
+ statistics:
27
+ sortitions_count: Sorteos
28
+ features:
29
+ sortitions:
30
+ name: Sorteos
31
+ settings:
32
+ global:
33
+ comments_enabled: Comentarios habilitados
34
+ sortitions:
35
+ admin:
36
+ actions:
37
+ new: Nuevo
38
+ edit: Editar
39
+ show: Detalles del sorteo
40
+ destroy: Cancelar el sorteo
41
+ models:
42
+ sortition:
43
+ name:
44
+ one: Sorteo
45
+ other: Sorteos
46
+ fields:
47
+ id: Identificador
48
+ title: Título
49
+ reference: Referencia
50
+ dice: Dado
51
+ request_timestamp: Hora de Sorteo
52
+ target_items: Elementos a seleccionar
53
+ seed: Semilla
54
+ category: Categoría
55
+ decidim_proposals_feature: Funcionalidad de propuestas
56
+ similar_count: Sorteos similares
57
+ created_at: Fecha de creación
58
+ sortitions:
59
+ index:
60
+ title: Sorteos
61
+ linked_sortitions:
62
+ selected_proposals:
63
+ one: propuesta seleccionada
64
+ other: propuestas seleccionadas
65
+ new:
66
+ title: Nuevo sorteo
67
+ create: Crear
68
+ confirm: Al pulsar el siguiente botón Decidim grabará el la fecha y hora (con precisión de segundos) y junto con la tirada de dados, esta información servirá para generar una seleccion aleatoria. La acción será irreversible, una vez pulsado el botón el resultado de este sorteo se publicará, junto los datos introducidos en este formulario y no se podrán modificar, por favor revisa concienzudamente el contenido
69
+ edit:
70
+ title: Actualizar la información sobre el sorteo
71
+ update: Actualizar
72
+ form:
73
+ title: Nuevo sorteo de propuestas
74
+ all_categories: Todas las categorías
75
+ select_proposal_feature: Selecciona el conjunto de propuestas
76
+ create:
77
+ success: Sorteo creado correctamente.
78
+ error: Se ha producido un error al crear al crear el sorteo.
79
+ update:
80
+ success: Sorteo actualizado correctamente.
81
+ error: Se ha producido un error al crear al actualizar el sorteo.
82
+ show:
83
+ selected_proposals: Propuestas seleccionadas por sorteo
84
+ confirm_destroy:
85
+ title: Cancelación del sorteo
86
+ confirm_destroy: '¿Está seguro de que quiere cancelar este sorteo?'
87
+ destroy: Cancelar el sorteo
88
+ destroy:
89
+ success: El sorteo se ha cancelado correctamente
90
+ error: No se ha podido cancelar el sorteo
91
+ sortitions:
92
+ count:
93
+ proposals_count:
94
+ one: 1 propuesta
95
+ other: "%{count} propuestas"
96
+ author:
97
+ deleted: Usuario eliminado
98
+ verified_user_group: Organización verificada
99
+ proposal:
100
+ view_proposal: Ver propuesta
101
+ sortitions_count:
102
+ count:
103
+ one: 1 sorteo
104
+ other: "%{count} sorteos"
105
+ results_count:
106
+ count:
107
+ one: propuesta seleccionada
108
+ other: propuestas seleccionadas
109
+ show:
110
+ witnesses: Testigos
111
+ cancelled: Sorteo cancelado
112
+ sortition_reproducibility_details: Detalles de reproducibilidad del sorteo
113
+ proposals_selected_by_sortition: Propuestas seleccionadas por sorteo
114
+ introduction: >
115
+ Esta página contiene los resultados del sorteo %{reference}. Por medio de este sorteo,
116
+ %{target_items} propuestas se han seleccionado al azar y con la misma distribución de
117
+ probabilidad del conjunto de propuestas que se muestran a continuación. Junto con los resultados,
118
+ la información mostrada en esta página proporciona toda la información requerida para maximizar las
119
+ garantías y reproducir los resultados. La clave para la calidad de esta clasificación es la doble
120
+ aleatoriedad proporcionada por el lanzamiento de un dado (verificado por testigos) y el tiempo preciso de
121
+ la clasificación que proporciona la entrada para un algoritmo que genera una selección aleatoria.
122
+ La semilla de tiempo para la clasificación es tan precisa (segundos) que es imposible de controlar por los
123
+ humanos proporcionando así una doble entrada "incontrolable" para garantizar un resultado justo.
124
+ dice_result: (1) Resultado del dado
125
+ time_seed: (2) Semilla temporal
126
+ mathematical_result: Resultado (1) x (2)
127
+ algorithm: Código del algoritmo de sorteo
128
+ candidate_proposal_ids: Orden de propuestas del sorteo e IDs
129
+ candidate_proposals_info: >
130
+ El sorteo se llevó a cabo entre las siguientes propuestas (%{category_label}), con los siguientes
131
+ identificadores (en negrita las propuestas seleccionadas)
132
+ any_category: de todas las categorias
133
+ category: De la categoría %{category}
134
+ filters:
135
+ search: Buscar
136
+ category: Categoría
137
+ category_prompt: Selecciona una categoría
138
+ state: Estado
139
+ all: Todos
140
+ active: Activos
141
+ cancelled: Cancelados
142
+ filters_small_view:
143
+ close_modal: Cerrar ventana
144
+ filter: Filtrar
145
+ filter_by: Filtrar por
146
+ unfold: Desplegar
147
+ orders:
148
+ label: 'Ordenar sorteos por:'
149
+ random: Aleatorio
150
+ recent: Reciente
151
+ sortition:
152
+ selected_proposals:
153
+ one: 1 propuesta seleccionada
154
+ other: "%{count} propuestas seleccionadas"
155
+ view_sortition: Ver sorteo
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateDecidimModuleSortitionsSortitions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ create_table :decidim_module_sortitions_sortitions do |t|
6
+ t.references :decidim_feature, index: { name: "index_sortitions__on_feature" }
7
+
8
+ t.references :decidim_category,
9
+ foreign_key: true,
10
+ index: { name: "index_sortitions__on_category" }
11
+
12
+ t.integer :decidim_proposals_feature_id,
13
+ index: { name: "index_sortitions__on_proposals_feature" }
14
+
15
+ t.integer :dice, null: false
16
+ t.integer :target_items, null: false
17
+ t.timestamp :request_timestamp, null: false
18
+ t.jsonb :selected_proposals
19
+
20
+ t.timestamps
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddWitnessesToSortitions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :decidim_module_sortitions_sortitions, :witnesses, :jsonb
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddAdditionalInfoToSortitions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :decidim_module_sortitions_sortitions, :additional_info, :jsonb
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddAuthorToSortitions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_reference :decidim_module_sortitions_sortitions, :decidim_author, index: true
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddReferenceToSortitions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :decidim_module_sortitions_sortitions, :reference, :string
6
+ change_column_null :decidim_module_sortitions_sortitions, :reference, false
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddTitleToSortition < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :decidim_module_sortitions_sortitions, :title, :jsonb
6
+ end
7
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DropDecidimCategoryIdFromSortitions < ActiveRecord::Migration[5.1]
4
+ def up
5
+ remove_column :decidim_module_sortitions_sortitions, :decidim_category_id
6
+ end
7
+
8
+ def down
9
+ add_reference :decidim_module_sortitions_sortitions, :decidim_category,
10
+ foreign_key: true,
11
+ index: { name: "index_sortitions__on_category" }
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddCancelDataToSortition < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :decidim_module_sortitions_sortitions, :cancel_reason, :jsonb
6
+ add_column :decidim_module_sortitions_sortitions, :cancelled_on, :datetime
7
+ add_column :decidim_module_sortitions_sortitions, :cancelled_by_user_id, :integer, index: true
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class MakeSortitionReferenceNullable < ActiveRecord::Migration[5.1]
4
+ def change
5
+ change_column_null :decidim_module_sortitions_sortitions, :reference, true
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddCandidateProposalsToSortitions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :decidim_module_sortitions_sortitions, :candidate_proposals, :jsonb
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class RenameSortitionsTable < ActiveRecord::Migration[5.1]
4
+ def change
5
+ rename_table :decidim_module_sortitions_sortitions, :decidim_sortitions_sortitions
6
+ end
7
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/sortitions/admin"
4
+ require "decidim/sortitions/engine"
5
+ require "decidim/sortitions/admin_engine"
6
+ require "decidim/sortitions/feature"
7
+
8
+ module Decidim
9
+ # Base module for this engine.
10
+ module Sortitions
11
+ include ActiveSupport::Configurable
12
+
13
+ # Public setting that defines how many elements will be shown
14
+ # per page inside the administration view.
15
+ config_accessor :items_per_page do
16
+ 15
17
+ end
18
+
19
+ # Link to algorithm used for the sortition
20
+ config_accessor :sortition_algorithm do
21
+ "https://ruby-doc.org/core-2.4.0/Random.html"
22
+ end
23
+ end
24
+ end