decidim-accountability 0.28.4 → 0.29.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/accountability/highlighted_results_for_component_cell.rb +0 -3
- data/app/cells/decidim/accountability/project_cell.rb +1 -6
- data/app/cells/decidim/accountability/result_l_cell.rb +1 -2
- data/app/cells/decidim/accountability/result_metadata_cell.rb +0 -6
- data/app/cells/decidim/accountability/results_cell.rb +0 -2
- data/app/cells/decidim/accountability/status_cell.rb +11 -8
- data/app/commands/decidim/accountability/admin/create_imported_result.rb +18 -85
- data/app/commands/decidim/accountability/admin/create_result.rb +12 -86
- data/app/commands/decidim/accountability/admin/create_status.rb +3 -31
- data/app/commands/decidim/accountability/admin/create_timeline_entry.rb +3 -30
- data/app/commands/decidim/accountability/admin/has_result_command.rb +54 -0
- data/app/commands/decidim/accountability/admin/update_imported_result.rb +16 -70
- data/app/commands/decidim/accountability/admin/update_result.rb +10 -72
- data/app/commands/decidim/accountability/admin/update_status.rb +3 -39
- data/app/commands/decidim/accountability/admin/update_timeline_entry.rb +3 -38
- data/app/controllers/decidim/accountability/admin/results_controller.rb +1 -1
- data/app/controllers/decidim/accountability/admin/statuses_controller.rb +7 -8
- data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +8 -8
- data/app/controllers/decidim/accountability/results_controller.rb +1 -21
- data/app/helpers/decidim/accountability/application_helper.rb +0 -34
- data/app/helpers/decidim/accountability/breadcrumb_helper.rb +0 -4
- data/app/models/decidim/accountability/result.rb +1 -1
- data/app/models/decidim/accountability/status.rb +1 -1
- data/app/packs/src/decidim/accountability/index.js +1 -1
- data/app/services/decidim/accountability/results_csv_importer.rb +1 -1
- data/app/views/decidim/accountability/admin/results/index.html.erb +7 -15
- data/app/views/decidim/accountability/admin/statuses/index.html.erb +2 -2
- data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +1 -1
- data/app/views/decidim/accountability/results/_home_categories.html.erb +2 -2
- data/app/views/decidim/accountability/results/_nav_breadcrumb.html.erb +8 -8
- data/app/views/decidim/accountability/results/_project.html.erb +1 -1
- data/app/views/decidim/accountability/results/_scope_filters.html.erb +3 -3
- data/app/views/decidim/participatory_spaces/_result.html.erb +3 -3
- data/config/locales/ar.yml +0 -12
- data/config/locales/bg.yml +0 -12
- data/config/locales/ca.yml +0 -12
- data/config/locales/cs.yml +0 -13
- data/config/locales/da.yml +0 -11
- data/config/locales/de.yml +0 -12
- data/config/locales/el.yml +0 -12
- data/config/locales/en.yml +0 -12
- data/config/locales/es-MX.yml +0 -12
- data/config/locales/es-PY.yml +0 -12
- data/config/locales/es.yml +0 -12
- data/config/locales/eu.yml +0 -12
- data/config/locales/fi-plain.yml +0 -12
- data/config/locales/fi.yml +2 -14
- data/config/locales/fr-CA.yml +0 -12
- data/config/locales/fr.yml +0 -12
- data/config/locales/ga-IE.yml +0 -8
- data/config/locales/gl.yml +0 -12
- data/config/locales/he-IL.yml +0 -12
- data/config/locales/hu.yml +0 -12
- data/config/locales/id-ID.yml +0 -11
- data/config/locales/is-IS.yml +0 -12
- data/config/locales/it.yml +0 -12
- data/config/locales/ja.yml +0 -12
- data/config/locales/ko.yml +0 -12
- data/config/locales/lb.yml +0 -12
- data/config/locales/lt.yml +0 -12
- data/config/locales/lv.yml +0 -11
- data/config/locales/nl.yml +0 -12
- data/config/locales/no.yml +0 -12
- data/config/locales/pl.yml +0 -12
- data/config/locales/pt-BR.yml +0 -13
- data/config/locales/pt.yml +0 -12
- data/config/locales/ro-RO.yml +7 -21
- data/config/locales/ru.yml +0 -11
- data/config/locales/si-LK.yml +0 -5
- data/config/locales/sk.yml +0 -11
- data/config/locales/sl.yml +0 -4
- data/config/locales/sq-AL.yml +0 -12
- data/config/locales/sr-CS.yml +0 -11
- data/config/locales/sv.yml +28 -79
- data/config/locales/th-TH.yml +0 -1
- data/config/locales/tr-TR.yml +0 -12
- data/config/locales/uk.yml +0 -11
- data/config/locales/zh-CN.yml +0 -11
- data/config/locales/zh-TW.yml +0 -12
- data/decidim-accountability.gemspec +1 -1
- data/lib/decidim/accountability/component.rb +0 -4
- data/lib/decidim/accountability/seeds.rb +76 -67
- data/lib/decidim/accountability/test/factories.rb +0 -4
- data/lib/decidim/accountability/version.rb +1 -1
- data/lib/decidim/api/result_type.rb +1 -1
- metadata +25 -27
- data/app/commands/decidim/accountability/admin/destroy_result.rb +0 -43
- data/app/services/decidim/accountability/result_stats_calculator.rb +0 -49
- data/app/views/decidim/accountability/results/_stats_box.html.erb +0 -79
data/config/locales/sv.yml
CHANGED
@@ -5,15 +5,14 @@ sv:
|
|
5
5
|
result:
|
6
6
|
decidim_accountability_status_id: Status
|
7
7
|
decidim_category_id: Kategori
|
8
|
-
decidim_scope_id:
|
8
|
+
decidim_scope_id: Omfattning
|
9
9
|
description: Beskrivning
|
10
10
|
end_date: Slutdatum
|
11
|
-
meetings_ids:
|
11
|
+
meetings_ids: Inkluderade möten
|
12
12
|
progress: Genomförande
|
13
13
|
project_ids: Projekt som omfattas
|
14
14
|
proposals: Förslag som omfattas
|
15
15
|
start_date: Startdatum
|
16
|
-
subresults: Delresultat
|
17
16
|
title: Titel
|
18
17
|
updated_at: Uppdaterad
|
19
18
|
status:
|
@@ -27,7 +26,7 @@ sv:
|
|
27
26
|
title: Titel
|
28
27
|
models:
|
29
28
|
decidim/accountability/proposal_linked_event: Förslag som ingår i ett resultat
|
30
|
-
decidim/accountability/result_progress_updated_event:
|
29
|
+
decidim/accountability/result_progress_updated_event: Uppdaterat resultatutvecklingen
|
31
30
|
activerecord:
|
32
31
|
models:
|
33
32
|
decidim/accountability/result:
|
@@ -41,11 +40,6 @@ sv:
|
|
41
40
|
confirm_destroy: Vill du radera detta %{name}?
|
42
41
|
destroy: Radera
|
43
42
|
edit: Redigera
|
44
|
-
import: Importera från en annan komponent
|
45
|
-
import_csv: Importera resultat från CSV-fil
|
46
|
-
new_result: Nytt resultat
|
47
|
-
new_status: Ny status
|
48
|
-
new_timeline_entry: Ny post i tidslinje
|
49
43
|
preview: Förhandsvisa
|
50
44
|
timeline_entries: Projektutveckling
|
51
45
|
title: Åtgärder
|
@@ -55,13 +49,13 @@ sv:
|
|
55
49
|
results: Resultat
|
56
50
|
import_results:
|
57
51
|
new:
|
58
|
-
download_export: Ladda ner exporten som CSV
|
52
|
+
download_export: Ladda ner exporten som CSV
|
59
53
|
import: Importera
|
60
54
|
info: |
|
61
|
-
<p>Vi rekommenderar att du följer
|
55
|
+
<p>Vi rekommenderar att du följer dessa steg:</p>
|
62
56
|
<ol>
|
63
|
-
<li><a href='%{link_new_status}' target='_blank'>Skapa
|
64
|
-
<li><a href='%{link_new_result}' target='_blank'>Skapa minst ett resultat manuellt</a>
|
57
|
+
<li><a href='%{link_new_status}' target='_blank'>Skapa statusarna för de resultat</a> som du vill lägga till</li>
|
58
|
+
<li><a href='%{link_new_result}' target='_blank'>Skapa minst ett resultat manuellt</a> via denna administratörspanel innan du använder Import, för att få en bättre förståelse för formatet och vad du behöver fylla i.</li>
|
65
59
|
<li>%{link_export_csv}</li>
|
66
60
|
<li>Genomför ändringarna lokalt. Du kan endast ändra följande kolumner i CSV-filen:
|
67
61
|
<ul>
|
@@ -78,10 +72,8 @@ sv:
|
|
78
72
|
</ul>
|
79
73
|
</li>
|
80
74
|
</ol>
|
81
|
-
title: Importera resultat från CSV-fil
|
82
75
|
imports:
|
83
76
|
create:
|
84
|
-
invalid: Det gick inte att importera resultaten.
|
85
77
|
success: Importen av filen har påbörjats. Inom några minuter kommer du att få ett e-postmeddelande med importresultatet.
|
86
78
|
models:
|
87
79
|
result:
|
@@ -97,19 +89,10 @@ sv:
|
|
97
89
|
new_items:
|
98
90
|
one: 1 valt projekt kommer att importeras
|
99
91
|
other: "%{count} valda projekt kommer att importeras"
|
100
|
-
no_components: Det finns
|
92
|
+
no_components: Det finns inga budgetkomponenter i detta deltagande utrymme för att exportera projekt till resultat.
|
101
93
|
origin_component_id: Ursprungskomponent
|
102
94
|
select_component: Välj en komponent
|
103
|
-
success:
|
104
|
-
one: 1 projekt väntar på att importeras. Du får ett e-postmeddelande när det är klart.
|
105
|
-
other: "%{count} projekt väntar på att importeras. Du får ett e-postmeddelande när det är klart."
|
106
|
-
title: Importera från en annan komponent
|
107
95
|
results:
|
108
|
-
create:
|
109
|
-
invalid: Det gick inte att skapa resultatet.
|
110
|
-
success: Resultatet har skapats.
|
111
|
-
destroy:
|
112
|
-
success: Resultatet har raderats.
|
113
96
|
edit:
|
114
97
|
title: Redigera resultat
|
115
98
|
update: Uppdatera resultat
|
@@ -118,18 +101,10 @@ sv:
|
|
118
101
|
new:
|
119
102
|
create: Skapa resultat
|
120
103
|
title: Nytt resultat
|
121
|
-
update:
|
122
|
-
invalid: Det gick inte att uppdatera resultatet.
|
123
|
-
success: Resultatet har uppdaterats.
|
124
104
|
shared:
|
125
105
|
subnav:
|
126
106
|
statuses: Status
|
127
107
|
statuses:
|
128
|
-
create:
|
129
|
-
invalid: Det gick inte att skapa statusen.
|
130
|
-
success: Statusen har skapats.
|
131
|
-
destroy:
|
132
|
-
success: Statusen har raderats.
|
133
108
|
edit:
|
134
109
|
title: Redigera status
|
135
110
|
update: Uppdatera status
|
@@ -138,15 +113,7 @@ sv:
|
|
138
113
|
new:
|
139
114
|
create: Skapa status
|
140
115
|
title: Ny status
|
141
|
-
update:
|
142
|
-
invalid: Det gick inte att uppdatera statusen.
|
143
|
-
success: Statusen har uppdaterats.
|
144
116
|
timeline_entries:
|
145
|
-
create:
|
146
|
-
invalid: Det gick inte att skapa den här posten.
|
147
|
-
success: Posten har skapats.
|
148
|
-
destroy:
|
149
|
-
success: Posten har raderats.
|
150
117
|
edit:
|
151
118
|
title: Redigera post
|
152
119
|
update: Uppdatera post
|
@@ -155,9 +122,6 @@ sv:
|
|
155
122
|
new:
|
156
123
|
create: Skapa post
|
157
124
|
title: Ny post
|
158
|
-
update:
|
159
|
-
invalid: Det gick inte att uppdatera den här posten.
|
160
|
-
success: Posten har uppdaterats.
|
161
125
|
admin_log:
|
162
126
|
result:
|
163
127
|
create: "%{user_name} skapade resultatet %{resource_name} i %{space_name}"
|
@@ -180,17 +144,16 @@ sv:
|
|
180
144
|
import_mailer:
|
181
145
|
import:
|
182
146
|
errors: Fel
|
183
|
-
errors_present: Det gick inte att importera resultaten.
|
184
147
|
row_number: Rad
|
185
|
-
subject:
|
186
|
-
success:
|
148
|
+
subject: Lyckad import av resultat
|
149
|
+
success: Lyckad import av resultat. Du kan granska resultaten i administrationsgränssnittet.
|
187
150
|
import_projects_mailer:
|
188
151
|
import:
|
189
152
|
added_projects:
|
190
153
|
one: Ett resultat importerades från projekt.
|
191
154
|
other: "%{count} resultat importerades från projekt."
|
192
155
|
subject: Projekten har importerats
|
193
|
-
success: Projekten har importerats till resultat
|
156
|
+
success: Projekten har importerats till resultat. Du kan se resultaten i administrationsgränssnittet.
|
194
157
|
last_activity:
|
195
158
|
new_result: 'Nytt resultat:'
|
196
159
|
models:
|
@@ -201,7 +164,7 @@ sv:
|
|
201
164
|
end_date: Slutdatum
|
202
165
|
id: ID
|
203
166
|
progress: Genomförande
|
204
|
-
scope:
|
167
|
+
scope: Omfång
|
205
168
|
start_date: Startdatum
|
206
169
|
status: Status
|
207
170
|
title: Titel
|
@@ -210,7 +173,7 @@ sv:
|
|
210
173
|
description: Beskrivning
|
211
174
|
key: Nyckel
|
212
175
|
name: Namn
|
213
|
-
progress:
|
176
|
+
progress: Behandling
|
214
177
|
timeline_entry:
|
215
178
|
fields:
|
216
179
|
entry_date: Datum
|
@@ -224,11 +187,9 @@ sv:
|
|
224
187
|
all: Alla
|
225
188
|
home:
|
226
189
|
categories_label: Kategorier
|
227
|
-
empty: Det finns inget resultat ännu.
|
228
|
-
empty_filters: Det finns inget resultat med de här kriterierna.
|
229
190
|
subcategories_label: Underkategorier
|
230
191
|
home_header:
|
231
|
-
global_status:
|
192
|
+
global_status: Global genomförandestatus
|
232
193
|
nav_breadcrumb:
|
233
194
|
global: Globalt genomförande
|
234
195
|
no_results: Det finns inga projekt
|
@@ -236,15 +197,7 @@ sv:
|
|
236
197
|
search: Sök efter åtgärder
|
237
198
|
show:
|
238
199
|
stats:
|
239
|
-
attendees: Deltagare
|
240
200
|
back_to_resource: Gå tillbaka till resultatet
|
241
|
-
comments: Kommentarer
|
242
|
-
contributions: Insatser
|
243
|
-
last_edited_by: Senast ändrad av
|
244
|
-
last_updated_at: Senast uppdaterad
|
245
|
-
meetings: Möten
|
246
|
-
proposals: Förslag
|
247
|
-
votes: Stöd
|
248
201
|
timeline:
|
249
202
|
title: Projektutveckling
|
250
203
|
admin:
|
@@ -253,39 +206,35 @@ sv:
|
|
253
206
|
category_id_eq:
|
254
207
|
label: Kategori
|
255
208
|
scope_id_eq:
|
256
|
-
label:
|
209
|
+
label: Omfång
|
257
210
|
status_id_eq:
|
258
211
|
label: Status
|
259
212
|
components:
|
260
213
|
accountability:
|
261
214
|
actions:
|
262
|
-
comment:
|
263
|
-
name:
|
215
|
+
comment: Kommentar
|
216
|
+
name: Ansvarsskyldighet
|
264
217
|
settings:
|
265
218
|
global:
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
intro: Introduktion
|
273
|
-
scope_id: Indelning
|
274
|
-
scopes_enabled: Aktivera indelningar
|
275
|
-
subcategories_label: Namn på "Underkategorier"
|
219
|
+
comments_enabled: Kommentarer på
|
220
|
+
comments_max_length: Maximal längd för kommentarer (Lämna 0 för standardvärde)
|
221
|
+
display_progress_enabled: Visa behandling
|
222
|
+
intro: Intro
|
223
|
+
scope_id: Omfång
|
224
|
+
scopes_enabled: Omfång aktiverade
|
276
225
|
step:
|
277
|
-
comments_blocked:
|
226
|
+
comments_blocked: Kommentarer blockerade
|
278
227
|
events:
|
279
228
|
accountability:
|
280
229
|
proposal_linked:
|
281
230
|
email_intro: 'Förslaget "%{proposal_title}" har tagits med i ett resultat. Visa det från den här sidan:'
|
282
|
-
email_outro: Du har fått det här meddelandet eftersom du följer "%{proposal_title}". Du kan sluta att ta emot meddelanden genom att
|
283
|
-
email_subject: En uppdatering
|
231
|
+
email_outro: Du har fått det här meddelandet eftersom du följer "%{proposal_title}". Du kan sluta att ta emot meddelanden genom att följa föregående länk.
|
232
|
+
email_subject: En uppdatering till %{proposal_title}
|
284
233
|
notification_title: Förslaget <a href="%{proposal_path}">%{proposal_title}</a> har tagits med i resultatet <a href="%{resource_path}">%{resource_title}</a>.
|
285
234
|
result_progress_updated:
|
286
235
|
email_intro: 'Resultatet "%{resource_title}", som omfattar förslaget "%{proposal_title}", är nu %{progress}% färdigt. Du kan se det från den här sidan:'
|
287
|
-
email_outro: Du har fått
|
288
|
-
email_subject: En uppdatering
|
236
|
+
email_outro: Du har fått detta meddelande eftersom du följer "%{proposal_title}", och detta förslag ingår i resultatet "%{resource_title}". Du kan sluta ta emot meddelanden genom att följa föregående länk.
|
237
|
+
email_subject: En uppdatering till behandlingen av %{resource_title}
|
289
238
|
notification_title: Resultatet <a href="%{resource_path}">%{resource_title}</a>, som ingår i förslaget <a href="%{proposal_path}">%{proposal_title}</a>, är nu %{progress}% färdigt.
|
290
239
|
metrics:
|
291
240
|
results:
|
data/config/locales/th-TH.yml
CHANGED
data/config/locales/tr-TR.yml
CHANGED
@@ -226,15 +226,7 @@ tr:
|
|
226
226
|
search: İşlemleri ara
|
227
227
|
show:
|
228
228
|
stats:
|
229
|
-
attendees: Katılımcılar
|
230
229
|
back_to_resource: Sonuca geri dön
|
231
|
-
comments: Yorumlar
|
232
|
-
contributions: Katılımlar
|
233
|
-
last_edited_by: Son düzenleyen
|
234
|
-
last_updated_at: Son güncelleme
|
235
|
-
meetings: Toplantılar
|
236
|
-
proposals: Teklifler
|
237
|
-
votes: Destekler
|
238
230
|
timeline:
|
239
231
|
title: Proje gelişimi
|
240
232
|
admin:
|
@@ -253,16 +245,12 @@ tr:
|
|
253
245
|
name: Sorumluluk
|
254
246
|
settings:
|
255
247
|
global:
|
256
|
-
categories_label: '"Kategoriler" için isim'
|
257
248
|
comments_enabled: Yorumlar etkin
|
258
249
|
comments_max_length: Maksimum yorum uzunluğu (Varsayılan değer için 0 bırakın)
|
259
250
|
display_progress_enabled: İlerlemeyi göster
|
260
|
-
heading_leaf_level_results: '"Projeler" için isim'
|
261
|
-
heading_parent_level_results: '"Sonuçların" Adı'
|
262
251
|
intro: Tanıtım
|
263
252
|
scope_id: Kapsam
|
264
253
|
scopes_enabled: Kapsamlar etkinleştirildi
|
265
|
-
subcategories_label: '"Alt kategoriler" için isim'
|
266
254
|
step:
|
267
255
|
comments_blocked: Yorumlar engellendi
|
268
256
|
events:
|
data/config/locales/uk.yml
CHANGED
@@ -123,14 +123,7 @@ uk:
|
|
123
123
|
search: Пошук дій
|
124
124
|
show:
|
125
125
|
stats:
|
126
|
-
attendees: Учасники
|
127
126
|
back_to_resource: Повернутися до підсумків
|
128
|
-
contributions: Внесені пропозиції
|
129
|
-
last_edited_by: Останній раз редагувалося
|
130
|
-
last_updated_at: Останній раз оновлювалося
|
131
|
-
meetings: Зустрічі
|
132
|
-
proposals: Пропозиції
|
133
|
-
votes: Підтримує
|
134
127
|
timeline:
|
135
128
|
title: Розвиток проекту
|
136
129
|
components:
|
@@ -138,13 +131,9 @@ uk:
|
|
138
131
|
name: Звітність
|
139
132
|
settings:
|
140
133
|
global:
|
141
|
-
categories_label: Назва для "Категорії"
|
142
134
|
comments_enabled: Коментарі увімкнено
|
143
135
|
display_progress_enabled: Показувати перебіг
|
144
|
-
heading_leaf_level_results: Назва для "Проекти"
|
145
|
-
heading_parent_level_results: Назва для "Підсумки"
|
146
136
|
intro: Вступ
|
147
|
-
subcategories_label: Назва для "Підкатегорії"
|
148
137
|
step:
|
149
138
|
comments_blocked: Коментарі вимкнено
|
150
139
|
events:
|
data/config/locales/zh-CN.yml
CHANGED
@@ -127,14 +127,7 @@ zh-CN:
|
|
127
127
|
search: 搜索操作
|
128
128
|
show:
|
129
129
|
stats:
|
130
|
-
attendees: 参与者
|
131
130
|
back_to_resource: 返回结果
|
132
|
-
contributions: 二. 捐款
|
133
|
-
last_edited_by: 最后编辑者
|
134
|
-
last_updated_at: 最后更新于
|
135
|
-
meetings: 会议
|
136
|
-
proposals: 建议
|
137
|
-
votes: 支持
|
138
131
|
timeline:
|
139
132
|
title: 项目进化
|
140
133
|
components:
|
@@ -142,16 +135,12 @@ zh-CN:
|
|
142
135
|
name: 问责制
|
143
136
|
settings:
|
144
137
|
global:
|
145
|
-
categories_label: '"类别"的名称'
|
146
138
|
comments_enabled: 评论已启用
|
147
139
|
comments_max_length: 评论最大长度 (默认值留0)
|
148
140
|
display_progress_enabled: 显示进度
|
149
|
-
heading_leaf_level_results: '“项目”的名称'
|
150
|
-
heading_parent_level_results: '"结果"的名称'
|
151
141
|
intro: 简介
|
152
142
|
scope_id: 范围
|
153
143
|
scopes_enabled: 范围已启用
|
154
|
-
subcategories_label: '"子类别"的名称'
|
155
144
|
step:
|
156
145
|
comments_blocked: 评论已阻止
|
157
146
|
events:
|
data/config/locales/zh-TW.yml
CHANGED
@@ -219,15 +219,7 @@ zh-TW:
|
|
219
219
|
search: 搜尋操作
|
220
220
|
show:
|
221
221
|
stats:
|
222
|
-
attendees: 與會者
|
223
222
|
back_to_resource: 返回至結果
|
224
|
-
comments: 評論
|
225
|
-
contributions: 貢獻
|
226
|
-
last_edited_by: 最後編輯者
|
227
|
-
last_updated_at: 更新時間
|
228
|
-
meetings: 會議
|
229
|
-
proposals: 提案
|
230
|
-
votes: 支援
|
231
223
|
timeline:
|
232
224
|
title: 專案評估
|
233
225
|
admin:
|
@@ -246,16 +238,12 @@ zh-TW:
|
|
246
238
|
name: 問責
|
247
239
|
settings:
|
248
240
|
global:
|
249
|
-
categories_label: 類別名稱
|
250
241
|
comments_enabled: 已啟用留言
|
251
242
|
comments_max_length: 留言字數上限 (0 表示使用預設)
|
252
243
|
display_progress_enabled: 顯示進度
|
253
|
-
heading_leaf_level_results: 專案名稱
|
254
|
-
heading_parent_level_results: 結果名稱
|
255
244
|
intro: 介紹
|
256
245
|
scope_id: 範圍
|
257
246
|
scopes_enabled: 啟用的範圍
|
258
|
-
subcategories_label: 子類別名稱
|
259
247
|
step:
|
260
248
|
comments_blocked: 留言已封鎖
|
261
249
|
events:
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
"homepage_uri" => "https://decidim.org",
|
20
20
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
21
21
|
}
|
22
|
-
s.required_ruby_version = "~> 3.
|
22
|
+
s.required_ruby_version = "~> 3.2.0"
|
23
23
|
|
24
24
|
s.name = "decidim-accountability"
|
25
25
|
s.summary = "Decidim accountability module"
|
@@ -30,10 +30,6 @@ Decidim.register_component(:accountability) do |component|
|
|
30
30
|
settings.attribute :comments_enabled, type: :boolean, default: true
|
31
31
|
settings.attribute :comments_max_length, type: :integer, required: true
|
32
32
|
settings.attribute :intro, type: :text, translated: true, editor: true
|
33
|
-
settings.attribute :categories_label, type: :string, translated: true, editor: true
|
34
|
-
settings.attribute :subcategories_label, type: :string, translated: true, editor: true
|
35
|
-
settings.attribute :heading_parent_level_results, type: :string, translated: true, editor: true
|
36
|
-
settings.attribute :heading_leaf_level_results, type: :string, translated: true, editor: true
|
37
33
|
settings.attribute :display_progress_enabled, type: :boolean, default: true
|
38
34
|
end
|
39
35
|
|
@@ -4,7 +4,7 @@ require "decidim/components/namer"
|
|
4
4
|
|
5
5
|
module Decidim
|
6
6
|
module Accountability
|
7
|
-
class Seeds
|
7
|
+
class Seeds < Decidim::Seeds
|
8
8
|
attr_reader :participatory_space
|
9
9
|
|
10
10
|
def initialize(participatory_space:)
|
@@ -12,11 +12,20 @@ module Decidim
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def call
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
component = create_component!
|
16
|
+
|
17
|
+
create_statuses!(component:)
|
18
|
+
|
19
|
+
3.times do
|
20
|
+
categories = create_categories!
|
21
|
+
|
22
|
+
categories.each do |category|
|
23
|
+
create_result!(component:, category:)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
19
27
|
|
28
|
+
def create_component!
|
20
29
|
params = {
|
21
30
|
name: Decidim::Components::Namer.new(participatory_space.organization.available_locales, :accountability).i18n_name,
|
22
31
|
manifest_name: :accountability,
|
@@ -24,19 +33,17 @@ module Decidim
|
|
24
33
|
participatory_space:,
|
25
34
|
settings: {
|
26
35
|
intro: Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(word_count: 4) },
|
27
|
-
categories_label: Decidim::Faker::Localized.word,
|
28
|
-
subcategories_label: Decidim::Faker::Localized.word,
|
29
|
-
heading_parent_level_results: Decidim::Faker::Localized.word,
|
30
|
-
heading_leaf_level_results: Decidim::Faker::Localized.word,
|
31
36
|
scopes_enabled: true,
|
32
37
|
scope_id: participatory_space.scope&.id
|
33
38
|
}
|
34
39
|
}
|
35
40
|
|
36
|
-
|
41
|
+
Decidim.traceability.perform_action!("publish", Decidim::Component, admin_user, visibility: "all") do
|
37
42
|
Decidim::Component.create!(params)
|
38
43
|
end
|
44
|
+
end
|
39
45
|
|
46
|
+
def create_statuses!(component:)
|
40
47
|
5.times do |i|
|
41
48
|
Decidim::Accountability::Status.create!(
|
42
49
|
component:,
|
@@ -44,70 +51,72 @@ module Decidim
|
|
44
51
|
key: "status_#{i}"
|
45
52
|
)
|
46
53
|
end
|
54
|
+
end
|
47
55
|
|
48
|
-
|
49
|
-
|
50
|
-
|
56
|
+
def create_categories!
|
57
|
+
parent_category = participatory_space.categories.sample
|
58
|
+
categories = [parent_category]
|
51
59
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
60
|
+
2.times do
|
61
|
+
categories << Decidim::Category.create!(
|
62
|
+
name: Decidim::Faker::Localized.sentence(word_count: 5),
|
63
|
+
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
64
|
+
Decidim::Faker::Localized.paragraph(sentence_count: 3)
|
65
|
+
end,
|
66
|
+
parent: parent_category,
|
67
|
+
participatory_space:
|
68
|
+
)
|
69
|
+
end
|
62
70
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
71
|
+
categories
|
72
|
+
end
|
73
|
+
|
74
|
+
def create_result!(component:, category:)
|
75
|
+
result = Decidim.traceability.create!(
|
76
|
+
Decidim::Accountability::Result,
|
77
|
+
admin_user,
|
78
|
+
{
|
79
|
+
component:,
|
80
|
+
scope: participatory_space.organization.scopes.sample,
|
81
|
+
category:,
|
82
|
+
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
83
|
+
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
84
|
+
Decidim::Faker::Localized.paragraph(sentence_count: 3)
|
85
|
+
end
|
86
|
+
},
|
87
|
+
visibility: "all"
|
88
|
+
)
|
78
89
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
end
|
96
|
-
},
|
97
|
-
visibility: "all"
|
98
|
-
)
|
99
|
-
|
100
|
-
rand(0..5).times do |i|
|
101
|
-
child_result.timeline_entries.create!(
|
102
|
-
entry_date: child_result.start_date + i.days,
|
103
|
-
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
104
|
-
description: Decidim::Faker::Localized.paragraph(sentence_count: 1)
|
105
|
-
)
|
90
|
+
Decidim::Comments::Seed.comments_for(result)
|
91
|
+
|
92
|
+
3.times do
|
93
|
+
child_result = Decidim.traceability.create!(
|
94
|
+
Decidim::Accountability::Result,
|
95
|
+
admin_user,
|
96
|
+
{
|
97
|
+
component:,
|
98
|
+
parent: result,
|
99
|
+
start_date: Time.zone.today,
|
100
|
+
end_date: Time.zone.today + 10,
|
101
|
+
status: Decidim::Accountability::Status.all.sample,
|
102
|
+
progress: rand(1..100),
|
103
|
+
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
104
|
+
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
105
|
+
Decidim::Faker::Localized.paragraph(sentence_count: 3)
|
106
106
|
end
|
107
|
+
},
|
108
|
+
visibility: "all"
|
109
|
+
)
|
107
110
|
|
108
|
-
|
109
|
-
|
111
|
+
rand(0..5).times do |i|
|
112
|
+
child_result.timeline_entries.create!(
|
113
|
+
entry_date: child_result.start_date + i.days,
|
114
|
+
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
115
|
+
description: Decidim::Faker::Localized.paragraph(sentence_count: 1)
|
116
|
+
)
|
110
117
|
end
|
118
|
+
|
119
|
+
Decidim::Comments::Seed.comments_for(child_result)
|
111
120
|
end
|
112
121
|
end
|
113
122
|
end
|
@@ -18,10 +18,6 @@ FactoryBot.define do
|
|
18
18
|
settings do
|
19
19
|
{
|
20
20
|
intro: generate_localized_description(:accountability_component_intro, skip_injection:),
|
21
|
-
categories_label: generate_localized_word(:accountability_component_categories_label, skip_injection:),
|
22
|
-
subcategories_label: generate_localized_word(:accountability_component_subcategories_label, skip_injection:),
|
23
|
-
heading_parent_level_results: generate_localized_word(:accountability_component_heading_parent_level_results, skip_injection:),
|
24
|
-
heading_leaf_level_results: generate_localized_word(:accountability_component_heading_leaf_level_results, skip_injection:),
|
25
21
|
scopes_enabled: true,
|
26
22
|
scope_id: participatory_space.scope&.id
|
27
23
|
}
|
@@ -22,7 +22,7 @@ module Decidim
|
|
22
22
|
field :weight, GraphQL::Types::Int, "The order of this result", null: false
|
23
23
|
field :external_id, GraphQL::Types::String, "The external ID for this result", null: true
|
24
24
|
|
25
|
-
field :children, [Decidim::Accountability::ResultType, { null: true }], "The
|
25
|
+
field :children, [Decidim::Accountability::ResultType, { null: true }], "The children's results", null: true
|
26
26
|
field :parent, Decidim::Accountability::ResultType, "The parent result", null: true
|
27
27
|
field :status, Decidim::Accountability::StatusType, "The status for this result", null: true
|
28
28
|
field :timeline_entries, [Decidim::Accountability::TimelineEntryType, { null: true }], "The timeline entries for this result", null: true
|