decidim-sortitions 0.30.8 → 0.31.0.rc1

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/decidim/sortitions/admin/sortitions_controller.rb +3 -3
  3. data/app/models/decidim/sortitions/sortition.rb +5 -1
  4. data/app/presenters/decidim/sortitions/sortition_presenter.rb +17 -0
  5. data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +48 -17
  6. data/config/assets.rb +2 -2
  7. data/config/locales/ar.yml +0 -1
  8. data/config/locales/ca-IT.yml +3 -1
  9. data/config/locales/ca.yml +3 -1
  10. data/config/locales/cs.yml +1 -0
  11. data/config/locales/de.yml +1 -0
  12. data/config/locales/el.yml +0 -1
  13. data/config/locales/en.yml +2 -0
  14. data/config/locales/es-MX.yml +3 -1
  15. data/config/locales/es-PY.yml +3 -1
  16. data/config/locales/es.yml +3 -1
  17. data/config/locales/eu.yml +15 -13
  18. data/config/locales/fi-plain.yml +2 -0
  19. data/config/locales/fi.yml +2 -0
  20. data/config/locales/fr-CA.yml +2 -4
  21. data/config/locales/fr.yml +2 -4
  22. data/config/locales/gl.yml +0 -1
  23. data/config/locales/hu.yml +0 -1
  24. data/config/locales/id-ID.yml +0 -1
  25. data/config/locales/is-IS.yml +0 -1
  26. data/config/locales/it.yml +0 -1
  27. data/config/locales/ja.yml +2 -0
  28. data/config/locales/lt.yml +0 -1
  29. data/config/locales/lv.yml +0 -1
  30. data/config/locales/nl.yml +0 -1
  31. data/config/locales/no.yml +0 -1
  32. data/config/locales/pl.yml +1 -1
  33. data/config/locales/pt-BR.yml +1 -11
  34. data/config/locales/pt.yml +0 -1
  35. data/config/locales/ro-RO.yml +2 -1
  36. data/config/locales/ru.yml +0 -1
  37. data/config/locales/sk.yml +0 -1
  38. data/config/locales/sv.yml +3 -12
  39. data/config/locales/tr-TR.yml +1 -1
  40. data/config/locales/uk.yml +0 -1
  41. data/config/locales/zh-CN.yml +0 -1
  42. data/config/locales/zh-TW.yml +0 -1
  43. data/lib/decidim/api/sortition_type.rb +9 -3
  44. data/lib/decidim/sortitions/component.rb +5 -1
  45. data/lib/decidim/sortitions/engine.rb +1 -1
  46. data/lib/decidim/sortitions/version.rb +1 -1
  47. metadata +17 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7c224172a63c1599ad565561e17aa6cf572a16303c18e9d7e2ab4d351accc59
4
- data.tar.gz: 8252efcdeef243758df426e293911bfccc4ebefa104d268df1eec928a69a782f
3
+ metadata.gz: 6049e18adda680e39fe40b90bb0f7ab89a7aa12885b810ab18bfc3e07a1842f0
4
+ data.tar.gz: 11d520778aaae305d879c2d8d28a6d6d20315e751cf157b49b61607b13b824fa
5
5
  SHA512:
6
- metadata.gz: a722799dc05f0728aa5afc7e386f42ee114ccb547a5617a9953500da5e07275a13a1c22781e2c657442c4a58c1944f214e2dffa3729c344e09d7db7cef71c503
7
- data.tar.gz: 863301dcd33ee539a7f18c04cf48b2b5822e0307c22f3d2b0e2701f53d134984313bacfabd3ba2cd8621d501880e1a9deac66063d3ecaf78dfe10fd2f4c6f72a
6
+ metadata.gz: fbdd3e7cf122a6217ecdaba9f8b49a7e9b345775711429050d71484ff3e3ad7a664cea8013957d6cee43f2d7573758b4b8deff03617e12a5556e4a39b035c07f
7
+ data.tar.gz: 98e12575c5bb01f2286cee65ce6844617b7354613853a166a6e758bee0fce3eacf84caf862ee740f2700b8a39c75c61dbad0f1a030ebb7c402378836a423d842
@@ -33,7 +33,7 @@ module Decidim
33
33
 
34
34
  on(:invalid) do
35
35
  flash.now[:alert] = I18n.t("sortitions.update.error", scope: "decidim.sortitions.admin")
36
- render :edit
36
+ render :edit, status: :unprocessable_entity
37
37
  end
38
38
  end
39
39
  end
@@ -56,7 +56,7 @@ module Decidim
56
56
 
57
57
  on(:invalid) do
58
58
  flash.now[:alert] = I18n.t("sortitions.create.error", scope: "decidim.sortitions.admin")
59
- render :new
59
+ render :new, status: :unprocessable_entity
60
60
  end
61
61
  end
62
62
  end
@@ -79,7 +79,7 @@ module Decidim
79
79
 
80
80
  on(:invalid) do
81
81
  flash.now[:alert] = I18n.t("sortitions.destroy.error", scope: "decidim.sortitions.admin")
82
- render :confirm_destroy
82
+ render :confirm_destroy, status: :unprocessable_entity
83
83
  end
84
84
  end
85
85
  end
@@ -37,6 +37,10 @@ module Decidim
37
37
  Decidim::Sortitions::AdminLog::SortitionPresenter
38
38
  end
39
39
 
40
+ def presenter
41
+ Decidim::Sortitions::SortitionPresenter.new(self)
42
+ end
43
+
40
44
  def proposals
41
45
  Decidim::Proposals::Proposal.where(id: selected_proposals)
42
46
  end
