decidim-participatory_processes 0.24.0 → 0.25.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/participatory_process_groups/content_blocks/highlighted_participatory_processes/filters.erb +0 -1
- data/app/cells/decidim/participatory_process_groups/content_blocks/statistics_cell.rb +16 -0
- data/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb +1 -1
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/single_process.erb +1 -1
- data/app/cells/decidim/participatory_processes/process_group_m_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/process_group_s_cell.rb +2 -2
- data/app/cells/decidim/participatory_processes/process_m_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/process_s_cell.rb +2 -2
- data/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +9 -2
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +5 -10
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb +3 -3
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_groups_controller.rb +3 -3
- data/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +1 -5
- data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +2 -2
- data/app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb +1 -1
- data/app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb +1 -0
- data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +1 -1
- data/app/models/decidim/participatory_process.rb +9 -5
- data/app/models/decidim/participatory_process_group.rb +2 -2
- data/app/packs/entrypoints/decidim_participatory_processes.js +4 -0
- data/app/packs/entrypoints/decidim_participatory_processes_admin.js +1 -0
- data/app/{assets/images/decidim/participatory_processes/process.svg → packs/images/decidim/participatory_processes/decidim_participatory_processes.svg} +0 -0
- data/app/packs/src/decidim/participatory_processes/admin/participatory_processes.js +18 -0
- data/app/packs/src/decidim/participatory_processes/filters.js +28 -0
- data/app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb +1 -6
- data/app/presenters/decidim/participatory_processes/participatory_process_group_stats_presenter.rb +3 -13
- data/app/presenters/decidim/participatory_processes/participatory_process_presenter.rb +2 -9
- data/app/presenters/decidim/participatory_processes/participatory_process_stats_presenter.rb +3 -13
- data/app/queries/decidim/participatory_processes/admin/admin_users.rb +23 -10
- data/app/queries/decidim/participatory_processes/admin/moderators.rb +24 -11
- data/app/queries/decidim/participatory_processes/stats_participants_count.rb +9 -0
- data/app/serializers/decidim/participatory_processes/participatory_process_serializer.rb +2 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb +0 -2
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/index.html.erb +6 -4
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/show.html.erb +2 -2
- data/app/views/decidim/participatory_processes/admin/participatory_process_imports/_form.html.erb +0 -2
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/_form.html.erb +0 -2
- data/app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb +1 -3
- data/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +4 -2
- data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +2 -2
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process_group.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_processes/index.html.erb +2 -2
- data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +2 -2
- data/app/views/layouts/decidim/_process_header.html.erb +1 -1
- data/app/views/layouts/decidim/_process_header_steps.html.erb +1 -1
- data/app/views/layouts/decidim/admin/participatory_process.html.erb +2 -76
- data/app/views/layouts/decidim/admin/participatory_process_group.html.erb +1 -1
- data/app/views/layouts/decidim/participatory_process.html.erb +2 -2
- data/config/assets.rb +9 -0
- data/config/locales/ar.yml +0 -19
- data/config/locales/ca.yml +4 -20
- data/config/locales/cs.yml +15 -31
- data/config/locales/de.yml +5 -21
- data/config/locales/el.yml +0 -19
- data/config/locales/en.yml +4 -20
- data/config/locales/es-MX.yml +4 -20
- data/config/locales/es-PY.yml +4 -20
- data/config/locales/es.yml +4 -20
- data/config/locales/eu.yml +0 -17
- data/config/locales/fi-plain.yml +4 -20
- data/config/locales/fi.yml +4 -20
- data/config/locales/fr-CA.yml +2 -21
- data/config/locales/fr-LU.yml +484 -0
- data/config/locales/fr.yml +2 -21
- data/config/locales/gl.yml +17 -20
- data/config/locales/hu.yml +0 -19
- data/config/locales/id-ID.yml +0 -17
- data/config/locales/is-IS.yml +0 -15
- data/config/locales/it.yml +52 -20
- data/config/locales/ja.yml +55 -19
- data/config/locales/lb-LU.yml +1 -0
- data/config/locales/lv.yml +0 -18
- data/config/locales/nl.yml +4 -19
- data/config/locales/no.yml +0 -19
- data/config/locales/pl.yml +6 -24
- data/config/locales/pt-BR.yml +103 -17
- data/config/locales/pt.yml +0 -19
- data/config/locales/ro-RO.yml +8 -23
- data/config/locales/ru.yml +0 -17
- data/config/locales/sk.yml +0 -19
- data/config/locales/sr-CS.yml +0 -4
- data/config/locales/sv.yml +39 -19
- data/config/locales/tr-TR.yml +1 -20
- data/config/locales/uk.yml +0 -17
- data/config/locales/zh-CN.yml +0 -19
- data/db/migrate/20201006072346_fix_attachments_titles.rb +5 -8
- data/db/migrate/20210415163339_allow_null_file_column_in_decidim_attachments_table.rb +7 -0
- data/lib/decidim/api/participatory_process_group_type.rb +4 -0
- data/lib/decidim/api/participatory_process_type.rb +9 -1
- data/lib/decidim/participatory_processes/admin_engine.rb +119 -37
- data/lib/decidim/participatory_processes/engine.rb +7 -10
- data/lib/decidim/participatory_processes/participatory_space.rb +40 -7
- data/lib/decidim/participatory_processes/version.rb +1 -1
- metadata +35 -25
- data/app/assets/config/admin/decidim_participatory_processes_manifest.js +0 -1
- data/app/assets/config/decidim_participatory_processes_manifest.js +0 -2
- data/app/assets/javascripts/decidim/participatory_processes/admin/participatory_processes.js.es6 +0 -20
- data/app/assets/javascripts/decidim/participatory_processes/filters.js.es6 +0 -31
- data/app/cells/decidim/participatory_process_groups/content_blocks/stats/show.erb +0 -13
- data/app/cells/decidim/participatory_process_groups/content_blocks/stats_cell.rb +0 -17
- data/app/cells/decidim/participatory_processes/statistic/show.erb +0 -9
- data/app/cells/decidim/participatory_processes/statistic_cell.rb +0 -20
- data/app/cells/decidim/participatory_processes/statistics/show.erb +0 -17
- data/app/cells/decidim/participatory_processes/statistics_cell.rb +0 -18
- data/app/helpers/decidim/participatory_processes/admin/participatory_processes_menu_helper.rb +0 -23
- data/app/views/decidim/participatory_processes/admin/shared/_secondary_nav.html.erb +0 -3
- data/config/locales/ja-JP.yml +0 -445
data/config/locales/ro-RO.yml
CHANGED
@@ -34,6 +34,7 @@ ro:
|
|
34
34
|
subtitle: Subtitrare
|
35
35
|
target: Cine participă
|
36
36
|
title: Titlu
|
37
|
+
weight: Ordinea procesului
|
37
38
|
participatory_process_group:
|
38
39
|
description: Descriere
|
39
40
|
developer_group: Grup promotor
|
@@ -312,7 +313,7 @@ ro:
|
|
312
313
|
page: "<p>Un <strong>proces participativ</strong> este o secvență de activități participative (de ex. mai întâi să completaţi un sondaj, apoi să faceţi propuneri, discutându-le în cadrul reuniunilor directe sau virtuale; și, în cele din urmă, prioritizarea acestora) în scopul definirii și luării unei decizii cu privire la un subiect specific.</p> <p>Exemple de procese participative sunt: un proces de alegere a membrilor comitetului (în care sunt prezentate pentru prima dată candidații), apoi să se dezbată și, în cele din urmă, să se aleagă candidatura), bugetele participative (unde se fac propuneri, a apreciat din punct de vedere economic şi a votat cu banii disponibili), un proces de planificare strategică; elaborarea în colaborare a unui regulament sau normă, conceperea unui spațiu urban sau elaborarea unui plan de politică publică.</p>\n"
|
313
314
|
title: Ce este un proces participativ?
|
314
315
|
menu:
|
315
|
-
processes: Procese
|
316
|
+
processes: Procese participative
|
316
317
|
metrics:
|
317
318
|
participatory_processes:
|
318
319
|
description: Numărul de procese participative în această organizație
|
@@ -320,7 +321,7 @@ ro:
|
|
320
321
|
title: Procese participative
|
321
322
|
participatory_process:
|
322
323
|
show:
|
323
|
-
related_assemblies:
|
324
|
+
related_assemblies: Organizații relaționate
|
324
325
|
participatory_process_groups:
|
325
326
|
content_blocks:
|
326
327
|
html_1:
|
@@ -406,6 +407,7 @@ ro:
|
|
406
407
|
more_information: Mai multe informații
|
407
408
|
participate: Participă
|
408
409
|
participate_in: Participă în procesul %{resource_name}
|
410
|
+
processes_button_title: Link către pagina Proceselor care afișează toate procesele
|
409
411
|
see_all_processes: Vezi toate procesele
|
410
412
|
participatory_process_steps:
|
411
413
|
index:
|
@@ -442,7 +444,7 @@ ro:
|
|
442
444
|
index:
|
443
445
|
loading: Se încarcă rezultatele...
|
444
446
|
show:
|
445
|
-
area:
|
447
|
+
area: Zonă
|
446
448
|
belongs_to_group: Acest proces aparține lui
|
447
449
|
dates: Date
|
448
450
|
developer_group: Grup promotor
|
@@ -452,29 +454,12 @@ ro:
|
|
452
454
|
participatory_structure: Cum se decide
|
453
455
|
private_space: Acesta este un proces privat
|
454
456
|
related_processes: Procese conexe
|
455
|
-
scope: Domeniu
|
457
|
+
scope: Domeniu de interes
|
456
458
|
start_date: Data de început
|
457
459
|
target: Cine participă
|
458
460
|
unspecified: Nu este specificat
|
459
|
-
|
460
|
-
|
461
|
-
comments_count: Comentarii
|
462
|
-
debates_count: Dezbateri
|
463
|
-
endorsements_count: Susținători
|
464
|
-
followers_count: Urmăritori
|
465
|
-
headline: Statistici
|
466
|
-
meetings_count: Întâlniri
|
467
|
-
no_stats: Încă nu există statistici.
|
468
|
-
orders_count: Suportă
|
469
|
-
pages_count: Pagini
|
470
|
-
participants_count: Participanți
|
471
|
-
processes_count: Procese participative
|
472
|
-
projects_count: Proiecte
|
473
|
-
proposals_count: Propuneri
|
474
|
-
results_count: Rezultate
|
475
|
-
supports_count: Suportă
|
476
|
-
surveys_count: Chestionare
|
477
|
-
users_count: Participanți
|
461
|
+
statistics:
|
462
|
+
processes_count: Procese participative
|
478
463
|
layouts:
|
479
464
|
decidim:
|
480
465
|
participatory_process_groups:
|
data/config/locales/ru.yml
CHANGED
@@ -334,23 +334,6 @@ ru:
|
|
334
334
|
start_date: Дата начала
|
335
335
|
target: Кто участвует
|
336
336
|
unspecified: Не указано
|
337
|
-
statistics:
|
338
|
-
answers_count: Ответов
|
339
|
-
comments_count: Комментариев
|
340
|
-
debates_count: Обсуждений
|
341
|
-
endorsements_count: Выражений поддержки
|
342
|
-
headline: Деятельность
|
343
|
-
meetings_count: Встреч
|
344
|
-
orders_count: Голосов
|
345
|
-
pages_count: Страниц
|
346
|
-
participants_count: Участников
|
347
|
-
processes_count: Движения
|
348
|
-
projects_count: Проектов
|
349
|
-
proposals_count: Предложений
|
350
|
-
results_count: Итогов
|
351
|
-
supports_count: Голосов
|
352
|
-
surveys_count: Опросов
|
353
|
-
users_count: Участников
|
354
337
|
layouts:
|
355
338
|
decidim:
|
356
339
|
participatory_process_groups:
|
data/config/locales/sk.yml
CHANGED
@@ -399,25 +399,6 @@ sk:
|
|
399
399
|
start_date: Dátum začatia
|
400
400
|
target: Kto sa zúčastňuje
|
401
401
|
unspecified: Nešpecifikované
|
402
|
-
statistics:
|
403
|
-
answers_count: Odpovede
|
404
|
-
comments_count: Komentáre
|
405
|
-
debates_count: Debaty
|
406
|
-
endorsements_count: Schválenie
|
407
|
-
followers_count: Sledujúci
|
408
|
-
headline: Štatistiky
|
409
|
-
meetings_count: Stretnutie
|
410
|
-
no_stats: Zatiaľ nie sú žiadne štatistiky.
|
411
|
-
orders_count: Hlasy
|
412
|
-
pages_count: Stránky
|
413
|
-
participants_count: Účastníci
|
414
|
-
processes_count: Procesy
|
415
|
-
projects_count: Projekty
|
416
|
-
proposals_count: Návrhy
|
417
|
-
results_count: Výsledok
|
418
|
-
supports_count: Hlasy
|
419
|
-
surveys_count: Prieskumy
|
420
|
-
users_count: Účastníci
|
421
402
|
layouts:
|
422
403
|
decidim:
|
423
404
|
participatory_process_groups:
|
data/config/locales/sr-CS.yml
CHANGED
data/config/locales/sv.yml
CHANGED
@@ -37,8 +37,12 @@ sv:
|
|
37
37
|
weight: Vikt
|
38
38
|
participatory_process_group:
|
39
39
|
description: Beskrivning
|
40
|
+
group_url: Webbplats
|
41
|
+
hashtag: Hashtag
|
40
42
|
hero_image: Bild
|
41
43
|
participatory_process_ids: Relaterade dialoger
|
44
|
+
participatory_scope: Vad som bestäms
|
45
|
+
title: Titel
|
42
46
|
participatory_process_step:
|
43
47
|
cta_path: Uppmaningens sökväg
|
44
48
|
cta_text: Uppmaningens text
|
@@ -94,6 +98,9 @@ sv:
|
|
94
98
|
unpublish: Avpublicera
|
95
99
|
menu:
|
96
100
|
participatory_process_groups: Dialoggrupper
|
101
|
+
participatory_process_groups_submenu:
|
102
|
+
info: Info
|
103
|
+
landing_page: Landningssida
|
97
104
|
participatory_processes: Dialoger
|
98
105
|
participatory_processes_submenu:
|
99
106
|
attachment_collections: Mappar
|
@@ -116,6 +123,8 @@ sv:
|
|
116
123
|
title: Titel
|
117
124
|
name: Dialog
|
118
125
|
participatory_process_group:
|
126
|
+
fields:
|
127
|
+
title: Titel
|
119
128
|
name: Dialoggrupp
|
120
129
|
participatory_process_step:
|
121
130
|
fields:
|
@@ -143,6 +152,9 @@ sv:
|
|
143
152
|
copy: Kopiera
|
144
153
|
select: Välj vilka data som du vill duplicera
|
145
154
|
title: Duplicera dialog
|
155
|
+
participatory_process_group_landing_page_content_blocks:
|
156
|
+
edit:
|
157
|
+
update: Uppdatera
|
146
158
|
participatory_process_groups:
|
147
159
|
destroy:
|
148
160
|
error: Det gick inte att radera dialoggruppen.
|
@@ -300,10 +312,28 @@ sv:
|
|
300
312
|
related_assemblies: Relaterade sammankomster
|
301
313
|
participatory_process_groups:
|
302
314
|
content_blocks:
|
315
|
+
html_1:
|
316
|
+
name: Första HTML-block
|
317
|
+
html_2:
|
318
|
+
name: Andra HTML-block
|
319
|
+
html_3:
|
320
|
+
name: Tredje HTML-block
|
321
|
+
metadata:
|
322
|
+
developer_group: Annonserad av
|
323
|
+
name: Metadata
|
324
|
+
participatory_scope: Vad som bestäms
|
325
|
+
participatory_structure: Hur det bestäms
|
326
|
+
target: Vem deltar
|
303
327
|
participatory_processes:
|
304
328
|
name: Dialoger
|
305
329
|
stats:
|
306
330
|
name: Statistik
|
331
|
+
title:
|
332
|
+
meta_scope: Omfång
|
333
|
+
name: Titel, beskrivning och hashtag
|
334
|
+
participatory_processes:
|
335
|
+
one: 1 dialog
|
336
|
+
other: "%{count} dialoger"
|
307
337
|
show:
|
308
338
|
title: Dialoggrupper
|
309
339
|
participatory_process_steps:
|
@@ -321,6 +351,11 @@ sv:
|
|
321
351
|
participatory_process_copies:
|
322
352
|
form:
|
323
353
|
slug_help: 'URL-slugs används till att generera de URL:er som pekar på processen. Använd bara bokstäver, siffror och bindestreck, och de måste börja med en bokstav. Exempel: %{url}'
|
354
|
+
participatory_process_groups:
|
355
|
+
form:
|
356
|
+
metadata: Metadata
|
357
|
+
title: Allmän information
|
358
|
+
visibility: Synlighet
|
324
359
|
participatory_process_imports:
|
325
360
|
form:
|
326
361
|
document_legend: Lägg till ett dokument
|
@@ -405,25 +440,8 @@ sv:
|
|
405
440
|
start_date: Startdatum
|
406
441
|
target: Vilka deltar
|
407
442
|
unspecified: Ej angivet
|
408
|
-
|
409
|
-
|
410
|
-
comments_count: Kommentarer
|
411
|
-
debates_count: Debatter
|
412
|
-
endorsements_count: Underskrifter
|
413
|
-
followers_count: Följare
|
414
|
-
headline: Statistik
|
415
|
-
meetings_count: Möten
|
416
|
-
no_stats: Det finns ingen statistik ännu.
|
417
|
-
orders_count: Stöd
|
418
|
-
pages_count: Sidor
|
419
|
-
participants_count: Deltagare
|
420
|
-
processes_count: Dialoger
|
421
|
-
projects_count: Projekt
|
422
|
-
proposals_count: Förslag
|
423
|
-
results_count: Resultat
|
424
|
-
supports_count: Stöd
|
425
|
-
surveys_count: Undersökningar
|
426
|
-
users_count: Deltagare
|
443
|
+
statistics:
|
444
|
+
processes_count: Dialoger
|
427
445
|
layouts:
|
428
446
|
decidim:
|
429
447
|
participatory_process_groups:
|
@@ -450,6 +468,8 @@ sv:
|
|
450
468
|
more_info_about: Mer information om dialogen %{resource_name}
|
451
469
|
take_part: Delta
|
452
470
|
take_part_in: Delta i dialogen %{resource_name}
|
471
|
+
promoted_process_group:
|
472
|
+
more_info: Mer information
|
453
473
|
process_header_steps:
|
454
474
|
step: Steg %{current} av %{total}
|
455
475
|
view_steps: Visa steg
|
data/config/locales/tr-TR.yml
CHANGED
@@ -335,7 +335,7 @@ tr:
|
|
335
335
|
participatory_processes:
|
336
336
|
name: Katılımcı süreçleri
|
337
337
|
stats:
|
338
|
-
name:
|
338
|
+
name: İstatistikler
|
339
339
|
title:
|
340
340
|
meta_scope: Kapsam
|
341
341
|
name: Başlık, açıklama ve etiket
|
@@ -448,25 +448,6 @@ tr:
|
|
448
448
|
start_date: Başlangıç tarihi
|
449
449
|
target: Kimler katılır
|
450
450
|
unspecified: Belirtilmemiş
|
451
|
-
statistics:
|
452
|
-
answers_count: Cevaplar
|
453
|
-
comments_count: Yorumlar
|
454
|
-
debates_count: Tartışmalar
|
455
|
-
endorsements_count: Cirolar
|
456
|
-
followers_count: Takipçiler
|
457
|
-
headline: Aktivite
|
458
|
-
meetings_count: Toplantılar
|
459
|
-
no_stats: Henüz canlı istatistikler yok.
|
460
|
-
orders_count: oy
|
461
|
-
pages_count: Sayfalar
|
462
|
-
participants_count: Katılımcılar
|
463
|
-
processes_count: Süreçler
|
464
|
-
projects_count: Projeler
|
465
|
-
proposals_count: Teklif
|
466
|
-
results_count: Sonuçlar
|
467
|
-
supports_count: oy
|
468
|
-
surveys_count: Anketler
|
469
|
-
users_count: Katılımcılar
|
470
451
|
layouts:
|
471
452
|
decidim:
|
472
453
|
participatory_process_groups:
|
data/config/locales/uk.yml
CHANGED
@@ -334,23 +334,6 @@ uk:
|
|
334
334
|
start_date: Дата початку
|
335
335
|
target: Хто бере участь
|
336
336
|
unspecified: Не вказано
|
337
|
-
statistics:
|
338
|
-
answers_count: Відповідей
|
339
|
-
comments_count: Коментарів
|
340
|
-
debates_count: Обговорень
|
341
|
-
endorsements_count: Проявів підтримки
|
342
|
-
headline: Діяльність
|
343
|
-
meetings_count: Зустрічей
|
344
|
-
orders_count: Голосів
|
345
|
-
pages_count: Сторінок
|
346
|
-
participants_count: Учасників
|
347
|
-
processes_count: Рухи
|
348
|
-
projects_count: Проектів
|
349
|
-
proposals_count: Пропозицій
|
350
|
-
results_count: Підсумків
|
351
|
-
supports_count: Голосів
|
352
|
-
surveys_count: Опитувань
|
353
|
-
users_count: Учасників
|
354
337
|
layouts:
|
355
338
|
decidim:
|
356
339
|
participatory_process_groups:
|
data/config/locales/zh-CN.yml
CHANGED
@@ -391,25 +391,6 @@ zh-CN:
|
|
391
391
|
start_date: 开始日期
|
392
392
|
target: 谁参与
|
393
393
|
unspecified: 未指定
|
394
|
-
statistics:
|
395
|
-
answers_count: 答案
|
396
|
-
comments_count: 评论
|
397
|
-
debates_count: 辩论
|
398
|
-
endorsements_count: 授权
|
399
|
-
followers_count: 关注者
|
400
|
-
headline: 统计
|
401
|
-
meetings_count: 会议
|
402
|
-
no_stats: 尚无统计数据。
|
403
|
-
orders_count: 支持
|
404
|
-
pages_count: 页 次
|
405
|
-
participants_count: 参加者
|
406
|
-
processes_count: 进程
|
407
|
-
projects_count: 项目
|
408
|
-
proposals_count: 建议
|
409
|
-
results_count: 成果
|
410
|
-
supports_count: 支持
|
411
|
-
surveys_count: 调查
|
412
|
-
users_count: 参加者
|
413
394
|
layouts:
|
414
395
|
decidim:
|
415
396
|
participatory_process_groups:
|
@@ -15,14 +15,11 @@ class FixAttachmentsTitles < ActiveRecord::Migration[5.2]
|
|
15
15
|
Decidim.default_locale
|
16
16
|
|
17
17
|
# rubocop:disable Rails/SkipsModelValidations
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
locale => attachment.description
|
24
|
-
}
|
25
|
-
)
|
18
|
+
values = {}
|
19
|
+
values[:title] = { locale => attachment.title } unless attachment.title.is_a?(Hash)
|
20
|
+
values[:description] = { locale => attachment.description } unless attachment.description.is_a?(Hash)
|
21
|
+
|
22
|
+
attachment.update_columns(values)
|
26
23
|
# rubocop:enable Rails/SkipsModelValidations
|
27
24
|
end
|
28
25
|
end
|
@@ -12,6 +12,10 @@ module Decidim
|
|
12
12
|
field :participatory_processes, [Decidim::ParticipatoryProcesses::ParticipatoryProcessType, { null: true }],
|
13
13
|
description: "Lists all the participatory processes belonging to this group", null: false
|
14
14
|
field :hero_image, GraphQL::Types::String, "The hero image for this participatory process group", null: true
|
15
|
+
|
16
|
+
def hero_image
|
17
|
+
object.attached_uploader(:hero_image).path
|
18
|
+
end
|
15
19
|
end
|
16
20
|
end
|
17
21
|
end
|
@@ -8,6 +8,7 @@ module Decidim
|
|
8
8
|
implements Decidim::Core::ParticipatorySpaceResourceableInterface
|
9
9
|
implements Decidim::Core::ScopableInterface
|
10
10
|
implements Decidim::Core::AttachableInterface
|
11
|
+
implements Decidim::Core::CategoriesContainerInterface
|
11
12
|
|
12
13
|
description "A participatory process"
|
13
14
|
|
@@ -40,11 +41,18 @@ module Decidim
|
|
40
41
|
|
41
42
|
field :reference, GraphQL::Types::String, "Reference prefix for this participatory process", null: true
|
42
43
|
field :steps, [Decidim::ParticipatoryProcesses::ParticipatoryProcessStepType, { null: true }], "All the steps of this process.", null: false
|
43
|
-
field :categories, [Decidim::Core::CategoryType, { null: true }], "Categories for this participatory process", null: false
|
44
44
|
|
45
45
|
field :participatory_process_group, Decidim::ParticipatoryProcesses::ParticipatoryProcessGroupType,
|
46
46
|
null: true,
|
47
47
|
description: "The participatory process group in which this process belong to"
|
48
|
+
|
49
|
+
def banner_image
|
50
|
+
object.attached_uploader(:banner_image).path
|
51
|
+
end
|
52
|
+
|
53
|
+
def hero_image
|
54
|
+
object.attached_uploader(:hero_image).path
|
55
|
+
end
|
48
56
|
end
|
49
57
|
end
|
50
58
|
end
|
@@ -89,60 +89,142 @@ module Decidim
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
initializer "decidim_participatory_processes.
|
93
|
-
|
92
|
+
initializer "decidim_participatory_processes.admin_menu" do
|
93
|
+
Decidim.menu :admin_menu do |menu|
|
94
|
+
menu.add_item :participatory_processes,
|
95
|
+
I18n.t("menu.participatory_processes", scope: "decidim.admin"),
|
96
|
+
decidim_admin_participatory_processes.participatory_processes_path,
|
97
|
+
icon_name: "target",
|
98
|
+
position: 2,
|
99
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_processes_path, :inclusive) ||
|
100
|
+
is_active_link?(decidim_admin_participatory_processes.participatory_process_groups_path, :inclusive),
|
101
|
+
if: allowed_to?(:enter, :space_area, space_name: :processes) || allowed_to?(:enter, :space_area, space_name: :process_groups)
|
102
|
+
end
|
94
103
|
end
|
95
104
|
|
96
|
-
initializer "decidim_participatory_processes.
|
97
|
-
|
98
|
-
|
105
|
+
initializer "decidim_participatory_processes.admin_participatory_processes_menu" do
|
106
|
+
Decidim.menu :admin_participatory_processes_menu do |menu|
|
107
|
+
menu.add_item :participatory_processes,
|
108
|
+
I18n.t("menu.participatory_processes", scope: "decidim.admin"),
|
109
|
+
decidim_admin_participatory_processes.participatory_processes_path,
|
110
|
+
position: 1,
|
111
|
+
if: allowed_to?(:enter, :space_area, space_name: :processes),
|
112
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_processes_path)
|
113
|
+
|
114
|
+
menu.add_item :participatory_process_groups,
|
115
|
+
I18n.t("menu.participatory_process_groups", scope: "decidim.admin"),
|
116
|
+
decidim_admin_participatory_processes.participatory_process_groups_path,
|
117
|
+
position: 2,
|
118
|
+
if: allowed_to?(:enter, :space_area, space_name: :process_groups),
|
119
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_process_groups_path)
|
99
120
|
end
|
100
121
|
end
|
101
122
|
|
102
|
-
initializer "decidim_participatory_processes.
|
103
|
-
Decidim.menu :
|
104
|
-
menu.
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
123
|
+
initializer "decidim_participatory_processes.admin_process_attachments_menu" do
|
124
|
+
Decidim.menu :admin_participatory_process_attachments_menu do |menu|
|
125
|
+
menu.add_item :participatory_process_attachment_collections,
|
126
|
+
I18n.t("attachment_collections", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
127
|
+
decidim_admin_participatory_processes.participatory_process_attachment_collections_path(current_participatory_space),
|
128
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_process_attachment_collections_path(current_participatory_space)),
|
129
|
+
if: allowed_to?(:read, :attachment_collection)
|
130
|
+
|
131
|
+
menu.add_item :participatory_process_attachments,
|
132
|
+
I18n.t("attachment_files", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
133
|
+
decidim_admin_participatory_processes.participatory_process_attachments_path(current_participatory_space),
|
134
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_process_attachments_path(current_participatory_space)),
|
135
|
+
if: allowed_to?(:read, :attachment)
|
111
136
|
end
|
112
137
|
end
|
113
138
|
|
114
|
-
initializer "decidim_participatory_processes.
|
115
|
-
Decidim.menu :
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
139
|
+
initializer "decidim_participatory_processes.admin_process_components_menu" do
|
140
|
+
Decidim.menu :admin_participatory_process_components_menu do |menu|
|
141
|
+
current_participatory_space.components.each do |component|
|
142
|
+
caption = translated_attribute(component.name)
|
143
|
+
if component.primary_stat.present?
|
144
|
+
caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter")
|
145
|
+
end
|
146
|
+
|
147
|
+
menu.add_item [component.manifest_name, component.id].join("_"),
|
148
|
+
caption.html_safe,
|
149
|
+
manage_component_path(component),
|
150
|
+
active: is_active_link?(manage_component_path(component)) ||
|
151
|
+
is_active_link?(decidim_admin_participatory_processes.edit_component_path(current_participatory_space, component)) ||
|
152
|
+
is_active_link?(decidim_admin_participatory_processes.edit_component_permissions_path(current_participatory_space, component)) ||
|
153
|
+
participatory_space_active_link?(component),
|
154
|
+
if: component.manifest.admin_engine && user_role_config.component_is_accessible?(component.manifest_name)
|
155
|
+
end
|
127
156
|
end
|
128
157
|
end
|
158
|
+
|
129
159
|
initializer "decidim_participatory_processes.admin_process_group_menu" do
|
130
160
|
Decidim.menu :admin_participatory_process_menu do |menu|
|
161
|
+
menu.add_item :edit_participatory_process,
|
162
|
+
I18n.t("info", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
163
|
+
decidim_admin_participatory_processes.edit_participatory_process_path(current_participatory_space),
|
164
|
+
active: is_active_link?(decidim_admin_participatory_processes.edit_participatory_process_path(current_participatory_space)),
|
165
|
+
if: allowed_to?(:update, :process, process: current_participatory_space)
|
166
|
+
|
167
|
+
menu.add_item :participatory_process_steps,
|
168
|
+
I18n.t("steps", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
169
|
+
decidim_admin_participatory_processes.participatory_process_steps_path(current_participatory_space),
|
170
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_process_steps_path(current_participatory_space)),
|
171
|
+
if: allowed_to?(:read, :process_step)
|
172
|
+
|
173
|
+
menu.add_item :components,
|
174
|
+
I18n.t("components", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
175
|
+
decidim_admin_participatory_processes.components_path(current_participatory_space),
|
176
|
+
active: is_active_link?(decidim_admin_participatory_processes.components_path(current_participatory_space)),
|
177
|
+
if: allowed_to?(:read, :component),
|
178
|
+
submenu: { target_menu: :admin_participatory_process_components_menu, options: { container_options: { id: "components-list" } } }
|
179
|
+
|
180
|
+
menu.add_item :categories,
|
181
|
+
I18n.t("categories", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
182
|
+
decidim_admin_participatory_processes.categories_path(current_participatory_space),
|
183
|
+
active: is_active_link?(decidim_admin_participatory_processes.categories_path(current_participatory_space)),
|
184
|
+
if: allowed_to?(:read, :category)
|
185
|
+
|
186
|
+
menu.add_item :attachments,
|
187
|
+
I18n.t("attachments", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
188
|
+
"#",
|
189
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_process_attachment_collections_path(current_participatory_space)) ||
|
190
|
+
is_active_link?(decidim_admin_participatory_processes.participatory_process_attachments_path(current_participatory_space)),
|
191
|
+
if: allowed_to?(:read, :attachment_collection) || allowed_to?(:read, :attachment),
|
192
|
+
submenu: { target_menu: :admin_participatory_process_attachments_menu }
|
193
|
+
|
194
|
+
menu.add_item :participatory_process_user_roles,
|
195
|
+
I18n.t("process_admins", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
196
|
+
decidim_admin_participatory_processes.participatory_process_user_roles_path(current_participatory_space),
|
197
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_process_user_roles_path(current_participatory_space)),
|
198
|
+
if: allowed_to?(:read, :process_user_role)
|
199
|
+
|
200
|
+
menu.add_item :participatory_space_private_users,
|
201
|
+
I18n.t("private_users", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
202
|
+
decidim_admin_participatory_processes.participatory_space_private_users_path(current_participatory_space),
|
203
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_space_private_users_path(current_participatory_space)),
|
204
|
+
if: allowed_to?(:read, :space_private_user)
|
205
|
+
|
206
|
+
menu.add_item :moderations,
|
207
|
+
I18n.t("moderations", scope: "decidim.admin.menu.participatory_processes_submenu"),
|
208
|
+
decidim_admin_participatory_processes.moderations_path(current_participatory_space),
|
209
|
+
active: is_active_link?(decidim_admin_participatory_processes.moderations_path(current_participatory_space)),
|
210
|
+
if: allowed_to?(:read, :moderation)
|
131
211
|
end
|
132
212
|
end
|
133
213
|
|
134
214
|
initializer "decidim_participatory_processes.admin_process_group_menu" do
|
135
215
|
Decidim.menu :admin_participatory_process_group_menu do |menu|
|
136
|
-
menu.
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
216
|
+
menu.add_item :edit_participatory_process_group,
|
217
|
+
I18n.t("info", scope: "decidim.admin.menu.participatory_process_groups_submenu"),
|
218
|
+
decidim_admin_participatory_processes.edit_participatory_process_group_path(participatory_process_group),
|
219
|
+
position: 1,
|
220
|
+
if: allowed_to?(:update, :process_group, process_group: participatory_process_group),
|
221
|
+
active: is_active_link?(decidim_admin_participatory_processes.edit_participatory_process_group_path(participatory_process_group))
|
222
|
+
menu.add_item :edit_participatory_process_group_landing_page,
|
223
|
+
I18n.t("landing_page", scope: "decidim.admin.menu.participatory_process_groups_submenu"),
|
224
|
+
decidim_admin_participatory_processes.edit_participatory_process_group_landing_page_path(participatory_process_group),
|
225
|
+
position: 2,
|
226
|
+
if: allowed_to?(:update, :process_group, process_group: participatory_process_group),
|
227
|
+
active: is_active_link?(decidim_admin_participatory_processes.participatory_process_group_landing_page_path(participatory_process_group))
|
146
228
|
end
|
147
229
|
end
|
148
230
|
end
|