decidim-sortitions 0.23.0 → 0.24.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/models/decidim/sortitions/sortition.rb +0 -2
- data/app/presenters/decidim/sortitions/admin_log/sortition_presenter.rb +2 -2
- data/app/queries/decidim/sortitions/admin/participatory_space_proposals.rb +1 -1
- data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +5 -1
- data/app/views/decidim/sortitions/sortitions/show.html.erb +6 -4
- data/config/locales/cs.yml +4 -4
- data/config/locales/de.yml +5 -5
- data/config/locales/gl.yml +2 -0
- data/config/locales/pl.yml +1 -1
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/tr-TR.yml +41 -39
- data/lib/decidim/api/sortition_type.rb +29 -0
- data/lib/decidim/api/sortitions_type.rb +26 -0
- data/lib/decidim/sortitions.rb +1 -0
- data/lib/decidim/sortitions/api.rb +8 -0
- data/lib/decidim/sortitions/test/factories.rb +2 -2
- data/lib/decidim/sortitions/version.rb +1 -1
- metadata +24 -21
- data/app/types/decidim/sortitions/sortition_type.rb +0 -32
- data/app/types/decidim/sortitions/sortitions_type.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '095adb49e1dfae6f8e713f3769d97c4118f7ccadc98c420bb2d4571daa74c133'
|
4
|
+
data.tar.gz: c09f5f0eeb89f08e43f7812b2528d1363e8ba853eeb124fc32730d78b8b67fbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69da4c44caeb9c76ffdfcd74cd4ca77e3b231c818a7e2b4f06ec03e0844730f43878aefe175fb465eb2e233cdebcd3b013b54c61947b70162192a46718523b8a
|
7
|
+
data.tar.gz: c6371b962f6395ee9aeca3368a5d6ad0f02a1307b0e4787a3e02e382ffb502edd39b3d1d9b075c59088f95dd5b263ce931ecd77e9738471bbba3e9f933d60ba3
|
@@ -20,11 +20,9 @@ module Decidim
|
|
20
20
|
translatable_fields :title, :witnesses, :additional_info, :cancel_reason
|
21
21
|
|
22
22
|
belongs_to :decidim_proposals_component,
|
23
|
-
foreign_key: "decidim_proposals_component_id",
|
24
23
|
class_name: "Decidim::Component"
|
25
24
|
|
26
25
|
belongs_to :cancelled_by_user,
|
27
|
-
foreign_key: "cancelled_by_user_id",
|
28
26
|
class_name: "Decidim::User",
|
29
27
|
optional: true
|
30
28
|
|
@@ -42,7 +42,7 @@ module Decidim
|
|
42
42
|
.not_hidden
|
43
43
|
.where(component: sortition.decidim_proposals_component)
|
44
44
|
.where("decidim_proposals_proposals.created_at < ?", request_timestamp)
|
45
|
-
.where(
|
45
|
+
.where(decidim_categorizations: { decidim_category_id: category.id })
|
46
46
|
.order(id: :asc)
|
47
47
|
end
|
48
48
|
|
@@ -38,13 +38,17 @@
|
|
38
38
|
edit_sortition_path(sortition),
|
39
39
|
t("actions.edit", scope: "decidim.sortitions.admin"),
|
40
40
|
class: "action-icon--edit" %>
|
41
|
-
|
41
|
+
<% else %>
|
42
|
+
<span class="action-space icon"></span>
|
43
|
+
<% end %>
|
42
44
|
|
43
45
|
<% if allowed_to? :destroy, :sortition, sortition: sortition %>
|
44
46
|
<%= icon_link_to "circle-x",
|
45
47
|
confirm_destroy_sortition_path(sortition),
|
46
48
|
t("actions.destroy", scope: "decidim.sortitions.admin"),
|
47
49
|
class: "action-icon--remove" %>
|
50
|
+
<% else %>
|
51
|
+
<span class="action-space icon"></span>
|
48
52
|
<% end %>
|
49
53
|
</td>
|
50
54
|
</tr>
|
@@ -12,10 +12,12 @@
|
|
12
12
|
|
13
13
|
<div class="row column view-header">
|
14
14
|
|
15
|
-
|
16
|
-
<%=
|
17
|
-
|
18
|
-
|
15
|
+
<div class="m-bottom">
|
16
|
+
<%= link_to :sortitions, class: "small hollow" do %>
|
17
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
18
|
+
<%= t(".back") %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
19
21
|
|
20
22
|
<h2 class="heading2"><%= decidim_html_escape(translated_attribute(sortition.title)) %></h2>
|
21
23
|
<div class="author-data">
|
data/config/locales/cs.yml
CHANGED
@@ -2,10 +2,10 @@ cs:
|
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
4
|
sortition:
|
5
|
-
additional_info: Informace o
|
5
|
+
additional_info: Informace o volbě losem
|
6
6
|
decidim_category_id: Kategorie sady návrhů, ve kterých chcete použít remízu
|
7
7
|
decidim_proposals_component_id: Návrhy jsou nastaveny
|
8
|
-
dice: Výsledek
|
8
|
+
dice: Výsledek hodu kostkou. Hoďte šestistrannou kostkou nebo najděte jiný náhodný způsob, jak získat číslo od 1 do 6, a výsledné číslo sem před svědky vložte. To přispěje ke kvalitě a zaručí nahodilost výsledku
|
9
9
|
target_items: Počet návrhů, které mají být vybrány (udává počet návrhů, které chcete vybrat, čerpáním ze skupiny návrhů, které jste předtím vybrali)
|
10
10
|
title: Titul
|
11
11
|
witnesses: Svědkové
|
@@ -76,7 +76,7 @@ cs:
|
|
76
76
|
error: Nelze zrušit losování.
|
77
77
|
success: Losování bylo úspěšně zrušeno
|
78
78
|
edit:
|
79
|
-
title: Aktualizovat informace o
|
79
|
+
title: Aktualizovat informace o volbě losem
|
80
80
|
update: Aktualizace
|
81
81
|
form:
|
82
82
|
all_categories: Všechny kategorie
|
@@ -122,7 +122,7 @@ cs:
|
|
122
122
|
selected_proposals: Vybrané návrhy
|
123
123
|
orders:
|
124
124
|
label: 'Řazení losování podle:'
|
125
|
-
random:
|
125
|
+
random: Náhodně
|
126
126
|
recent: Nedávné
|
127
127
|
results_count:
|
128
128
|
count:
|
data/config/locales/de.yml
CHANGED
@@ -27,10 +27,10 @@ de:
|
|
27
27
|
events:
|
28
28
|
sortitions:
|
29
29
|
sortition_created:
|
30
|
-
email_intro: Die
|
31
|
-
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie "%{participatory_space_title}" folgen. Sie
|
30
|
+
email_intro: Die Auslosung "%{resource_title}" wurde zu "%{participatory_space_title}" hinzugefügt, dem Sie folgen.
|
31
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie "%{participatory_space_title}" folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link.
|
32
32
|
email_subject: Neue Sortierung wurde zu %{participatory_space_title}hinzugefügt
|
33
|
-
notification_title: Die
|
33
|
+
notification_title: Die Auslosung <a href="%{resource_path}">%{resource_title}</a> wurde zu %{participatory_space_title} hinzugefügt
|
34
34
|
pages:
|
35
35
|
home:
|
36
36
|
statistics:
|
@@ -117,7 +117,7 @@ de:
|
|
117
117
|
orders:
|
118
118
|
label: 'Sortieren nach:'
|
119
119
|
random: Zufällig
|
120
|
-
recent: Kürzlich
|
120
|
+
recent: Kürzlich hinzugefügt
|
121
121
|
results_count:
|
122
122
|
count:
|
123
123
|
one: ausgewählter Vorschlag
|
@@ -142,7 +142,7 @@ de:
|
|
142
142
|
selected_proposals:
|
143
143
|
one: Vorschlag ausgewählt
|
144
144
|
other: Vorschläge ausgewählt
|
145
|
-
view:
|
145
|
+
view: Anzeigen
|
146
146
|
sortition_author:
|
147
147
|
deleted: Gelöschter Benutzer
|
148
148
|
sortition_cancel_author:
|
data/config/locales/gl.yml
CHANGED
@@ -23,6 +23,7 @@ gl:
|
|
23
23
|
settings:
|
24
24
|
global:
|
25
25
|
comments_enabled: Comentarios habilitados
|
26
|
+
comments_max_length: Lonxitude máxima dos comentarios (0 para valor predefinido)
|
26
27
|
events:
|
27
28
|
sortitions:
|
28
29
|
sortition_created:
|
@@ -124,6 +125,7 @@ gl:
|
|
124
125
|
show:
|
125
126
|
algorithm: Codigo de algoritmo de Sortition
|
126
127
|
any_category: de todas as categorías
|
128
|
+
back: Volver á listaxe
|
127
129
|
cancelled: Cancelada sortition
|
128
130
|
candidate_proposal_ids: Orde de propostas de clasificación e ID
|
129
131
|
candidate_proposals_info: 'O sortition levouse a cabo entre as seguintes propostas (%{category_label}), coas seguintes ID (en negra as propostas seleccionadas) '
|
data/config/locales/pl.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
si:
|
@@ -0,0 +1 @@
|
|
1
|
+
sw:
|
data/config/locales/tr-TR.yml
CHANGED
@@ -3,40 +3,41 @@ tr:
|
|
3
3
|
attributes:
|
4
4
|
sortition:
|
5
5
|
additional_info: Sıralama bilgileri
|
6
|
-
decidim_category_id:
|
7
|
-
decidim_proposals_component_id:
|
8
|
-
dice: Kalıp rulosunun sonucu. 6
|
6
|
+
decidim_category_id: Çekilişi uygulamak istediğiniz teklif kümesinin kategorileri
|
7
|
+
decidim_proposals_component_id: Teklif seti
|
8
|
+
dice: Kalıp rulosunun sonucu. 6 kenarlı bir zarı yuvarlayın veya 1'den 6'ya kadar bir sayı oluşturmak için başka bir rastgele yol arayın ve sonuçta elde edilen sayıyı bazı tanıkların önüne girin. Bu, sonucun rasgeleliğinin kalitesine ve garantilerine katkıda bulunur
|
9
9
|
target_items: Seçilecek teklif sayısı (daha önce seçmiş olduğunuz teklif grubunun çoğunu çizerek, seçmek istediğiniz teklif sayısını gösterir)
|
10
10
|
title: Başlık
|
11
11
|
witnesses: Tanıklar
|
12
12
|
models:
|
13
|
-
decidim/sortitions/create_sortition_event:
|
13
|
+
decidim/sortitions/create_sortition_event: Sıralama
|
14
14
|
activerecord:
|
15
15
|
models:
|
16
16
|
decidim/sortitions/sortition:
|
17
|
-
one:
|
18
|
-
other:
|
17
|
+
one: Sıralama
|
18
|
+
other: Sıralama
|
19
19
|
decidim:
|
20
20
|
components:
|
21
21
|
sortitions:
|
22
|
-
name:
|
22
|
+
name: Sıralama
|
23
23
|
settings:
|
24
24
|
global:
|
25
25
|
comments_enabled: Yorumlar etkin
|
26
|
+
comments_max_length: Maksimum yorum uzunluğu (Varsayılan değer için 0 bırakın)
|
26
27
|
events:
|
27
28
|
sortitions:
|
28
29
|
sortition_created:
|
29
|
-
email_intro:
|
30
|
-
email_outro: Bu bildirimi
|
31
|
-
email_subject:
|
32
|
-
notification_title: <a href="%{resource_path}">%{resource_title}</a> %{participatory_space_title}eklendi
|
30
|
+
email_intro: '"%{resource_title}" sıralaması takip ettiğiniz "%{participatory_space_title}" listesine eklendi.'
|
31
|
+
email_outro: Bu bildirimi, "%{participatory_space_title}" adlı kişiyi takip ettiğiniz için aldınız. Önceki bağlantıdan takibini bırakabilirsiniz.
|
32
|
+
email_subject: '%{participatory_space_title} alanına yeni sıralama eklendi'
|
33
|
+
notification_title: <a href="%{resource_path}">%{resource_title} </a> sıralaması %{participatory_space_title} alanına eklendi
|
33
34
|
pages:
|
34
35
|
home:
|
35
36
|
statistics:
|
36
|
-
sortitions_count:
|
37
|
+
sortitions_count: Sıralama
|
37
38
|
participatory_processes:
|
38
39
|
statistics:
|
39
|
-
sortitions_count:
|
40
|
+
sortitions_count: Sıralama
|
40
41
|
sortitions:
|
41
42
|
admin:
|
42
43
|
actions:
|
@@ -52,13 +53,13 @@ tr:
|
|
52
53
|
decidim_proposals_component: Teklifler bileşeni
|
53
54
|
dice: Zar
|
54
55
|
reference: Referans
|
55
|
-
request_timestamp:
|
56
|
-
seed:
|
56
|
+
request_timestamp: Beraberlik süresi
|
57
|
+
seed: Çekirdek
|
57
58
|
target_items: Seçilecek öğeler
|
58
59
|
title: Başlık
|
59
60
|
name:
|
60
|
-
one:
|
61
|
-
other:
|
61
|
+
one: Sıralama
|
62
|
+
other: Sıralama
|
62
63
|
sortitions:
|
63
64
|
confirm_destroy:
|
64
65
|
confirm_destroy: Bu sıralamayı iptal etmek istediğinize emin misiniz?
|
@@ -72,27 +73,27 @@ tr:
|
|
72
73
|
success: Sıralama başarıyla iptal edildi
|
73
74
|
edit:
|
74
75
|
title: Sıralama hakkındaki bilgileri güncelleyin
|
75
|
-
update:
|
76
|
+
update: Güncelle
|
76
77
|
form:
|
77
78
|
all_categories: Tüm Kategoriler
|
78
|
-
select_proposal_component:
|
79
|
+
select_proposal_component: Teklif kümesini seçin
|
79
80
|
title: Teklifler için yeni sıralama
|
80
81
|
index:
|
81
|
-
title:
|
82
|
+
title: Sıralama
|
82
83
|
new:
|
83
84
|
confirm: Bir sonraki düğmeye basıldığında Decidim, tarih ve saati (saniyenin kesinliği ile) kaydedecek ve zar rulosuyla birlikte, bu bilgi rastgele bir seçim oluşturmak için kullanılacak. İşlem geri alınamaz, düğme tıklandıktan sonra bu çekilişin sonucu yayınlanacak, bu forma girilen verilerle birlikte değiştirilemez, lütfen içeriği dikkatlice kontrol edin
|
84
|
-
create:
|
85
|
+
create: Oluştur
|
85
86
|
title: Yeni sıralama
|
86
87
|
show:
|
87
|
-
selected_proposals:
|
88
|
+
selected_proposals: Çekiliş için seçilen teklifler
|
88
89
|
update:
|
89
90
|
error: Sıralama güncellenirken bir sorun oluştu.
|
90
91
|
success: Sıralama başarıyla güncellendi
|
91
92
|
admin_log:
|
92
93
|
sortition:
|
93
|
-
create: "%{user_name}
|
94
|
-
delete: "%{user_name}
|
95
|
-
update: "%{user_name}
|
94
|
+
create: "%{user_name}, %{space_name} %{resource_name} sıralamayı yarattı"
|
95
|
+
delete: "%{user_name}, %{space_name} %{resource_name} sıralamayı iptal etti"
|
96
|
+
update: "%{user_name}, %{space_name} içindeki %{resource_name} sıralamasını güncelledi"
|
96
97
|
sortitions:
|
97
98
|
count:
|
98
99
|
proposals_count:
|
@@ -100,23 +101,23 @@ tr:
|
|
100
101
|
other: "%{count} teklif"
|
101
102
|
filters:
|
102
103
|
active: Aktif
|
103
|
-
all:
|
104
|
+
all: Tümü
|
104
105
|
cancelled: İptal edildi
|
105
106
|
category: Kategori
|
106
|
-
category_prompt:
|
107
|
+
category_prompt: Bir kategori seç
|
107
108
|
search: Arama
|
108
|
-
state:
|
109
|
+
state: Statü
|
109
110
|
filters_small_view:
|
110
|
-
close_modal:
|
111
|
-
filter:
|
112
|
-
filter_by:
|
113
|
-
unfold:
|
111
|
+
close_modal: Pencereyi kapat
|
112
|
+
filter: Filtrele
|
113
|
+
filter_by: Şuna göre filtrele
|
114
|
+
unfold: Aç
|
114
115
|
linked_sortitions:
|
115
116
|
selected_proposals: Seçili teklifler
|
116
117
|
orders:
|
117
|
-
label: 'Sıralama
|
118
|
-
random:
|
119
|
-
recent:
|
118
|
+
label: 'Sıralama ölçütü:'
|
119
|
+
random: Rastgele
|
120
|
+
recent: En son
|
120
121
|
results_count:
|
121
122
|
count:
|
122
123
|
one: seçilen teklif
|
@@ -124,15 +125,16 @@ tr:
|
|
124
125
|
show:
|
125
126
|
algorithm: Sıralamanın algoritma kodu
|
126
127
|
any_category: tüm kategorilerden
|
128
|
+
back: Listeye geri dön
|
127
129
|
cancelled: İptal edilen sıralama
|
128
|
-
candidate_proposal_ids: Sıralama
|
129
|
-
candidate_proposals_info: 'Sıralama, aşağıdaki teklifler arasında (%{category_label}), aşağıdaki kimliklerle (seçilen
|
130
|
+
candidate_proposal_ids: Sıralama tekliflerinin sırası ve ID'si
|
131
|
+
candidate_proposals_info: 'Sıralama, aşağıdaki teklifler arasında (%{category_label}), aşağıdaki kimliklerle gerçekleştirildi (seçilen teklifler kalın olarak) '
|
130
132
|
category: '%{category} kategoriden'
|
131
133
|
dice_result: "(1) Zar sonucu"
|
132
|
-
introduction: 'Bu sayfa, %{reference}sıralamasının sonuçlarını içerir. Bu sıralama
|
134
|
+
introduction: 'Bu sayfa, %{reference} sıralamasının sonuçlarını içerir. Bu sıralama sayesinde, %{target_items} sonuç sayısı rasgele ve aşağıda gösterilen teklif kümesinden eşit olasılık dağılımıyla seçilmiştir. Sonuçlarla birlikte, bu sayfada görüntülenen bilgiler, garantileri en üst düzeye çıkarmak ve sonuçları yeniden üretmek için gereken tüm bilgileri sağlar. Bu sınıflandırmanın kalitesinin anahtarı, bir zarın yuvarlanmasıyla sağlanan (tanıklar tarafından doğrulanan) çift rastlantısallık ve rasgele bir seçim oluşturan bir algoritma için girdi sağlayan sıralamanın kesin zamanıdır. Ayırma için zaman-tohum o kadar doğrudur (saniye) ki, insanlar tarafından kontrol edilmesi imkansızdır, böylece adil bir sonucu garantilemek için çift "kontrol edilemez" bir girdi sağlar. '
|
133
135
|
mathematical_result: Sonuç (1) x (2)
|
134
136
|
proposals_selected_by_sortition: Sıralamaya göre seçilen teklifler
|
135
|
-
sortition_reproducibility_details: Sıralama
|
137
|
+
sortition_reproducibility_details: Sıralama yeniden üretilebilirlik ayrıntıları
|
136
138
|
time_seed: "(2) Zaman tohumu"
|
137
139
|
witnesses: Tanıklar
|
138
140
|
sortition:
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Sortitions
|
5
|
+
class SortitionType < Decidim::Api::Types::BaseObject
|
6
|
+
implements Decidim::Core::AuthorableInterface
|
7
|
+
implements Decidim::Comments::CommentableInterface
|
8
|
+
implements Decidim::Core::CategorizableInterface
|
9
|
+
|
10
|
+
description "A sortition"
|
11
|
+
|
12
|
+
field :id, GraphQL::Types::ID, "The internal ID for this sortition", null: false
|
13
|
+
field :dice, GraphQL::Types::Int, "The dice for this sortition", null: true
|
14
|
+
field :target_items, GraphQL::Types::Int, "The target items for this sortition", null: true
|
15
|
+
field :request_timestamp, Decidim::Core::DateType, "The request time stamp for this request", null: true
|
16
|
+
field :selected_proposals, [GraphQL::Types::Int, { null: true }], "The selected proposals for this sortition", null: true
|
17
|
+
field :created_at, Decidim::Core::DateTimeType, "When this sortition was created", null: true
|
18
|
+
field :updated_at, Decidim::Core::DateTimeType, "When this sortition was updated", null: true
|
19
|
+
field :witnesses, Decidim::Core::TranslatedFieldType, "The witnesses for this sortition", null: true
|
20
|
+
field :additional_info, Decidim::Core::TranslatedFieldType, "The additional info for this sortition", null: true
|
21
|
+
field :reference, GraphQL::Types::String, "The reference for this sortition", null: true
|
22
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this sortition", null: true
|
23
|
+
field :cancel_reason, Decidim::Core::TranslatedFieldType, "The cancel reason for this sortition", null: true
|
24
|
+
field :cancelled_on, Decidim::Core::DateType, "When this sortition was cancelled", null: true
|
25
|
+
field :cancelled_by_user, Decidim::Core::UserType, "Who cancelled this sortition", null: true
|
26
|
+
field :candidate_proposals, [GraphQL::Types::Int, { null: true }], "The candidate proposal for this sortition", null: true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Sortitions
|
5
|
+
class SortitionsType < Decidim::Api::Types::BaseObject
|
6
|
+
implements Decidim::Core::ComponentInterface
|
7
|
+
|
8
|
+
graphql_name "Sortitions"
|
9
|
+
description "A sortition component of a participatory space."
|
10
|
+
|
11
|
+
field :sortitions, Decidim::Sortitions::SortitionType.connection_type, null: true, connection: true
|
12
|
+
|
13
|
+
def sortitions
|
14
|
+
Sortition.where(component: object).includes(:component)
|
15
|
+
end
|
16
|
+
|
17
|
+
field :sortition, Decidim::Sortitions::SortitionType, null: true do
|
18
|
+
argument :id, GraphQL::Types::ID, required: true
|
19
|
+
end
|
20
|
+
|
21
|
+
def sortition(**args)
|
22
|
+
Sortition.where(component: object).find_by(id: args[:id])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/decidim/sortitions.rb
CHANGED
@@ -20,8 +20,8 @@ FactoryBot.define do
|
|
20
20
|
create(:user, :admin, organization: component.organization) if component
|
21
21
|
end
|
22
22
|
|
23
|
-
dice { Faker::Number.between(1, 6).to_i }
|
24
|
-
target_items { Faker::Number.between(1, 5).to_i }
|
23
|
+
dice { Faker::Number.between(from: 1, to: 6).to_i }
|
24
|
+
target_items { Faker::Number.between(from: 1, to: 5).to_i }
|
25
25
|
request_timestamp { Time.now.utc }
|
26
26
|
witnesses { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
27
27
|
additional_info { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
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.24.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Salvador Perez Garcia
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.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.24.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.24.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.24.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.24.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.24.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.24.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.
|
68
|
+
version: 0.24.0.rc1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: decidim-dev
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.24.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.
|
82
|
+
version: 0.24.0.rc1
|
83
83
|
description: This module makes possible to select amont a set of proposal by sortition
|
84
84
|
email:
|
85
85
|
- jsperezg@gmail.com
|
@@ -121,8 +121,6 @@ files:
|
|
121
121
|
- app/queries/decidim/sortitions/filtered_sortitions.rb
|
122
122
|
- app/services/decidim/sortitions/admin/draw.rb
|
123
123
|
- app/services/decidim/sortitions/sortition_search.rb
|
124
|
-
- app/types/decidim/sortitions/sortition_type.rb
|
125
|
-
- app/types/decidim/sortitions/sortitions_type.rb
|
126
124
|
- app/views/decidim/sortitions/admin/sortitions/_form.html.erb
|
127
125
|
- app/views/decidim/sortitions/admin/sortitions/confirm_destroy.html.erb
|
128
126
|
- app/views/decidim/sortitions/admin/sortitions/edit.html.erb
|
@@ -199,12 +197,14 @@ files:
|
|
199
197
|
- config/locales/pt.yml
|
200
198
|
- config/locales/ro-RO.yml
|
201
199
|
- config/locales/ru.yml
|
200
|
+
- config/locales/si-LK.yml
|
202
201
|
- config/locales/sk-SK.yml
|
203
202
|
- config/locales/sk.yml
|
204
203
|
- config/locales/sl.yml
|
205
204
|
- config/locales/so-SO.yml
|
206
205
|
- config/locales/sr-CS.yml
|
207
206
|
- config/locales/sv.yml
|
207
|
+
- config/locales/sw-KE.yml
|
208
208
|
- config/locales/ti-ER.yml
|
209
209
|
- config/locales/tr-TR.yml
|
210
210
|
- config/locales/uk.yml
|
@@ -228,9 +228,12 @@ files:
|
|
228
228
|
- db/migrate/20181017110803_make_sortitions_authors_polymorphic.rb
|
229
229
|
- db/migrate/20200320105926_index_foreign_keys_in_decidim_sortitions_sortitions.rb
|
230
230
|
- db/migrate/20200827154036_add_commentable_counter_cache_to_sortitions.rb
|
231
|
+
- lib/decidim/api/sortition_type.rb
|
232
|
+
- lib/decidim/api/sortitions_type.rb
|
231
233
|
- lib/decidim/sortitions.rb
|
232
234
|
- lib/decidim/sortitions/admin.rb
|
233
235
|
- lib/decidim/sortitions/admin_engine.rb
|
236
|
+
- lib/decidim/sortitions/api.rb
|
234
237
|
- lib/decidim/sortitions/component.rb
|
235
238
|
- lib/decidim/sortitions/engine.rb
|
236
239
|
- lib/decidim/sortitions/test/factories.rb
|
@@ -239,7 +242,7 @@ homepage: https://github.com/decidim/decidim
|
|
239
242
|
licenses:
|
240
243
|
- AGPL-3.0
|
241
244
|
metadata: {}
|
242
|
-
post_install_message:
|
245
|
+
post_install_message:
|
243
246
|
rdoc_options: []
|
244
247
|
require_paths:
|
245
248
|
- lib
|
@@ -247,15 +250,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
247
250
|
requirements:
|
248
251
|
- - ">="
|
249
252
|
- !ruby/object:Gem::Version
|
250
|
-
version: '2.
|
253
|
+
version: '2.7'
|
251
254
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
252
255
|
requirements:
|
253
|
-
- - "
|
256
|
+
- - ">"
|
254
257
|
- !ruby/object:Gem::Version
|
255
|
-
version:
|
258
|
+
version: 1.3.1
|
256
259
|
requirements: []
|
257
|
-
rubygems_version: 3.
|
258
|
-
signing_key:
|
260
|
+
rubygems_version: 3.1.2
|
261
|
+
signing_key:
|
259
262
|
specification_version: 4
|
260
263
|
summary: Decidim sortitions module
|
261
264
|
test_files: []
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Sortitions
|
5
|
-
SortitionType = GraphQL::ObjectType.define do
|
6
|
-
interfaces [
|
7
|
-
-> { Decidim::Core::AuthorableInterface },
|
8
|
-
-> { Decidim::Comments::CommentableInterface },
|
9
|
-
-> { Decidim::Core::CategorizableInterface }
|
10
|
-
]
|
11
|
-
|
12
|
-
name "Sortition"
|
13
|
-
description "A sortition"
|
14
|
-
|
15
|
-
field :id, !types.ID, "The internal ID for this sortition"
|
16
|
-
field :dice, types.Int, "The dice for this sortition"
|
17
|
-
field :targetItems, types.Int, "The target items for this sortition", property: :target_items
|
18
|
-
field :requestTimestamp, Decidim::Core::DateType, "The request time stamp for this request", property: :request_timestamp
|
19
|
-
field :selectedProposals, types[types.Int], "The selected proposals for this sortition", property: :selected_proposals
|
20
|
-
field :createdAt, Decidim::Core::DateTimeType, "When this sortition was created", property: :created_at
|
21
|
-
field :updatedAt, Decidim::Core::DateTimeType, "When this sortition was updated", property: :updated_at
|
22
|
-
field :witnesses, Decidim::Core::TranslatedFieldType, "The witnesses for this sortition"
|
23
|
-
field :additionalInfo, Decidim::Core::TranslatedFieldType, "The additional info for this sortition", property: :additional_info
|
24
|
-
field :reference, types.String, "The reference for this sortition"
|
25
|
-
field :title, Decidim::Core::TranslatedFieldType, "The title for this sortition"
|
26
|
-
field :cancelReason, Decidim::Core::TranslatedFieldType, "The cancel reason for this sortition", property: :cancel_reason
|
27
|
-
field :cancelledOn, Decidim::Core::DateType, "When this sortition was cancelled", property: :cancelled_on
|
28
|
-
field :cancelledByUser, Decidim::Core::UserType, "Who cancelled this sortition", property: :cancelled_by_user
|
29
|
-
field :candidateProposals, Decidim::Core::TranslatedFieldType, "The candidate proposal for this sortition", property: :candidate_proposals
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Sortitions
|
5
|
-
SortitionsType = GraphQL::ObjectType.define do
|
6
|
-
interfaces [-> { Decidim::Core::ComponentInterface }]
|
7
|
-
|
8
|
-
name "Sortitions"
|
9
|
-
description "A sortition component of a participatory space."
|
10
|
-
|
11
|
-
connection :sortitions, SortitionType.connection_type do
|
12
|
-
resolve ->(component, _args, _ctx) {
|
13
|
-
SortitionTypeHelper.base_scope(component).includes(:component)
|
14
|
-
}
|
15
|
-
end
|
16
|
-
|
17
|
-
field(:sortition, SortitionType) do
|
18
|
-
argument :id, !types.ID
|
19
|
-
|
20
|
-
resolve ->(component, args, _ctx) {
|
21
|
-
SortitionTypeHelper.base_scope(component).find_by(id: args[:id])
|
22
|
-
}
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
module SortitionTypeHelper
|
27
|
-
def self.base_scope(component)
|
28
|
-
Sortition.where(component: component)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|