@@ -93,7 +97,7 @@ module Decidim
93
97
 
94
98
  def self.ransackable_associations(_auth_object = nil)
95
99
  %w(author cancelled_by_user taxonomies comment_threads comments component decidim_proposals_component resource_links_from
96
- resource_links_to resource_permission user_group versions)
100
+ resource_links_to resource_permission versions)
97
101
  end
98
102
  end
99
103
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Sortitions
5
+ class SortitionPresenter < Decidim::ResourcePresenter
6
+ def sortition
7
+ __getobj__
8
+ end
9
+
10
+ def title(html_escape: false, all_locales: false)
11
+ return unless sortition
12
+
13
+ super(sortition.title, html_escape, all_locales)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -9,7 +9,7 @@
9
9
  <%= render partial: "decidim/admin/components/resource_action" %>
10
10
  </h1>
11
11
  </div>
12
- <div class="table-scroll">
12
+ <div class="table-stacked">
13
13
  <table class="table-list">
14
14
  <thead>
15
15
  <tr>
@@ -22,31 +22,62 @@
22
22
  <tbody>
23
23
  <% sortitions.each do |sortition| %>
24
24
  <tr>
25
- <td><%= sortition.reference %></td>
26
- <td>
25
+ <td data-label="<%= t("models.sortition.fields.reference", scope: "decidim.sortitions.admin") %>">
26
+ <%= sortition.reference %>
27
+ </td>
28
+ <td data-label="<%= t("models.sortition.fields.title", scope: "decidim.sortitions.admin") %>">
27
29
  <% if allowed_to? :update, :sortition, sortition: sortition %>
28
30
  <%= link_to decidim_escape_translated(sortition.title), edit_sortition_path(sortition) %>
29
31
  <% else %>
30
32
  <%= decidim_escape_translated(sortition.title) %>
31
33
  <% end %>
32
34
  </td>
33
- <td><%= l sortition.created_at, format: :short %></td>
34
- <td class="table-list__actions">
35
- <% if allowed_to? :update, :sortition, sortition: sortition %>
36
- <%= icon_link_to "pencil-line", edit_sortition_path(sortition), t("actions.edit", scope: "decidim.sortitions.admin"), class: "action-icon--edit" %>
37
- <% else %>
38
- <span class="action-space icon"></span>
39
- <% end %>
35
+ <td data-label="<%= t("models.sortition.fields.created_at", scope: "decidim.sortitions.admin") %>">
36
+ <%= l sortition.created_at, format: :short %>
37
+ </td>
38
+ <td class="table-list__actions" data-label="<%= t("actions.title", scope: "decidim.sortitions.admin") %>">
39
+ <button type="button" data-controller="dropdown" data-target="actions-sortition-<%= sortition.id %>" aria-label="<%= t("decidim.admin.actions.actions_label", resource: sortition.title) %>">
40
+ <%= icon "more-fill", class: "text-secondary" %>
41
+ </button>
40
42
 
41
- <%= icon_link_to "fullscreen-line", sortition_path(sortition), t("actions.show", scope: "decidim.sortitions.admin"), class: "action-icon--preview", target: "_blank", data: { "external-link": false } %>
43
+ <div class="inline-block relative">
44
+ <ul id="actions-sortition-<%= sortition.id %>" class="dropdown dropdown__action" aria-hidden="true">
45
+ <% if allowed_to? :update, :sortition, sortition: sortition %>
46
+ <li class="dropdown__item">
47
+ <%= link_to edit_sortition_path(sortition), class: "dropdown__button" do %>
48
+ <%= icon "pencil-line" %>
49
+ <%= t("actions.edit", scope: "decidim.sortitions.admin") %>
50
+ <% end %>
51
+ </li>
42
52
 
43
- <%= resource_permissions_link(sortition) %>
53
+ <hr>
54
+ <% end %>
44
55
 
45
- <% if allowed_to? :destroy, :sortition, sortition: sortition %>
46
- <%= icon_link_to "delete-bin-line", confirm_destroy_sortition_path(sortition), t("actions.destroy", scope: "decidim.sortitions.admin"), class: "action-icon--remove" %>
47
- <% else %>
48
- <span class="action-space icon"></span>
49
- <% end %>
56
+ <li class="dropdown__item">
57
+ <%= link_to sortition_path(sortition), target: "_blank", data: { "external-link": false }, class: "dropdown__button" do %>
58
+ <%= icon "fullscreen-line" %>
59
+ <%= t("actions.show", scope: "decidim.sortitions.admin") %>
60
+ <% end %>
61
+ </li>
62
+
63
+ <hr>
64
+
65
+ <li class="dropdown__item">
66
+ <%= dropdown_resource_permissions_link(sortition) %>
67
+ </li>
68
+
69
+ <hr>
70
+
71
+ <% if allowed_to? :destroy, :sortition, sortition: sortition %>
72
+ <li class="dropdown__item">
73
+ <%= link_to confirm_destroy_sortition_path(sortition), class: "dropdown__button" do %>
74
+ <%= icon "delete-bin-line" %>
75
+ <%= t("actions.destroy", scope: "decidim.sortitions.admin") %>
76
+ <% end %>
77
+ </li>
78
+ <% end %>
79
+ </ul>
80
+ </div>
50
81
  </td>
51
82
  </tr>
52
83
  <% end %>
data/config/assets.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  base_path = File.expand_path("..", __dir__)
4
4
 
