decidim-sortitions 0.28.6 → 0.29.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.
- checksums.yaml +4 -4
- data/app/forms/decidim/sortitions/admin/destroy_sortition_form.rb +1 -1
- data/app/forms/decidim/sortitions/admin/edit_sortition_form.rb +1 -1
- data/app/forms/decidim/sortitions/admin/sortition_form.rb +2 -2
- data/app/helpers/decidim/sortitions/admin/sortitions_helper.rb +1 -1
- data/app/models/decidim/sortitions/sortition.rb +1 -1
- data/app/queries/decidim/sortitions/admin/participatory_space_proposals.rb +11 -18
- data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +4 -4
- data/app/views/decidim/sortitions/admin/sortitions/show.html.erb +1 -1
- data/app/views/decidim/sortitions/sortitions/_linked_sortitions.html.erb +4 -4
- data/app/views/decidim/sortitions/sortitions/_sortition_author.html.erb +4 -4
- data/app/views/decidim/sortitions/sortitions/_sortition_cancel_author.html.erb +4 -4
- data/app/views/decidim/sortitions/sortitions/_sortitions.html.erb +1 -1
- data/app/views/decidim/sortitions/sortitions/_tags.html.erb +1 -1
- data/app/views/decidim/sortitions/sortitions/index.html.erb +1 -8
- data/app/views/decidim/sortitions/sortitions/show.html.erb +2 -2
- data/config/locales/cs.yml +0 -2
- data/config/locales/es.yml +2 -2
- data/config/locales/eu.yml +8 -8
- data/config/locales/fi.yml +8 -8
- data/config/locales/sv.yml +14 -23
- data/decidim-sortitions.gemspec +3 -5
- data/lib/decidim/api/sortition_type.rb +0 -6
- data/lib/decidim/api/sortitions_type.rb +3 -1
- data/lib/decidim/sortitions/admin_engine.rb +1 -1
- data/lib/decidim/sortitions/version.rb +1 -1
- metadata +18 -50
- data/app/views/decidim/sortitions/sortitions/_proposal_badge.html.erb +0 -3
- data/config/locales/bn-BD.yml +0 -1
- data/config/locales/bs-BA.yml +0 -1
- data/config/locales/ca-IT.yml +0 -140
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9783e97fec8a58e1d45ae868626336d6987eb753bd0868ce2f9789ac97fa051
|
4
|
+
data.tar.gz: c187aea3fb5cbd52fba26352e451a3f3ef50f0797760c1fe2140e00689a575a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42dd8e23c26e7d125295afc334adf9d623ababca039818fd0ca811f59540e1c6907c8434485802a375fb7bc51fc4b05bd062cd07bf5d4d7c39603e4e1fa3693c
|
7
|
+
data.tar.gz: d6fdab6f444ecc09408232b4cc6018042a28d71de0c6d7ffc78ab91510724cd02b32a85a49dfea95c72a1458ff88b1e3776d74f92548be4465428e3f43fe1bdb
|
@@ -9,7 +9,7 @@ module Decidim
|
|
9
9
|
mimic :sortition
|
10
10
|
|
11
11
|
translatable_attribute :title, String
|
12
|
-
translatable_attribute :additional_info,
|
12
|
+
translatable_attribute :additional_info, String
|
13
13
|
|
14
14
|
validates :title, translatable_presence: true
|
15
15
|
validates :additional_info, translatable_presence: true
|
@@ -13,8 +13,8 @@ module Decidim
|
|
13
13
|
attribute :decidim_category_id, Integer
|
14
14
|
attribute :dice, Integer
|
15
15
|
attribute :target_items, Integer
|
16
|
-
translatable_attribute :witnesses,
|
17
|
-
translatable_attribute :additional_info,
|
16
|
+
translatable_attribute :witnesses, String
|
17
|
+
translatable_attribute :additional_info, String
|
18
18
|
|
19
19
|
validates :title, translatable_presence: true
|
20
20
|
validates :decidim_proposals_component_id, presence: true
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
include Decidim::TranslationsHelper
|
8
8
|
include Decidim::PaginateHelper
|
9
9
|
|
10
|
-
#
|
10
|
+
# Converts a list of components into a list of selectable options
|
11
11
|
def components_options(components)
|
12
12
|
components.map do |f|
|
13
13
|
[translated_attribute(f.name), f.id]
|
@@ -18,30 +18,23 @@ module Decidim
|
|
18
18
|
@request_timestamp = sortition.request_timestamp
|
19
19
|
end
|
20
20
|
|
21
|
-
# Given a
|
21
|
+
# Given a participatory process retrieves its proposals
|
22
22
|
#
|
23
23
|
# Returns an ActiveRecord::Relation.
|
24
24
|
def query
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
25
|
+
proposals = Decidim::Proposals::Proposal
|
26
|
+
.not_withdrawn
|
27
|
+
.published
|
28
|
+
.not_hidden
|
29
|
+
.where("decidim_proposals_proposals.created_at < ?", request_timestamp)
|
30
|
+
.where(component: sortition.decidim_proposals_component)
|
31
|
+
proposals = proposals.where.not(id: proposals.only_status(:rejected))
|
32
|
+
|
33
|
+
return proposals.order(id: :asc) if category.nil?
|
35
34
|
|
36
35
|
# categorization -> category
|
37
|
-
|
36
|
+
proposals
|
38
37
|
.joins(:categorization)
|
39
|
-
.except_withdrawn
|
40
|
-
.published
|
41
|
-
.except_rejected
|
42
|
-
.not_hidden
|
43
|
-
.where(component: sortition.decidim_proposals_component)
|
44
|
-
.where("decidim_proposals_proposals.created_at < ?", request_timestamp)
|
45
38
|
.where(decidim_categorizations: { decidim_category_id: category.id })
|
46
39
|
.order(id: :asc)
|
47
40
|
end
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<th><%= t("models.sortition.fields.reference", scope: "decidim.sortitions.admin") %></th>
|
17
17
|
<th><%= t("models.sortition.fields.title", scope: "decidim.sortitions.admin") %></th>
|
18
18
|
<th><%= t("models.sortition.fields.created_at", scope: "decidim.sortitions.admin") %></th>
|
19
|
-
<th
|
19
|
+
<th></th>
|
20
20
|
</tr>
|
21
21
|
</thead>
|
22
22
|
<tbody>
|
@@ -25,9 +25,9 @@
|
|
25
25
|
<td><%= sortition.reference %></td>
|
26
26
|
<td>
|
27
27
|
<% if allowed_to? :update, :sortition, sortition: sortition %>
|
28
|
-
<%= link_to
|
28
|
+
<%= link_to decidim_escape_translated(sortition.title), edit_sortition_path(sortition) %>
|
29
29
|
<% else %>
|
30
|
-
<%=
|
30
|
+
<%= decidim_escape_translated(sortition.title) %>
|
31
31
|
<% end %>
|
32
32
|
</td>
|
33
33
|
<td><%= l sortition.created_at, format: :short %></td>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<span class="action-space icon"></span>
|
39
39
|
<% end %>
|
40
40
|
|
41
|
-
<%= icon_link_to "
|
41
|
+
<%= icon_link_to "eye-line", sortition_path(sortition), t("actions.show", scope: "decidim.sortitions.admin"), class: "action-icon--preview", target: "_blank", data: { "external-link": false } %>
|
42
42
|
|
43
43
|
<%= resource_permissions_link(sortition) %>
|
44
44
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="card" id="sortition">
|
3
3
|
<div class="item_show__header">
|
4
4
|
<h1 class="item_show__header-title">
|
5
|
-
<%=
|
5
|
+
<%= decidim_escape_translated(sortition.title) %>
|
6
6
|
</h1>
|
7
7
|
</div>
|
8
8
|
<div class="table-scroll">
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="card card--action
|
1
|
+
<div class="card card--action">
|
2
2
|
<% resources.each do |sortition| %>
|
3
3
|
<div class="card--list__item">
|
4
4
|
<div class="card--list__text">
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% end %>
|
8
8
|
<div>
|
9
9
|
<%= link_to resource_locator(sortition).path, class: "card__link" do %>
|
10
|
-
<h5 class="card--list__heading"><%=
|
10
|
+
<h5 class="card--list__heading"><%= decidim_escape_translated(sortition.title) %></h5>
|
11
11
|
<% end %>
|
12
12
|
<div class="author">
|
13
13
|
<span class="author__avatar">
|
@@ -19,8 +19,8 @@
|
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
|
-
<div
|
23
|
-
<span
|
22
|
+
<div>
|
23
|
+
<span>
|
24
24
|
<%= sortition.selected_proposals.size %>
|
25
25
|
</span> <%= t(".selected_proposals", count: proposal.selected_proposals.size) %>
|
26
26
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div
|
2
|
-
<div class="author
|
3
|
-
<span class="author__avatar
|
1
|
+
<div>
|
2
|
+
<div class="author">
|
3
|
+
<span class="author__avatar">
|
4
4
|
<%= image_tag present(sortition.author).avatar_url %>
|
5
5
|
</span>
|
6
6
|
<span class="author__name">
|
7
7
|
<% if sortition.author&.deleted? %>
|
8
|
-
<span class="label
|
8
|
+
<span class="label">
|
9
9
|
<%= t(".deleted") %>
|
10
10
|
</span>
|
11
11
|
<% else %>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div
|
2
|
-
<div class="author
|
3
|
-
<span class="author__avatar
|
1
|
+
<div>
|
2
|
+
<div class="author">
|
3
|
+
<span class="author__avatar">
|
4
4
|
<%= image_tag present(sortition.cancelled_by_user).avatar_url %>
|
5
5
|
</span>
|
6
6
|
<span class="author__name">
|
7
7
|
<% if sortition.cancelled_by_user&.deleted? %>
|
8
|
-
<span class="label
|
8
|
+
<span class="label">
|
9
9
|
<%= t(".deleted") %>
|
10
10
|
</span>
|
11
11
|
<% else %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if @sortitions.any? %>
|
2
|
-
<h2 class="h5 md:h3 decorator"
|
2
|
+
<h2 class="h5 md:h3 decorator"><%= t("count", scope: "decidim.sortitions.sortitions.sortitions_count", count: @sortitions.total_count) %></h2>
|
3
3
|
|
4
4
|
<%= order_selector available_orders, i18n_scope: "decidim.sortitions.sortitions.orders" %>
|
5
5
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
<%
|
2
|
-
description: translated_attribute(current_component.participatory_space.try(:description)),
|
3
|
-
title: t("decidim.components.pagination.page_title",
|
4
|
-
component_name:,
|
5
|
-
current_page: @sortitions.current_page,
|
6
|
-
total_pages: @sortitions.total_pages ),
|
7
|
-
url: sortitions_url,
|
8
|
-
resource: current_component) %>
|
1
|
+
<% add_decidim_page_title component_name %>
|
9
2
|
|
10
3
|
<% content_for :aside do %>
|
11
4
|
<h1 class="title-decorator"><%= component_name %></h1>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% add_decidim_meta_tags({
|
2
2
|
description: decidim_sanitize_editor(translated_attribute(sortition.additional_info)),
|
3
|
-
title:
|
3
|
+
title: decidim_escape_translated(sortition.title),
|
4
4
|
url: sortition_url(sortition.to_param)
|
5
5
|
}) %>
|
6
6
|
|
@@ -21,7 +21,7 @@ edit_link(
|
|
21
21
|
|
22
22
|
<section class="layout-main__section layout-main__heading">
|
23
23
|
<h1 class="h1 decorator mb-4">
|
24
|
-
<%=
|
24
|
+
<%= decidim_escape_translated(sortition.title) %>
|
25
25
|
</h1>
|
26
26
|
<div class="layout-author">
|
27
27
|
<%= cell "decidim/author", present(sortition.author), context_actions: [:date], from: sortition, layout: :compact %>
|
data/config/locales/cs.yml
CHANGED
data/config/locales/es.yml
CHANGED
@@ -107,8 +107,8 @@ es:
|
|
107
107
|
recent: Reciente
|
108
108
|
results_count:
|
109
109
|
count:
|
110
|
-
one:
|
111
|
-
other:
|
110
|
+
one: propuesta seleccionada
|
111
|
+
other: propuestas seleccionadas
|
112
112
|
show:
|
113
113
|
algorithm: Código de algoritmo del sorteo
|
114
114
|
any_category: de todas las categorías
|
data/config/locales/eu.yml
CHANGED
@@ -26,7 +26,7 @@ eu:
|
|
26
26
|
settings:
|
27
27
|
global:
|
28
28
|
comments_enabled: Iruzkinak gaituta
|
29
|
-
comments_max_length: Iruzkinen gehieneko luzera (utzi 0
|
29
|
+
comments_max_length: Iruzkinen gehieneko luzera (utzi 0 lehenetsitako konfigurazioari eusteko)
|
30
30
|
events:
|
31
31
|
sortitions:
|
32
32
|
sortition_created:
|
@@ -75,7 +75,7 @@ eu:
|
|
75
75
|
new:
|
76
76
|
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.
|
77
77
|
create: Sortu
|
78
|
-
title:
|
78
|
+
title: Beste zozketa bat
|
79
79
|
show:
|
80
80
|
selected_proposals: Zozketatzeko aukeratutako proposamenak
|
81
81
|
update:
|
@@ -83,14 +83,14 @@ eu:
|
|
83
83
|
success: Zozketa zuzen eguneratu da.
|
84
84
|
admin_log:
|
85
85
|
sortition:
|
86
|
-
create: "%{user_name}
|
87
|
-
delete: "%{user_name}
|
88
|
-
update: "%{user_name}
|
86
|
+
create: "%{user_name} k %{resource_name} zozketa sortu du %{space_name} espazioan"
|
87
|
+
delete: "%{user_name} k %{resource_name} zozketa bertan behera utzi du %{space_name} espazioan"
|
88
|
+
update: "%{user_name} k %{resource_name} zozketa eguneratu du %{space_name} espazioan"
|
89
89
|
sortitions:
|
90
90
|
count:
|
91
91
|
proposals_count:
|
92
92
|
one: proposamen 1
|
93
|
-
other: "
|
93
|
+
other: "%{count} proposamen"
|
94
94
|
filters:
|
95
95
|
active: Aktiboak
|
96
96
|
all: Guztiak
|
@@ -103,8 +103,8 @@ eu:
|
|
103
103
|
selected_proposals: Aukeratutako proposamenak
|
104
104
|
orders:
|
105
105
|
label: 'Zozketak honen arabera ordenatu:'
|
106
|
-
random:
|
107
|
-
recent:
|
106
|
+
random: Ausaz
|
107
|
+
recent: Berrienak
|
108
108
|
results_count:
|
109
109
|
count:
|
110
110
|
one: Hautatutako proposamena
|
data/config/locales/fi.yml
CHANGED
@@ -37,7 +37,7 @@ fi:
|
|
37
37
|
sortitions:
|
38
38
|
admin:
|
39
39
|
actions:
|
40
|
-
destroy:
|
40
|
+
destroy: Peruuta satunnaisvalinta
|
41
41
|
edit: Muokkaa
|
42
42
|
new_sortition: Uusi satunnaisvalinta
|
43
43
|
show: Satunnaisvalinnan tarkemmat tiedot
|
@@ -55,15 +55,15 @@ fi:
|
|
55
55
|
title: Otsikko
|
56
56
|
sortitions:
|
57
57
|
confirm_destroy:
|
58
|
-
confirm_destroy: Haluatko varmasti
|
59
|
-
destroy:
|
60
|
-
title: Satunnaisvalinnan
|
58
|
+
confirm_destroy: Haluatko varmasti peruuttaa tämän satunnaisvalinnan?
|
59
|
+
destroy: Peruuta satunnaisvalinta
|
60
|
+
title: Satunnaisvalinnan peruuttaminen
|
61
61
|
create:
|
62
62
|
error: Uuden satunnaisvalinnan luonti epäonnistui.
|
63
63
|
success: Satunnaisvalinnan luonti onnistui.
|
64
64
|
destroy:
|
65
|
-
error: Satunnaisvalintaa ei voi
|
66
|
-
success: Satunnaisvalinnan
|
65
|
+
error: Satunnaisvalintaa ei voi peruuttaa.
|
66
|
+
success: Satunnaisvalinnan peruuttaminen onnistui.
|
67
67
|
edit:
|
68
68
|
title: Päivitä satunnaisvalinnan tiedot
|
69
69
|
update: Päivitä
|
@@ -73,7 +73,7 @@ fi:
|
|
73
73
|
index:
|
74
74
|
title: Satunnaisvalinnat
|
75
75
|
new:
|
76
|
-
confirm: Kun painat painiketta, palvelin tallentaa päivämäärän ja kellonajan (sekunnin tarkkuudella) ja näitä tietoja käytetään yhdessä nopanheiton
|
76
|
+
confirm: Kun painat painiketta, palvelin tallentaa päivämäärän ja kellonajan (sekunnin tarkkuudella) ja näitä tietoja käytetään yhdessä nopanheiton kanssa satunnaisen valinnan luomiseen. Toimintoa ei voi peruuttaa. Kun painiketta painetaan, arvonnan tulos julkaistaan tähän lomakkeeseen syötettyjen tietojen kanssa. Tietoja ei voi muuttaa jälkikäteen, joten tarkista sisältö huolellisesti.
|
77
77
|
create: Luo
|
78
78
|
title: Uusi satunnaisvalinta
|
79
79
|
show:
|
@@ -84,7 +84,7 @@ fi:
|
|
84
84
|
admin_log:
|
85
85
|
sortition:
|
86
86
|
create: "%{user_name} loi satunnaisvalinnan %{resource_name} kohtaan %{space_name}"
|
87
|
-
delete: "%{user_name}
|
87
|
+
delete: "%{user_name} peruutti satunnaisvalinnan %{resource_name} kohdassa %{space_name}"
|
88
88
|
update: "%{user_name} päivitti satunnaisvalinnan %{resource_name} kohdassa %{space_name}"
|
89
89
|
sortitions:
|
90
90
|
count:
|
data/config/locales/sv.yml
CHANGED
@@ -3,7 +3,7 @@ sv:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
sortition:
|
6
|
-
additional_info: Information om
|
6
|
+
additional_info: Information om tilldelningen
|
7
7
|
decidim_category_id: Kategorier för de förslag som du vill tillämpa lottningen på
|
8
8
|
decidim_proposals_component_id: Förslagen
|
9
9
|
dice: Tärningskast. Slå en sexsidig tärning inför vittnen, eller använd ett annat sätt att slumpmässigt skapa ett tal från 1 till 6, och skriv in resultatet. Detta bidrar till kvalitén och garanterar resultatets slumpmässighet
|
@@ -11,22 +11,22 @@ sv:
|
|
11
11
|
title: Titel
|
12
12
|
witnesses: Vittnen
|
13
13
|
models:
|
14
|
-
decidim/sortitions/create_sortition_event:
|
14
|
+
decidim/sortitions/create_sortition_event: Tilldelning
|
15
15
|
activerecord:
|
16
16
|
models:
|
17
17
|
decidim/sortitions/sortition:
|
18
|
-
one:
|
19
|
-
other:
|
18
|
+
one: Tilldelning
|
19
|
+
other: Tilldelningar
|
20
20
|
decidim:
|
21
21
|
components:
|
22
22
|
sortitions:
|
23
23
|
actions:
|
24
24
|
comment: Kommentera
|
25
|
-
name:
|
25
|
+
name: Tilldelningar
|
26
26
|
settings:
|
27
27
|
global:
|
28
|
-
comments_enabled:
|
29
|
-
comments_max_length: Maximal
|
28
|
+
comments_enabled: Kommentarer aktiverade
|
29
|
+
comments_max_length: Maximal längd för kommentarer (Lämna 0 för standardvärde)
|
30
30
|
events:
|
31
31
|
sortitions:
|
32
32
|
sortition_created:
|
@@ -39,7 +39,6 @@ sv:
|
|
39
39
|
actions:
|
40
40
|
destroy: Avbryt tilldelningen
|
41
41
|
edit: Redigera
|
42
|
-
new_sortition: Ny lottning
|
43
42
|
show: Detaljer om tilldelningen
|
44
43
|
models:
|
45
44
|
sortition:
|
@@ -60,10 +59,6 @@ sv:
|
|
60
59
|
title: Avbryta tilldelningen
|
61
60
|
create:
|
62
61
|
error: Det gick inte att skapa en ny tilldelning.
|
63
|
-
success: Lottningen har skapats.
|
64
|
-
destroy:
|
65
|
-
error: Det går inte att avbryta lottningen.
|
66
|
-
success: Lottningen har avbrutits.
|
67
62
|
edit:
|
68
63
|
title: Uppdatera informationen om tilldelningen
|
69
64
|
update: Uppdatera
|
@@ -71,16 +66,14 @@ sv:
|
|
71
66
|
all_categories: Alla kategorier
|
72
67
|
select_proposal_component: Välj förslagen som ska behandlas
|
73
68
|
index:
|
74
|
-
title:
|
69
|
+
title: Tilldelningar
|
75
70
|
new:
|
76
|
-
confirm: När du trycker på knappen Nästa registrerar Decidim datum och tid (till och med sekunder) och tillsammans med tärningskastet används denna information för att generera ett slumpmässigt val. Åtgärden är oåterkallelig. När du har tryckt på knappen publiceras resultatet av dragningen tillsammans med de uppgifter som angetts i detta formulär och kan inte ändras. Gå igenom innehållet noggrant.
|
77
71
|
create: Skapa
|
78
72
|
title: Ny tilldelning
|
79
73
|
show:
|
80
74
|
selected_proposals: Förslag som valts för lottning
|
81
75
|
update:
|
82
76
|
error: Det gick inte att uppdatera tilldelningen.
|
83
|
-
success: Lottningen har uppdaterats.
|
84
77
|
admin_log:
|
85
78
|
sortition:
|
86
79
|
create: "%{user_name} skapade tilldelningen %{resource_name} i %{space_name}"
|
@@ -97,8 +90,6 @@ sv:
|
|
97
90
|
cancelled: Avbrutna
|
98
91
|
category: Kategori
|
99
92
|
state: Status
|
100
|
-
index:
|
101
|
-
empty: Det finns inga lottningar än.
|
102
93
|
linked_sortitions:
|
103
94
|
selected_proposals: Utvalda förslag
|
104
95
|
orders:
|
@@ -107,8 +98,8 @@ sv:
|
|
107
98
|
recent: Senaste
|
108
99
|
results_count:
|
109
100
|
count:
|
110
|
-
one:
|
111
|
-
other:
|
101
|
+
one: valt förslaget
|
102
|
+
other: valda förslag
|
112
103
|
show:
|
113
104
|
algorithm: Tilldelningens algoritmkod
|
114
105
|
any_category: från alla kategorier
|
@@ -116,11 +107,11 @@ sv:
|
|
116
107
|
candidate_proposal_ids: Förslagens ordning och ID i tilldelningen
|
117
108
|
candidate_proposals_info: 'Tilldelningen gjordes bland följande förslag (%{category_label}), med följande ID (de utvalda förslagen i fetstil) '
|
118
109
|
category: från kategorin %{category}
|
119
|
-
dice_result:
|
110
|
+
dice_result: (1) Tärningskast
|
120
111
|
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. '
|
121
|
-
mathematical_result: Resultat (
|
112
|
+
mathematical_result: Resultat (1) x (2)
|
122
113
|
proposals_selected_by_sortition: Förslag valda genom tilldelning
|
123
|
-
sortition_reproducibility_details: Detaljer för
|
114
|
+
sortition_reproducibility_details: Detaljer för tilldelningens reproducerbarhet
|
124
115
|
time_seed: (2) Tidsfrö
|
125
116
|
witnesses: Vittnen
|
126
117
|
sortition:
|
@@ -137,4 +128,4 @@ sv:
|
|
137
128
|
one: 1 tilldelning
|
138
129
|
other: "%{count} tilldelningar"
|
139
130
|
statistics:
|
140
|
-
sortitions_count:
|
131
|
+
sortitions_count: Lottdragningar
|
data/decidim-sortitions.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.version = Decidim::Sortitions.version
|
9
9
|
s.authors = ["Juan Salvador Perez Garcia"]
|
10
10
|
s.email = ["jsperezg@gmail.com"]
|
11
|
-
s.license = "AGPL-3.0
|
11
|
+
s.license = "AGPL-3.0"
|
12
12
|
s.homepage = "https://decidim.org"
|
13
13
|
s.metadata = {
|
14
14
|
"bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
|
@@ -17,11 +17,11 @@ Gem::Specification.new do |s|
|
|
17
17
|
"homepage_uri" => "https://decidim.org",
|
18
18
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
19
19
|
}
|
20
|
-
s.required_ruby_version = "~> 3.
|
20
|
+
s.required_ruby_version = "~> 3.2.0"
|
21
21
|
|
22
22
|
s.name = "decidim-sortitions"
|
23
23
|
s.summary = "Decidim sortitions module"
|
24
|
-
s.description = "This module makes possible to select
|
24
|
+
s.description = "This module makes possible to select amount a set of proposal by sortition"
|
25
25
|
|
26
26
|
s.files = Dir.chdir(__dir__) do
|
27
27
|
`git ls-files -z`.split("\x0").select do |f|
|
@@ -35,7 +35,5 @@ Gem::Specification.new do |s|
|
|
35
35
|
s.add_dependency "decidim-core", Decidim::Sortitions.version
|
36
36
|
s.add_dependency "decidim-proposals", Decidim::Sortitions.version
|
37
37
|
|
38
|
-
s.add_development_dependency "decidim-assemblies", Decidim::Sortitions.version
|
39
38
|
s.add_development_dependency "decidim-dev", Decidim::Sortitions.version
|
40
|
-
s.add_development_dependency "decidim-participatory_processes", Decidim::Sortitions.version
|
41
39
|
end
|
@@ -24,12 +24,6 @@ module Decidim
|
|
24
24
|
field :cancelled_on, Decidim::Core::DateType, "When this sortition was cancelled", null: true
|
25
25
|
field :cancelled_by_user, Decidim::Core::UserType, "Who cancelled this sortition", null: true
|
26
26
|
field :candidate_proposals, [GraphQL::Types::Int, { null: true }], "The candidate proposal for this sortition", null: true
|
27
|
-
|
28
|
-
def self.authorized?(object, context)
|
29
|
-
context[:sortition] = object
|
30
|
-
|
31
|
-
super
|
32
|
-
end
|
33
27
|
end
|
34
28
|
end
|
35
29
|
end
|
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Sortitions
|
5
|
-
class SortitionsType < Decidim::
|
5
|
+
class SortitionsType < Decidim::Api::Types::BaseObject
|
6
|
+
implements Decidim::Core::ComponentInterface
|
7
|
+
|
6
8
|
graphql_name "Sortitions"
|
7
9
|
description "A sortition component of a participatory space."
|
8
10
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Sortitions
|
5
|
-
# This is the engine that runs on the administration interface of `
|
5
|
+
# This is the engine that runs on the administration interface of `decidim_sortitions`.
|
6
6
|
# It mostly handles rendering the created projects associated to a participatory
|
7
7
|
# process.
|
8
8
|
class AdminEngine < ::Rails::Engine
|
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.
|
4
|
+
version: 0.29.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:
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,99 +16,71 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.29.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.
|
26
|
+
version: 0.29.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.
|
33
|
+
version: 0.29.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.
|
40
|
+
version: 0.29.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.
|
47
|
+
version: 0.29.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.
|
54
|
+
version: 0.29.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.
|
61
|
+
version: 0.29.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.
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: decidim-assemblies
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.28.6
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.28.6
|
68
|
+
version: 0.29.0.rc1
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: decidim-dev
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - '='
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - '='
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.28.6
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: decidim-participatory_processes
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 0.28.6
|
75
|
+
version: 0.29.0.rc1
|
104
76
|
type: :development
|
105
77
|
prerelease: false
|
106
78
|
version_requirements: !ruby/object:Gem::Requirement
|
107
79
|
requirements:
|
108
80
|
- - '='
|
109
81
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
111
|
-
description: This module makes possible to select
|
82
|
+
version: 0.29.0.rc1
|
83
|
+
description: This module makes possible to select amount a set of proposal by sortition
|
112
84
|
email:
|
113
85
|
- jsperezg@gmail.com
|
114
86
|
executables: []
|
@@ -155,7 +127,6 @@ files:
|
|
155
127
|
- app/views/decidim/sortitions/sortitions/_count.html.erb
|
156
128
|
- app/views/decidim/sortitions/sortitions/_linked_sortitions.html.erb
|
157
129
|
- app/views/decidim/sortitions/sortitions/_proposal.html.erb
|
158
|
-
- app/views/decidim/sortitions/sortitions/_proposal_badge.html.erb
|
159
130
|
- app/views/decidim/sortitions/sortitions/_results_count.html.erb
|
160
131
|
- app/views/decidim/sortitions/sortitions/_sortition.html.erb
|
161
132
|
- app/views/decidim/sortitions/sortitions/_sortition_author.html.erb
|
@@ -171,9 +142,6 @@ files:
|
|
171
142
|
- config/locales/ar.yml
|
172
143
|
- config/locales/bg-BG.yml
|
173
144
|
- config/locales/bg.yml
|
174
|
-
- config/locales/bn-BD.yml
|
175
|
-
- config/locales/bs-BA.yml
|
176
|
-
- config/locales/ca-IT.yml
|
177
145
|
- config/locales/ca.yml
|
178
146
|
- config/locales/cs-CZ.yml
|
179
147
|
- config/locales/cs.yml
|
@@ -280,7 +248,7 @@ files:
|
|
280
248
|
- lib/tasks/decidim/.keep
|
281
249
|
homepage: https://decidim.org
|
282
250
|
licenses:
|
283
|
-
- AGPL-3.0
|
251
|
+
- AGPL-3.0
|
284
252
|
metadata:
|
285
253
|
bug_tracker_uri: https://github.com/decidim/decidim/issues
|
286
254
|
documentation_uri: https://docs.decidim.org/
|
@@ -295,14 +263,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
295
263
|
requirements:
|
296
264
|
- - "~>"
|
297
265
|
- !ruby/object:Gem::Version
|
298
|
-
version: 3.
|
266
|
+
version: 3.2.0
|
299
267
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
268
|
requirements:
|
301
|
-
- - "
|
269
|
+
- - ">"
|
302
270
|
- !ruby/object:Gem::Version
|
303
|
-
version:
|
271
|
+
version: 1.3.1
|
304
272
|
requirements: []
|
305
|
-
rubygems_version: 3.
|
273
|
+
rubygems_version: 3.4.10
|
306
274
|
signing_key:
|
307
275
|
specification_version: 4
|
308
276
|
summary: Decidim sortitions module
|
data/config/locales/bn-BD.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
bn:
|
data/config/locales/bs-BA.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
bs:
|
data/config/locales/ca-IT.yml
DELETED
@@ -1,140 +0,0 @@
|
|
1
|
-
---
|
2
|
-
ca-IT:
|
3
|
-
activemodel:
|
4
|
-
attributes:
|
5
|
-
sortition:
|
6
|
-
additional_info: Informació del sorteig
|
7
|
-
decidim_category_id: Categories del conjunt de propostes en què vols aplicar el sorteig
|
8
|
-
decidim_proposals_component_id: Propostes establertes
|
9
|
-
dice: Resultat de la tirada de daus. Tira un dau de sis cares o busca alguna altra manera de generar un número de l'u al sis i introdueix-lo aquí davant d'algunes testimonies. Això contribueix en la qualitat i garantia de l'aletorietat del resultat
|
10
|
-
target_items: Nombre de propostes a seleccionar (indica el nombre de propostes que vols seleccionar mitjançant el sorteig del grup de propostes que hàgiu triat prèviament)
|
11
|
-
title: Títol
|
12
|
-
witnesses: Testimonis
|
13
|
-
models:
|
14
|
-
decidim/sortitions/create_sortition_event: Sorteig
|
15
|
-
activerecord:
|
16
|
-
models:
|
17
|
-
decidim/sortitions/sortition:
|
18
|
-
one: Sorteig
|
19
|
-
other: Sortejos
|
20
|
-
decidim:
|
21
|
-
components:
|
22
|
-
sortitions:
|
23
|
-
actions:
|
24
|
-
comment: Comentar
|
25
|
-
name: Sortejos
|
26
|
-
settings:
|
27
|
-
global:
|
28
|
-
comments_enabled: Comentaris habilitats
|
29
|
-
comments_max_length: Longitud màxima dels comentaris (deixa 0 si vols mantenir la configuració per defecte)
|
30
|
-
events:
|
31
|
-
sortitions:
|
32
|
-
sortition_created:
|
33
|
-
email_intro: El sorteig "%{resource_title}" s'ha afegit a "%{participatory_space_title}" que segueixes.
|
34
|
-
email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior.
|
35
|
-
email_subject: Nou sorteig afegit a %{participatory_space_title}
|
36
|
-
notification_title: El sorteig <a href="%{resource_path}">%{resource_title}</a> s'ha afegit a %{participatory_space_title}
|
37
|
-
sortitions:
|
38
|
-
admin:
|
39
|
-
actions:
|
40
|
-
destroy: Cancel·la el sorteig
|
41
|
-
edit: Edita
|
42
|
-
new_sortition: Afegir sorteig
|
43
|
-
show: Detalls del sorteig
|
44
|
-
models:
|
45
|
-
sortition:
|
46
|
-
fields:
|
47
|
-
category: Categoria
|
48
|
-
created_at: Data de creació
|
49
|
-
decidim_proposals_component: Component de Propostes
|
50
|
-
dice: Dau
|
51
|
-
reference: Referència
|
52
|
-
request_timestamp: Temps de dibuixar
|
53
|
-
seed: Llavor
|
54
|
-
target_items: Elements a seleccionar
|
55
|
-
title: Títol
|
56
|
-
sortitions:
|
57
|
-
confirm_destroy:
|
58
|
-
confirm_destroy: Segur que vols cancel·lar aquest sorteig?
|
59
|
-
destroy: Cancel·lar el sorteig
|
60
|
-
title: Cancel·lació del sorteig
|
61
|
-
create:
|
62
|
-
error: S'ha produït un error en crear un nou sorteig.
|
63
|
-
success: El sorteig s'ha creat correctament.
|
64
|
-
destroy:
|
65
|
-
error: No es pot cancel·lar el sorteig.
|
66
|
-
success: El sorteig s'ha cancel·lat correctament.
|
67
|
-
edit:
|
68
|
-
title: Actualitza la informació sobre el sorteig
|
69
|
-
update: Actualitzar
|
70
|
-
form:
|
71
|
-
all_categories: Totes les categories
|
72
|
-
select_proposal_component: Selecciona el grup de propostes
|
73
|
-
index:
|
74
|
-
title: Sortejos
|
75
|
-
new:
|
76
|
-
confirm: Pressionant el següent botó, la plataforma registrarà la data i l'hora (amb precisió de segons) i, juntament amb la tirada de daus, aquesta informació s'utilitzarà per generar una selecció aleatòria. L'acció serà irreversible, una vegada que es faci clic al botó, es publicarà el resultat d'aquest sorteig, juntament amb les dades introduïdes en aquest formulari i que no es poden modificar. Si us plau, comprova el contingut acuradament.
|
77
|
-
create: Crear
|
78
|
-
title: Nou sorteig
|
79
|
-
show:
|
80
|
-
selected_proposals: Propostes seleccionades per al sorteig
|
81
|
-
update:
|
82
|
-
error: S'ha produït un error en actualitzar el sorteig.
|
83
|
-
success: El sorteig s'ha actualitzat correctament.
|
84
|
-
admin_log:
|
85
|
-
sortition:
|
86
|
-
create: "%{user_name} ha creat el sorteig %{resource_name} a %{space_name}"
|
87
|
-
delete: "%{user_name} ha cancel·lat el sorteig %{resource_name} a %{space_name}"
|
88
|
-
update: "%{user_name} ha actualitzat el sorteig %{resource_name} a %{space_name}"
|
89
|
-
sortitions:
|
90
|
-
count:
|
91
|
-
proposals_count:
|
92
|
-
one: 1 proposta
|
93
|
-
other: "%{count} propostes"
|
94
|
-
filters:
|
95
|
-
active: Actius
|
96
|
-
all: Tots
|
97
|
-
cancelled: Cancel·lat
|
98
|
-
category: Categoria
|
99
|
-
state: Estat
|
100
|
-
index:
|
101
|
-
empty: Encara no hi ha cap sorteig.
|
102
|
-
linked_sortitions:
|
103
|
-
selected_proposals: Propostes seleccionades
|
104
|
-
orders:
|
105
|
-
label: 'Ordena els sortejos per:'
|
106
|
-
random: Aleatori
|
107
|
-
recent: Recent
|
108
|
-
results_count:
|
109
|
-
count:
|
110
|
-
one: proposta seleccionada
|
111
|
-
other: propostes seleccionades
|
112
|
-
show:
|
113
|
-
algorithm: Codi d'algoritme del sorteig
|
114
|
-
any_category: de totes les categories
|
115
|
-
cancelled: Sorteig cancel·lat
|
116
|
-
candidate_proposal_ids: Ordre i IDs de les propostes del sorteig
|
117
|
-
candidate_proposals_info: 'La resolució es va dur a terme entre les següents propostes (%{category_label}), amb les següents IDs (en negreta, les propostes seleccionades) '
|
118
|
-
category: de la categoria %{category}
|
119
|
-
dice_result: (1) Resultat de la tirada de daus
|
120
|
-
introduction: 'Aquesta pàgina conté els resultats del sorteig %{reference}. Mitjançant aquest sorteig, %{target_items} nombre de resultats han estat seleccionats aleatòriament i amb una distribució de probabilitat igual al conjunt de propostes que es mostra a continuació. Juntament amb els resultats, la informació que es mostra en aquesta pàgina proporciona tota la informació necessària per maximitzar les garanties i reproduir els resultats. La clau per a la qualitat d''aquest sorteig és l''aleatorietat doble proporcionada per una tirada d''un dau (verificat pels testimonis) i el temps precís de l''assentament que proporciona entrada per a un algorisme que genera una selecció aleatòria. El llindar de temps per a l''assaig és tan precís (segons) que és impossible de controlar pels humans, oferint així una doble entrada "incontrolable" per garantir un resultat just. '
|
121
|
-
mathematical_result: Resultat (1) x (2)
|
122
|
-
proposals_selected_by_sortition: Propostes seleccionades pel sorteig
|
123
|
-
sortition_reproducibility_details: Detalls de la reproductibilitat del sorteig
|
124
|
-
time_seed: (2) Llavor de temps
|
125
|
-
witnesses: Testimonis
|
126
|
-
sortition:
|
127
|
-
random_seed: Llavor aleatòria
|
128
|
-
selected_proposals:
|
129
|
-
one: proposta seleccionada
|
130
|
-
other: propostes seleccionades
|
131
|
-
sortition_author:
|
132
|
-
deleted: Participant eliminada
|
133
|
-
sortition_cancel_author:
|
134
|
-
deleted: Participant eliminada
|
135
|
-
sortitions_count:
|
136
|
-
count:
|
137
|
-
one: 1 sorteig
|
138
|
-
other: "%{count} classificacions"
|
139
|
-
statistics:
|
140
|
-
sortitions_count: Sortejos
|