5
- Decidim::Webpacker.register_path("#{base_path}/app/packs")
6
- Decidim::Webpacker.register_entrypoints(
5
+ Decidim::Shakapacker.register_path("#{base_path}/app/packs")
6
+ Decidim::Shakapacker.register_entrypoints(
7
7
  decidim_sortitions: "#{base_path}/app/packs/entrypoints/decidim_sortitions.js"
8
8
  )
@@ -39,7 +39,6 @@ ar:
39
39
  actions:
40
40
  destroy: إلغاء الفرز
41
41
  edit: تعديل
42
- new_sortition: فرز جديد
43
42
  show: تفاصيل الفرز
44
43
  models:
45
44
  sortition:
@@ -43,8 +43,9 @@ ca-IT:
43
43
  actions:
44
44
  destroy: Cancel·la el sorteig
45
45
  edit: Edita
46
- new_sortition: Nou sorteig
46
+ new_sortition: Afegir sorteig
47
47
  show: Detalls del sorteig
48
+ title: Accions
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ ca-IT:
143
144
  other: "%{count} classificacions"
144
145
  statistics:
145
146
  sortitions_count: Sortejos
147
+ sortitions_count_tooltip: El nombre de seleccions aleatòries realitzades per a la presa de decisions.
@@ -43,8 +43,9 @@ ca:
43
43
  actions:
44
44
  destroy: Cancel·la el sorteig
45
45
  edit: Edita
46
- new_sortition: Nou sorteig
46
+ new_sortition: Afegir sorteig
47
47
  show: Detalls del sorteig
48
+ title: Accions
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ ca:
143
144
  other: "%{count} classificacions"
144
145
  statistics:
145
146
  sortitions_count: Sortejos
147
+ sortitions_count_tooltip: El nombre de seleccions aleatòries realitzades per a la presa de decisions.
@@ -47,6 +47,7 @@ cs:
47
47
  edit: Upravit
48
48
  new_sortition: Nové losování
49
49
  show: Detaily losování
50
+ title: Akce
50
51
  models:
51
52
  sortition:
52
53
  fields:
@@ -45,6 +45,7 @@ de:
45
45
  edit: Bearbeiten
46
46
  new_sortition: Neue Sortierung
47
47
  show: Sortierdetails
48
+ title: Aktionen
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -38,7 +38,6 @@ el:
38
38
  actions:
39
39
  destroy: Ακύρωση της κλήρωσης
40
40
  edit: Επεξεργασία
41
- new_sortition: Νέα κλήρωση
42
41
  show: Λεπτομέρειες κλήρωσης
43
42
  models:
44
43
  sortition:
@@ -45,6 +45,7 @@ en:
45
45
  edit: Edit
46
46
  new_sortition: New sortition
47
47
  show: Sortition details
48
+ title: Actions
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ en:
143
144
  other: "%{count} sortitions"
144
145
  statistics:
145
146
  sortitions_count: Sortitions
147
+ sortitions_count_tooltip: The number of random selections carried out for decision-making.
@@ -43,8 +43,9 @@ es-MX:
43
43
  actions:
44
44
  destroy: Cancelar el sorteo
45
45
  edit: Editar
46
- new_sortition: Nuevo sorteo
46
+ new_sortition: Añadir sorteo
47
47
  show: Detalles de la clasificación
48
+ title: Acciones
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ es-MX:
143
144
  other: "%{count} clasificaciones"
144
145
  statistics:
145
146
  sortitions_count: Sorteos
147
+ sortitions_count_tooltip: El número de selecciones aleatorias realizadas para la toma de decisiones.
@@ -43,8 +43,9 @@ es-PY:
43
43
  actions:
44
44
  destroy: Cancelar el sorteo
45
45
  edit: Editar
46
- new_sortition: Nuevo sorteo
46
+ new_sortition: Añadir sorteo
47
47
  show: Detalles de la clasificación
48
+ title: Acciones
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ es-PY:
143
144
  other: "%{count} clasificaciones"
144
145
  statistics:
145
146
  sortitions_count: Sorteos
147
+ sortitions_count_tooltip: El número de selecciones aleatorias realizadas para la toma de decisiones.
@@ -43,8 +43,9 @@ es:
43
43
  actions:
44
44
  destroy: Cancela el sorteo
45
45
  edit: Editar
46
- new_sortition: Nuevo sorteo
46
+ new_sortition: Añadir sorteo
47
47
  show: Detalles del sorteo
48
+ title: Acciones
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ es:
143
144
  other: "%{count} clasificaciones"
144
145
  statistics:
145
146
  sortitions_count: Sorteos
147
+ sortitions_count_tooltip: El número de selecciones aleatorias realizadas para la toma de decisiones.
@@ -20,13 +20,13 @@ eu:
20
20
  components:
21
21
  sortitions:
22
22
  actions:
23
- comment: Iruzkina
23
+ comment: Egin iruzkina
24
24
  name: Zozketak
25
25
  settings:
26
26
  global:
27
27
  clear_all: Garbitu dena
28
28
  comments_enabled: Iruzkinak gaituta
29
- comments_max_length: Iruzkinen gehieneko luzera (utzi 0 lehenetsitako konfigurazioa uzteko)
29
+ comments_max_length: Iruzkinen gehieneko luzera (utzi 0 lehenetsita konfigurazioa mantendu nahi baduzu)
30
30
  define_taxonomy_filters: Mesedez, zehaztu iragazki batzuk partaidetza-espazio honetarako eszenatoki hau erabili aurretik.
31
31
  no_taxonomy_filters_found: Ez da taxonomia-iragazkirik aurkitu.
32
32
  taxonomy_filters: Aukeratu iragazkiak osagairako
@@ -36,15 +36,16 @@ eu:
36
36
  sortition_created:
37
37
  email_intro: '"%{resource_title}" zozketa jarraitzen ari zaren "%{participatory_space_title}" espazioan gehitu da.'
38
38
  email_outro: Jakinarazpen hau jaso duzu "%{participatory_space_title}" jarraitzen ari zarelako. Aurreko estekan sartu jarraitzeari uzteko.
39
- email_subject: Zozketa berria gehitu da %{participatory_space_title} espaziora
39
+ email_subject: Beste zozketa bat gehitu da %{participatory_space_title} espaziora
40
40
  notification_title: <a href="%{resource_path}">%{resource_title}</a> zozketa %{participatory_space_title} espaziora gehitu da
41
41
  sortitions:
42
42
  admin:
43
43
  actions:
44
44
  destroy: Zozketa bertan behera utzi
45
45
  edit: Editatu
46
- new_sortition: Zozketa berria
46
+ new_sortition: Beste zozketa bat
47
47
  show: Zozketaren xehetasunak
48
+ title: Ekintzak
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -61,7 +62,7 @@ eu:
61
62
  confirm_destroy:
62
63
  confirm_destroy: Ziur al zaude zozketa hau bertan behera utzi nahi duzula?
63
64
  destroy: Zozketa bertan behera utzi
64
- title: Zozketa bertan behera utzi
65
+ title: Zozketa bertan behera uztea
65
66
  create:
66
67
  error: Arazo bat gertatu da zozketa berri bat sortzean.
67
68
  success: Zozketa ondo sortu da.
@@ -80,9 +81,9 @@ eu:
80
81
  new:
81
82
  confirm: Botoia sakatzean plataformak egun eta ordua (segundu gutxi batzuk gora behera) eta dadoak botatzean ateratako zenbakia gorde egingo ditu ausazko hautaketa bat egiteko. Botoia sakatu ondoren ez dago atzera egiterik eta zozketaren emaitzak zein txantiloi honetan sartutako datuak argitaratuko dira eta ezin izango dira aldatu. Beraz, mesedez, arretaz jarraitu.
82
83
  create: Sortu
83
- title: Beste zozketa bat
84
+ title: Zozketa berria
84
85
  show:
85
- selected_proposals: Aukeratutako proposamenak
86
+ selected_proposals: Zozketatzeko aukeratutako proposamenak
86
87
  update:
87
88
  error: Arazo bat sortu da zozketa eguneratzean.
88
89
  success: Zozketa zuzen eguneratu da.
@@ -94,10 +95,10 @@ eu:
94
95
  sortitions:
95
96
  count:
96
97
  proposals_count:
97
- one: Proposamen 1
98
- other: "%{count} proposamen"
98
+ one: proposamen 1
99
+ other: "Proposamen bat"
99
100
  filters:
100
- active: Aktiboa
101
+ active: Aktiboak
101
102
  all: Guztiak
102
103
  cancelled: Bertan behera
103
104
  category: Kategoria
@@ -108,8 +109,8 @@ eu:
108
109
  selected_proposals: Aukeratutako proposamenak
109
110
  orders:
110
111
  label: 'Zozketak honen arabera ordenatu:'
111
- random: Ausaz
112
- recent: Berrienak
112
+ random: Ausazko ordena
113
+ recent: Berrienetatik zaharrenetara
113
114
  results_count:
114
115
  count:
115
116
  one: Hautatutako proposamena
@@ -117,7 +118,7 @@ eu:
117
118
  show:
118
119
  algorithm: Zozketaren algoritmoaren kodea
119
120
  any_taxonomy: taxonomia guztietatik
120
- cancelled: Zozketa beran behera utzita
121
+ cancelled: Bertan behera utzitako zozketak
121
122
  candidate_proposal_ids: Zozketako proposamenen hurrenkera eta IDak
122
123
  candidate_proposals_info: 'Zozketa honako proposamenen artean egin zen (%{taxonomy_labels}), honako identifikazio-agiri hauekin (letra lodiz hautatutako proposamenak) '
123
124
  dice_result: Dadoen emaitza
@@ -143,3 +144,4 @@ eu:
143
144
  other: "%{count} zozketa"
144
145
  statistics:
145
146
  sortitions_count: Zozketak
147
+ sortitions_count_tooltip: Erabakiak hartzeko egindako ausazko selekzioen kopurua.
@@ -45,6 +45,7 @@ fi-pl:
45
45
  edit: Muokkaa
46
46
  new_sortition: Uusi satunnaisvalinta
47
47
  show: Satunnaistamisen yksityiskohdat
48
+ title: Toiminnot
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ fi-pl:
143
144
  other: "%{count} satunnaisvalintaa"
144
145
  statistics:
145
146
  sortitions_count: Satunnaistamista
147
+ sortitions_count_tooltip: Päätöksentekoa varten tehtyjen satunnaisvalintojen lukumäärä.
@@ -45,6 +45,7 @@ fi:
45
45
  edit: Muokkaa
46
46
  new_sortition: Uusi satunnaisvalinta
47
47
  show: Satunnaisvalinnan tarkemmat tiedot
48
+ title: Toiminnot
48
49
  models:
49
50
  sortition:
50
51
  fields:
@@ -143,3 +144,4 @@ fi:
143
144
  other: "%{count} satunnaisvalintaa"
144
145
  statistics:
145
146
  sortitions_count: Satunnaisvalintaa
147
+ sortitions_count_tooltip: Päätöksentekoa varten tehtyjen satunnaisvalintojen lukumäärä.
@@ -27,7 +27,6 @@ fr-CA:
27
27
  clear_all: Effacer tout
28
28
  comments_enabled: Commentaires activés
29
29
  comments_max_length: Longueur max des commentaires (laisser 0 pour la valeur par défaut)
30
- no_taxonomy_filters_found: Aucun filtre de taxonomie trouvé.
31
30
  taxonomy_filters: Sélectionner les filtres pour le composant
32
31
  taxonomy_filters_add: Ajouter un filtre
33
32
  events:
@@ -44,6 +43,7 @@ fr-CA:
44
43
  edit: Éditer
45
44
  new_sortition: Nouveau tirage au sort
46
45
  show: Détails du tirage au sort
46
+ title: Actions
47
47
  models:
48
48
  sortition:
49
49
  fields:
@@ -54,7 +54,6 @@ fr-CA:
54
54
  request_timestamp: Date et heure
55
55
  seed: Valeur aléatoire
56
56
  target_items: Éléments à sélectionner
57
- taxonomies: Taxonomies
58
57
  title: Titre
59
58
  sortitions:
60
59
  confirm_destroy:
@@ -71,9 +70,7 @@ fr-CA:
71
70
  title: Mettre à jour les informations sur le tirage au sort
72
71
  update: Mettre à jour
73
72
  form:
74
- all_taxonomies: Toutes les taxonomies
75
73
  select_proposal_component: Sélectionnez un ensemble de propositions
76
- select_taxonomies: proposition
77
74
  index:
78
75
  title: Tirages au sort
79
76
  new:
@@ -139,3 +136,4 @@ fr-CA:
139
136
  other: "%{count} tirages au sort"
140
137
  statistics:
141
138
  sortitions_count: Tirages au sort
139
+ sortitions_count_tooltip: Le nombre de tirages au sort réalisés dans le cadre du processus décisionnel.
@@ -27,7 +27,6 @@ fr:
27
27
  clear_all: Effacer tout
28
28
  comments_enabled: Commentaires activés
29
29
  comments_max_length: Longueur max des commentaires (laisser 0 pour la valeur par défaut)
30
- no_taxonomy_filters_found: Aucun filtre de taxonomie trouvé.
31
30
  taxonomy_filters: Sélectionner les filtres pour le composant
32
31
  taxonomy_filters_add: Ajouter un filtre
33
32
  events:
@@ -44,6 +43,7 @@ fr:
44
43
  edit: Éditer
45
44
  new_sortition: Nouveau tirage au sort
46
45
  show: Détails du tirage au sort
46
+ title: Actions
47
47
  models:
48
48
  sortition:
49
49
  fields:
@@ -54,7 +54,6 @@ fr:
54
54
  request_timestamp: Date et heure
55
55
  seed: Valeur aléatoire
56
56
  target_items: Éléments à sélectionner
57
- taxonomies: Taxonomies
58
57
  title: Titre
59
58
  sortitions:
60
59
  confirm_destroy:
@@ -71,9 +70,7 @@ fr:
71
70
  title: Mettre à jour les informations sur le tirage au sort
72
71
  update: Mettre à jour
73
72
  form:
74
- all_taxonomies: Toutes les taxonomies
75
73
  select_proposal_component: Sélectionnez un ensemble de propositions
76
- select_taxonomies: proposition
77
74
  index:
78
75
  title: Tirages au sort
79
76
  new:
@@ -139,3 +136,4 @@ fr:
139
136
  other: "%{count} tirages au sort"
140
137
  statistics:
141
138
  sortitions_count: Tirages au sort
139
+ sortitions_count_tooltip: Le nombre de tirages au sort réalisés dans le cadre du processus décisionnel.
@@ -38,7 +38,6 @@ gl:
38
38
  actions:
39
39
  destroy: Cancelar o sorteo
40
40
  edit: Editar
41
- new_sortition: Nova xeración
42
41
  show: Detalles de clasificación
43
42
  models:
44
43
  sortition:
@@ -35,7 +35,6 @@ hu:
35
35
  actions:
36
36
  destroy: Sorsolás törlése
37
37
  edit: Szerkesztés
38
- new_sortition: Új sorsolás
39
38
  show: Sorsolás részletei
40
39
  models:
41
40
  sortition:
@@ -34,7 +34,6 @@ id:
34
34
  actions:
35
35
  destroy: Batalkan penyortiran
36
36
  edit: Edit
37
- new_sortition: Pemilahan baru
38
37
  show: Detail penyortiran
39
38
  models:
40
39
  sortition:
@@ -27,7 +27,6 @@ is:
27
27
  actions:
28
28
  destroy: Hætta við flokkunina
29
29
  edit: Breyta
30
- new_sortition: Ný flokkun
31
30
  show: Uppsetningarupplýsingar
32
31
  models:
33
32
  sortition:
@@ -38,7 +38,6 @@ it:
38
38
  actions:
39
39
  destroy: Annulla la sortizione
40
40
  edit: Modifica
41
- new_sortition: Nuova sortizione
42
41
  show: Dettagli di ordinamento
43
42
  models:
44
43
  sortition:
@@ -44,6 +44,7 @@ ja:
44
44
  edit: 編集
45
45
  new_sortition: 新しいソート順
46
46
  show: 並べ替えの詳細
47
+ title: アクション
47
48
  models:
48
49
  sortition:
49
50
  fields:
@@ -138,3 +139,4 @@ ja:
138
139
  other: "%{count} ソート数"
139
140
  statistics:
140
141
  sortitions_count: 並べ替え
142
+ sortitions_count_tooltip: 意思決定のために実施されたランダム抽選の数です。
@@ -40,7 +40,6 @@ lt:
40
40
  actions:
41
41
  destroy: Atšaukti sprendimą burtų keliu
42
42
  edit: Redaguoti
43
- new_sortition: Nauja galimybė spręsti burtų keliu
44
43
  show: Išsami informacija apie sprendimą burtų keliu
45
44
  models:
46
45
  sortition:
@@ -36,7 +36,6 @@ lv:
36
36
  actions:
37
37
  destroy: Atcelt izlozi
38
38
  edit: Labot
39
- new_sortition: Jauna izloze
40
39
  show: Izlozes detaļas
41
40
  models:
42
41
  sortition:
@@ -38,7 +38,6 @@ nl:
38
38
  actions:
39
39
  destroy: Annuleer de loting
40
40
  edit: Bewerk
41
- new_sortition: Nieuwe loting
42
41
  show: Details van de loting
43
42
  models:
44
43
  sortition:
@@ -38,7 +38,6 @@
38
38
  actions:
39
39
  destroy: Avbryt sorteringen
40
40
  edit: Editar
41
- new_sortition: Ny sortering
42
41
  show: Sorterings detaljer
43
42
  models:
44
43
  sortition:
@@ -40,7 +40,7 @@ pl:
40
40
  actions:
41
41
  destroy: Anuluj wybór losowy
42
42
  edit: Edytuj
43
- new_sortition: Nowy wybór losowy
43
+ new_sortition: Nowy wybór przez losowanie
44
44
  show: Szczegóły dotyczące wyboru losowego
45
45
  models:
46
46
  sortition:
@@ -24,13 +24,8 @@ pt-BR:
24
24
  name: Sorteios
25
25
  settings:
26
26
  global:
27
- clear_all: Limpar tudo
28
27
  comments_enabled: Comentários ativados
29
28
  comments_max_length: Tamanho máximo de comentários (deixe 0 para o valor padrão)
30
- define_taxonomy_filters: Por favor, defina alguns filtros para este espaço participativo antes de usar esta configuração.
31
- no_taxonomy_filters_found: Nenhum filtro de taxonomia encontrado.
32
- taxonomy_filters: Selecione filtros para o componente
33
- taxonomy_filters_add: Adicionar filtro
34
29
  events:
35
30
  sortitions:
36
31
  sortition_created:
@@ -43,7 +38,7 @@ pt-BR:
43
38
  actions:
44
39
  destroy: Cancelar a classificação
45
40
  edit: Editar
46
- new_sortition: Nova classificação
41
+ new_sortition: Novo Sorteio
47
42
  show: Detalhes da classificação
48
43
  models:
49
44
  sortition:
@@ -55,7 +50,6 @@ pt-BR:
55
50
  request_timestamp: Tempo de sorteio
56
51
  seed: Semente
57
52
  target_items: Itens para selecionar
58
- taxonomies: Taxonomias
59
53
  title: Título
60
54
  sortitions:
61
55
  confirm_destroy:
@@ -72,7 +66,6 @@ pt-BR:
72
66
  title: Atualizar as informações sobre a classificação
73
67
  update: Atualizar
74
68
  form:
75
- all_taxonomies: Todas as taxonomias
76
69
  select_proposal_component: Selecione o conjunto de propostas
77
70
  index:
78
71
  title: Sorteios
@@ -115,16 +108,13 @@ pt-BR:
115
108
  other: propostas selecionadas
116
109
  show:
117
110
  algorithm: Código de Algoritmo da Classificação
118
- any_taxonomy: de todas as taxonomias
119
111
  cancelled: Sortição cancelada
120
112
  candidate_proposal_ids: Ordem de propostas de classificação e IDs
121
- candidate_proposals_info: 'A ordenação foi realizada entre as seguintes propostas (%{taxonomy_labels}), com os seguintes IDs (em negrito as propostas selecionadas) '
122
113
  dice_result: (1) resultado dado
123
114
  introduction: 'Esta página contém os resultados da ordenação %{reference}. Por meio dessa classificação, %{target_items} número de resultados foram selecionados aleatoriamente e com uma distribuição de probabilidade igual ao conjunto de propostas exibidas abaixo. Juntamente com os resultados, as informações exibidas nesta página fornecem todas as informações necessárias para maximizar as garantias e reproduzir os resultados. A chave para a qualidade dessa classificação é a dupla aleatoriedade fornecida pela rolagem de dados (verificada por testemunhas) e o tempo preciso da classificação que fornece dados para um algoritmo que gera uma seleção aleatória. A semente do tempo para a classificação é tão precisa (segundos) que é impossível controlar pelos humanos, fornecendo assim uma entrada dupla "incontrolável" para garantir um resultado justo. '
124
115
  mathematical_result: Resultado (1) x (2)
125
116
  proposals_selected_by_sortition: Propostas selecionadas por classificação
126
117
  sortition_reproducibility_details: Detalhes de reprodutibilidade de ordenação
127
- taxonomies: das taxonomias %{taxonomies}
128
118
  time_seed: (2) semente do tempo
129
119
  witnesses: Testemunhas
130
120
  sortition:
@@ -38,7 +38,6 @@ pt:
38
38
  actions:
39
39
  destroy: Cancelar o sorteio
40
40
  edit: Editar
41
- new_sortition: Novo sorteio
42
41
  show: Detalhes do sorteio
43
42
  models:
44
43
  sortition:
@@ -44,8 +44,8 @@ ro:
44
44
  actions:
45
45
  destroy: Anulează tragerea la sorți
46
46
  edit: Editează
47
- new_sortition: Tragere la sorți nouă
48
47
  show: Detalii privind tragerea la sorți
48
+ title: Acțiuni
49
49
  models:
50
50
  sortition:
51
51
  fields:
@@ -144,3 +144,4 @@ ro:
144
144
  other: "%{count} trageri la sorți"
145
145
  statistics:
146
146
  sortitions_count: Trageri la sorți
147
+ sortitions_count_tooltip: Numărul de selecții aleatorii efectuate pentru luarea deciziilor.
@@ -37,7 +37,6 @@ ru:
37
37
  actions:
38
38
  destroy: Отменить жеребьевку
39
39
  edit: Редактировать
40
- new_sortition: Добавить жеребьевку
41
40
  show: Подробности жеребьевки
42
41
  models:
43
42
  sortition:
@@ -37,7 +37,6 @@ sk:
37
37
  actions:
38
38
  destroy: Zrušiť voľbu losovaním
39
39
  edit: Upraviť
40
- new_sortition: Nové rozvrhnutie
41
40
  show: Podrobnosti o voľbe losovaním
42
41
  models:
43
42
  sortition:
@@ -24,13 +24,8 @@ sv:
24
24
  name: Lottningar
25
25
  settings:
26
26
  global:
27
- clear_all: Rensa
28
27
  comments_enabled: Aktivera kommentarer
29
28
  comments_max_length: Maximal kommentarslängd (ange 0 för att använda standardvärdet)
30
- define_taxonomy_filters: Ställ in filter innan du använder den här inställningen.
31
- no_taxonomy_filters_found: Inga filter för kategorier hittades.
32
- taxonomy_filters: Välj filter för komponenten
33
- taxonomy_filters_add: Lägg till filter
34
29
  events:
35
30
  sortitions:
36
31
  sortition_created:
@@ -43,8 +38,9 @@ sv:
43
38
  actions:
44
39
  destroy: Avbryt tilldelningen
45
40
  edit: Redigera
46
- new_sortition: Ny tilldelning
41
+ new_sortition: Ny lottning
47
42
  show: Detaljer om tilldelningen
43
+ title: Handlingar
48
44
  models:
49
45
  sortition:
50
46
  fields:
@@ -55,7 +51,6 @@ sv:
55
51
  request_timestamp: Lottningstid
56
52
  seed: Frö
57
53
  target_items: Objekt att välja
58
- taxonomies: Kategorier
59
54
  title: Titel
60
55
  sortitions:
61
56
  confirm_destroy:
@@ -72,9 +67,7 @@ sv:
72
67
  title: Uppdatera informationen om tilldelningen
73
68
  update: Uppdatera
74
69
  form:
75
- all_taxonomies: Alla kategorier
76
70
  select_proposal_component: Välj förslagen som ska behandlas
77
- select_taxonomies: Kategorier för förslagen där du vill göra lottningen. Lämna tomt för att göra lottningen på alla förslag för kategoriseringen.
78
71
  index:
79
72
  title: Lottningar
80
73
  new:
@@ -116,16 +109,13 @@ sv:
116
109
  other: Valda förslag
117
110
  show:
118
111
  algorithm: Tilldelningens algoritmkod
119
- any_taxonomy: från alla kategorier
120
112
  cancelled: Avbruten tilldelning
121
113
  candidate_proposal_ids: Förslagens ordning och ID i tilldelningen
122
- candidate_proposals_info: 'Lottningen gjordes bland följande förslag (%{taxonomy_labels}), med följande id (de utvalda förslagen i fetstil) '
123
114
  dice_result: Tärningsresultat
124
115
  introduction: 'Den här sidan innehåller resultaten från tilldelningen %{reference}. Med hjälp av tilldelningen har %{target_items} resultat valts ut slumpmässigt och med lika stor sannolikhet från listan med förslag nedan. Tillsammans med resultaten, innehåller informationen på denna sida allt som krävs för att garantera och återskapa resultaten. Nyckeln till kvalitén på tilldelningen är den dubblerade slumpmässigheten från ett bevittnat tärningskast samt den exakta tiden för tilldelningen, som matas in i en algoritm som genererar det slumpmässiga urvalet. Tidsfröet för tilldelningen är så exakt (sekunder) att den är omöjlig att styras av människor, vilket ger en dubblerad "okontrollerad" indata, i syfte att att garantera ett rättvist resultat. '
125
116
  mathematical_result: Resultat (tärning x dragning)
126
117
  proposals_selected_by_sortition: Förslag valda genom tilldelning
127
118
  sortition_reproducibility_details: Detaljer för att reproducera lottningens resultat
128
- taxonomies: från kategorierna %{taxonomies}
129
119
  time_seed: (2) Tidsfrö
130
120
  witnesses: Vittnen
131
121
  sortition:
@@ -143,3 +133,4 @@ sv:
143
133
  other: "%{count} tilldelningar"
144
134
  statistics:
145
135
  sortitions_count: Lottningar
136
+ sortitions_count_tooltip: Antalet slumpmässiga val som görs för beslutsfattandet.
@@ -36,7 +36,7 @@ tr:
36
36
  actions:
37
37
  destroy: Sıralamayı iptal et
38
38
  edit: Düzenle
39
- new_sortition: Yeni sıralama
39
+ new_sortition: Yeni Sıralama
40
40
  show: Sıralama detayları
41
41
  models:
42
42
  sortition:
@@ -37,7 +37,6 @@ uk:
37
37
  actions:
38
38
  destroy: Скасувати жеребкування
39
39
  edit: Редагувати
40
- new_sortition: Додати жеребкування
41
40
  show: Подробиці жеребкування
42
41
  models:
43
42
  sortition:
@@ -35,7 +35,6 @@ zh-CN:
35
35
  actions:
36
36
  destroy: 取消排序方式
37
37
  edit: 编辑
38
- new_sortition: 新的排序方式
39
38
  show: 排序详情
40
39
  models:
41
40
  sortition:
@@ -37,7 +37,6 @@ zh-TW:
37
37
  actions:
38
38
  destroy: 取消選民隨機抽籤
39
39
  edit: 編輯
40
- new_sortition: 新的抽籤
41
40
  show: 抽籤詳細資料
42
41
  models:
43
42
  sortition:
@@ -7,6 +7,7 @@ module Decidim
7
7
  implements Decidim::Comments::CommentableInterface
8
8
  implements Decidim::Core::TaxonomizableInterface
9
9
  implements Decidim::Core::TimestampsInterface
10
+ implements Decidim::Core::ReferableInterface
10
11
 
11
12
  description "A sortition"
12
13
 
@@ -17,13 +18,18 @@ module Decidim
17
18
  field :candidate_proposals, [GraphQL::Types::Int, { null: true }], "The candidate proposal for this sortition", null: true
18
19
  field :dice, GraphQL::Types::Int, "The dice for this sortition", null: true
19
20
  field :id, GraphQL::Types::ID, "The internal ID for this sortition", null: false
20
- field :reference, GraphQL::Types::String, "The reference for this sortition", null: true
21
- field :request_timestamp, Decidim::Core::DateType, "The request time stamp for this request", null: true
22
- field :selected_proposals, [GraphQL::Types::Int, { null: true }], "The selected proposals for this sortition", null: true
21
+ field :proposals, [Decidim::Proposals::ProposalType, { null: true }], "The selected proposal for this sortition", null: true
22
+ field :request_timestamp, Decidim::Core::DateTimeType, "The request time stamp for this request", null: true
23
+ field :selected_proposals, [GraphQL::Types::Int, { null: true }], "The selected proposal ids for this sortition", null: true
23
24
  field :target_items, GraphQL::Types::Int, "The target items for this sortition", null: true
24
25
  field :title, Decidim::Core::TranslatedFieldType, "The title for this sortition", null: true
26
+ field :url, GraphQL::Types::String, "The URL for this sortition", null: false
25
27
  field :witnesses, Decidim::Core::TranslatedFieldType, "The witnesses for this sortition", null: true
26
28
 
29
+ def url
30
+ Decidim::ResourceLocatorPresenter.new(object).url
31
+ end
32
+
27
33
  def self.authorized?(object, context)
28
34
  context[:sortition] = object
29
35
 
@@ -30,7 +30,11 @@ Decidim.register_component(:sortitions) do |component|
30
30
  resource.actions = %w(comment)
31
31
  end
32
32
 
33
- component.register_stat :sortitions_count, primary: true, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |components, start_at, end_at|
33
+ component.register_stat :sortitions_count,
34
+ primary: true,
35
+ priority: Decidim::StatsRegistry::MEDIUM_PRIORITY,
36
+ icon_name: "team-line",
37
+ tooltip_key: "sortitions_count_tooltip" do |components, start_at, end_at|
34
38
  Decidim::Sortitions::FilteredSortitions.for(components, start_at, end_at).count
35
39
  end
36
40
 
@@ -28,7 +28,7 @@ module Decidim
28
28
  Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Sortitions::Engine.root}/app/views") # for proposal partials
29
29
  end
30
30
 
31
- initializer "decidim_sortitions.webpacker.assets_path" do
31
+ initializer "decidim_sortitions.shakapacker.assets_path" do
32
32
  Decidim.register_assets_path File.expand_path("app/packs", root)
33
33
  end
34
34
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Sortitions
5
5
  def self.version
6
- "0.30.8"
6
+ "0.31.0.rc1"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-sortitions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.8
4
+ version: 0.31.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Salvador Perez Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-24 00:00:00.000000000 Z
11
+ date: 2025-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,98 +16,98 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.30.8
19
+ version: 0.31.0.rc1
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.30.8
26
+ version: 0.31.0.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-comments
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.30.8
33
+ version: 0.31.0.rc1
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.30.8
40
+ version: 0.31.0.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.30.8
47
+ version: 0.31.0.rc1
48
48
  type: :runtime
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.30.8
54
+ version: 0.31.0.rc1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-proposals
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.30.8
61
+ version: 0.31.0.rc1
62
62
  type: :runtime
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.30.8
68
+ version: 0.31.0.rc1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: decidim-assemblies
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.30.8
75
+ version: 0.31.0.rc1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.30.8
82
+ version: 0.31.0.rc1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: decidim-dev
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.30.8
89
+ version: 0.31.0.rc1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.30.8
96
+ version: 0.31.0.rc1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: decidim-participatory_processes
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.30.8
103
+ version: 0.31.0.rc1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.30.8
110
+ version: 0.31.0.rc1
111
111
  description: This module makes possible to select amount a set of proposal by sortition
112
112
  email:
113
113
  - jsperezg@gmail.com
@@ -142,6 +142,7 @@ files:
142
142
  - app/permissions/decidim/sortitions/admin/permissions.rb
143
143
  - app/permissions/decidim/sortitions/permissions.rb
144
144
  - app/presenters/decidim/sortitions/admin_log/sortition_presenter.rb
145
+ - app/presenters/decidim/sortitions/sortition_presenter.rb
145
146
  - app/queries/decidim/sortitions/admin/participatory_space_proposal_components.rb
146
147
  - app/queries/decidim/sortitions/admin/participatory_space_proposals.rb
147
148
  - app/queries/decidim/sortitions/filtered_sortitions.rb