decidim-initiatives 0.26.2 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +1 -1
  4. data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +7 -3
  5. data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +3 -3
  6. data/app/commands/decidim/initiatives/admin/publish_initiative.rb +1 -1
  7. data/app/commands/decidim/initiatives/admin/send_initiative_to_technical_validation.rb +2 -2
  8. data/app/commands/decidim/initiatives/admin/unpublish_initiative.rb +1 -1
  9. data/app/commands/decidim/initiatives/admin/update_initiative.rb +1 -1
  10. data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +1 -1
  11. data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +19 -14
  12. data/app/commands/decidim/initiatives/admin/update_initiative_type_scope.rb +1 -1
  13. data/app/commands/decidim/initiatives/admin/update_initiatives_settings.rb +46 -0
  14. data/app/commands/decidim/initiatives/approve_membership_request.rb +1 -1
  15. data/app/commands/decidim/initiatives/create_initiative.rb +1 -1
  16. data/app/commands/decidim/initiatives/revoke_membership_request.rb +1 -1
  17. data/app/commands/decidim/initiatives/send_initiative_to_technical_validation.rb +2 -2
  18. data/app/commands/decidim/initiatives/spawn_committee_request.rb +1 -1
  19. data/app/commands/decidim/initiatives/unvote_initiative.rb +1 -1
  20. data/app/commands/decidim/initiatives/update_initiative.rb +1 -1
  21. data/app/commands/decidim/initiatives/validate_mobile_phone.rb +1 -1
  22. data/app/commands/decidim/initiatives/validate_sms_code.rb +1 -1
  23. data/app/commands/decidim/initiatives/vote_initiative.rb +2 -6
  24. data/app/controllers/concerns/decidim/initiatives/orderable.rb +8 -0
  25. data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +3 -2
  26. data/app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb +49 -0
  27. data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +6 -3
  28. data/app/controllers/decidim/initiatives/committee_requests_controller.rb +1 -1
  29. data/app/controllers/decidim/initiatives/create_initiative_controller.rb +2 -2
  30. data/app/controllers/decidim/initiatives/initiatives_controller.rb +18 -22
  31. data/app/forms/decidim/initiatives/admin/initiative_form.rb +4 -4
  32. data/app/forms/decidim/initiatives/admin/initiative_type_form.rb +2 -1
  33. data/app/forms/decidim/initiatives/admin/initiatives_settings_form.rb +14 -0
  34. data/app/forms/decidim/initiatives/vote_form.rb +0 -3
  35. data/app/helpers/decidim/initiatives/create_initiative_helper.rb +3 -3
  36. data/app/helpers/decidim/initiatives/initiative_helper.rb +6 -4
  37. data/app/mailers/decidim/initiatives/initiatives_mailer.rb +2 -2
  38. data/app/models/decidim/initiative.rb +60 -9
  39. data/app/models/decidim/initiatives_settings.rb +17 -0
  40. data/app/models/decidim/initiatives_type.rb +5 -0
  41. data/app/permissions/decidim/initiatives/admin/permissions.rb +10 -3
  42. data/app/permissions/decidim/initiatives/permissions.rb +1 -1
  43. data/app/presenters/decidim/initiatives/admin_log/initiatives_settings_presenter.rb +27 -0
  44. data/app/presenters/decidim/initiatives/admin_log/initiatives_type_presenter.rb +45 -0
  45. data/app/presenters/decidim/initiatives/initiative_stats_presenter.rb +4 -2
  46. data/app/queries/decidim/initiatives/admin/admin_users.rb +1 -1
  47. data/app/queries/decidim/initiatives/admin/manageable_initiatives.rb +1 -1
  48. data/app/queries/decidim/initiatives/freetext_initiative_types.rb +1 -1
  49. data/app/queries/decidim/initiatives/initiative_types.rb +1 -1
  50. data/app/queries/decidim/initiatives/initiatives_created.rb +1 -1
  51. data/app/queries/decidim/initiatives/initiatives_promoted.rb +1 -1
  52. data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +1 -1
  53. data/app/queries/decidim/initiatives/outdated_validating_initiatives.rb +1 -1
  54. data/app/queries/decidim/initiatives/similar_initiatives.rb +1 -1
  55. data/app/queries/decidim/initiatives/support_period_finished_initiatives.rb +1 -1
  56. data/app/queries/decidim/initiatives/user_authorizations.rb +1 -1
  57. data/app/services/decidim/initiatives/initiative_search.rb +11 -102
  58. data/app/services/decidim/initiatives/pdf_signature_example.rb +15 -16
  59. data/app/services/decidim/initiatives/status_change_notifier.rb +1 -1
  60. data/app/views/decidim/initiatives/admin/initiatives_settings/_form.html.erb +10 -0
  61. data/app/views/decidim/initiatives/admin/initiatives_settings/edit.html.erb +6 -0
  62. data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +4 -0
  63. data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +3 -1
  64. data/app/views/decidim/initiatives/initiatives/_filters.html.erb +5 -5
  65. data/app/views/decidim/initiatives/initiatives/_form.html.erb +3 -1
  66. data/app/views/decidim/initiatives/initiatives/show.html.erb +4 -2
  67. data/app/views/layouts/decidim/_initiative_header_steps.html.erb +3 -1
  68. data/app/views/layouts/decidim/initiative_creation.html.erb +4 -1
  69. data/app/views/layouts/decidim/initiative_signature_creation.html.erb +4 -1
  70. data/config/locales/am-ET.yml +1 -0
  71. data/config/locales/ar.yml +1 -1
  72. data/config/locales/bg.yml +1 -0
  73. data/config/locales/ca.yml +26 -1
  74. data/config/locales/cs.yml +26 -1
  75. data/config/locales/da.yml +1 -0
  76. data/config/locales/de.yml +1 -0
  77. data/config/locales/el.yml +1 -0
  78. data/config/locales/en.yml +25 -1
  79. data/config/locales/eo.yml +1 -0
  80. data/config/locales/es-MX.yml +26 -1
  81. data/config/locales/es-PY.yml +26 -1
  82. data/config/locales/es.yml +26 -1
  83. data/config/locales/et.yml +1 -0
  84. data/config/locales/eu.yml +1 -0
  85. data/config/locales/fi-plain.yml +25 -0
  86. data/config/locales/fi.yml +25 -0
  87. data/config/locales/fr-CA.yml +10 -1
  88. data/config/locales/fr.yml +10 -1
  89. data/config/locales/ga-IE.yml +1 -0
  90. data/config/locales/gl.yml +1 -0
  91. data/config/locales/hr.yml +1 -0
  92. data/config/locales/hu.yml +111 -0
  93. data/config/locales/id-ID.yml +1 -0
  94. data/config/locales/is-IS.yml +2 -1
  95. data/config/locales/it.yml +1 -0
  96. data/config/locales/ja.yml +26 -1
  97. data/config/locales/ko.yml +1 -0
  98. data/config/locales/lb.yml +1 -0
  99. data/config/locales/lt.yml +1 -0
  100. data/config/locales/lv.yml +1 -0
  101. data/config/locales/mt.yml +1 -0
  102. data/config/locales/nl.yml +1 -0
  103. data/config/locales/no.yml +1 -0
  104. data/config/locales/om-ET.yml +1 -0
  105. data/config/locales/pl.yml +1 -0
  106. data/config/locales/pt-BR.yml +2 -1
  107. data/config/locales/pt.yml +1 -0
  108. data/config/locales/ro-RO.yml +2 -0
  109. data/config/locales/ru.yml +1 -0
  110. data/config/locales/si-LK.yml +1 -0
  111. data/config/locales/sk.yml +1 -0
  112. data/config/locales/sl.yml +1 -0
  113. data/config/locales/so-SO.yml +1 -0
  114. data/config/locales/sr-CS.yml +1 -0
  115. data/config/locales/sv.yml +7 -0
  116. data/config/locales/sw-KE.yml +1 -0
  117. data/config/locales/ti-ER.yml +1 -0
  118. data/config/locales/tr-TR.yml +1 -0
  119. data/config/locales/uk.yml +1 -0
  120. data/config/locales/val-ES.yml +1 -0
  121. data/config/locales/vi.yml +1 -0
  122. data/config/locales/zh-CN.yml +1 -0
  123. data/config/locales/zh-TW.yml +1 -0
  124. data/db/migrate/20220518053612_add_comments_enabled_to_initiative_types.rb +7 -0
  125. data/db/migrate/20220527130640_create_decidim_initiatives_settings.rb +10 -0
  126. data/lib/decidim/initiatives/admin_engine.rb +16 -0
  127. data/lib/decidim/initiatives/participatory_space.rb +3 -3
  128. data/lib/decidim/initiatives/test/factories.rb +34 -1
  129. data/lib/decidim/initiatives/version.rb +1 -1
  130. data/lib/gem_overrides/origami/date.rb +47 -0
  131. metadata +28 -31
@@ -1,3 +1,4 @@
1
+ ---
1
2
  hu:
2
3
  activemodel:
3
4
  attributes:
@@ -5,6 +6,7 @@ hu:
5
6
  decidim_user_group_id: Szerző
6
7
  description: Leírás
7
8
  offline_votes: Támogatás szemtől szembe
9
+ offline_votes_for_scope: 'Személyesen aláírások erre: %{scope_name}'
8
10
  scope_id: Hatáskör
9
11
  signature_end_date: Az aláírásgyűjtési időszak vége
10
12
  signature_start_date: Az aláírásgyűjtési időszak kezdete
@@ -18,8 +20,12 @@ hu:
18
20
  initiatives_committee_member:
19
21
  user: Bizottsági tag
20
22
  initiatives_type:
23
+ area_enabled: Lehetővé teszi a szerzők számára, hogy kiválasszák a kezdeményezésük területét
24
+ attachments_enabled: Mellékletek engedélyezése
21
25
  banner_image: Banner kép
22
26
  collect_user_extra_fields: Személyes adatok gyűjtése az aláíráskor
27
+ comments_enabled: Hozzászólások engedélyezése
28
+ custom_signature_end_date_enabled: Lehetővé teszi a szerzők számára, hogy kiválasszák az aláírásgyűjtési időszak végét
23
29
  description: Leírás
24
30
  document_number_authorization_handler: A dokumentum számának ellenőrzésének engedélyezése a szavazatokon
25
31
  extra_fields_legal_information: Jogi információk a személyes adatok gyűjtéséről
@@ -38,6 +44,14 @@ hu:
38
44
  address: Lakcím
39
45
  id_document: Személyigazolvány
40
46
  name: Teljes név
47
+ errors:
48
+ models:
49
+ initiative:
50
+ attributes:
51
+ attachment:
52
+ file: A fájl érvénytelen
53
+ needs_to_be_reattached: Újra kell csatolni
54
+ title: A cím nem lehet üres
41
55
  activerecord:
42
56
  models:
43
57
  decidim/initiative:
@@ -68,16 +82,27 @@ hu:
68
82
  validating: Technikai érvényesítés
69
83
  type_id_eq:
70
84
  label: Típus
85
+ search_placeholder:
86
+ title_or_description_or_id_string_or_author_name_or_author_nickname_cont: Keresés a(z) %{collection} elemei között cím, leírás, azonosító vagy szerző alapján.
87
+ initiatives_settings:
88
+ update:
89
+ error: Hiba történt
90
+ success: A kezdeményezés frissítése sikeres volt
71
91
  menu:
92
+ attachments: Csatolmányok
93
+ committee_members: Bizottsági tagok
72
94
  components: Elemek
73
95
  information: Információ
74
96
  initiatives: Kezdeményezések
97
+ initiatives_settings: Beállítások
75
98
  initiatives_types: Kezdeményezések típusa
99
+ moderations: Moderálások
76
100
  models:
77
101
  initiatives:
78
102
  fields:
79
103
  created_at: 'Létrehozva:'
80
104
  id: ID
105
+ published_at: Publikálás ideje
81
106
  state: Állapot
82
107
  supports_count: Aláírások
83
108
  title: Kezdeményezések
@@ -110,11 +135,22 @@ hu:
110
135
  initiatives_types: Kezdeményezési típusai
111
136
  events:
112
137
  initiatives:
138
+ admin:
139
+ initiative_sent_to_technical_validation:
140
+ email_intro: A(z) „%{resource_title}” kezdeményezést elküldték technikai ellenőrzésre. Ellenőrizze <a href="%{admin_initiative_url}">az adminisztrációs panelen</a>
141
+ email_outro: Azért kapta ezt az értesítést, mert Ön a platform adminisztrátora.
142
+ email_subject: A(z) „%{resource_title}” kezdeményezést elküldték technikai ellenőrzésre.
143
+ notification_title: A(z) „%{resource_title}” kezdeményezést elküldték technikai ellenőrzésre. Ellenőrizze <a href="%{admin_initiative_path}">az adminisztrációs panelen</a>
113
144
  initiative_extended:
114
145
  email_intro: A(z) %{resource_title} kezdeményezés aláírásának határideje kitolódott!
115
146
  email_outro: 'Ezt az értesítést azért kaptad, mert ezt követed: "%{resource_title}". Az értesítéseket a következő linkre kattintva kapcsolhatod ki.'
116
147
  email_subject: Kezdeményezés aláírásának határideje kitolva!
117
148
  notification_title: A(z) <a href="%{resource_path}">%{resource_title}</a> kezdeményezés aláírásának határidejét kitolták.
149
+ initiative_sent_to_technical_validation:
150
+ email_intro: A(z) „%{resource_title}” kezdeményezést elküldték technikai ellenőrzésre. Ellenőrizze <a href="%{admin_initiative_url}">az adminisztrációs panelen</a>
151
+ email_outro: Ezt az értesítést kaptad, mert te vagy a platform adminja.
152
+ email_subject: A(z) „%{resource_title}” kezdeményezést elküldték technikai ellenőrzésre.
153
+ notification_title: A(z) „%{resource_title}” kezdeményezést elküldték technikai ellenőrzésre. Ellenőrizze <a href="%{admin_initiative_path}">az adminisztrációs panelen</a>
118
154
  milestone_completed:
119
155
  affected_user:
120
156
  email_intro: A %{resource_title} kezdeményezésed elérte az aláírások %{percentage}% -át!
@@ -126,6 +162,10 @@ hu:
126
162
  email_outro: Ezt az értesítést azért kaptad, mert követed ezt %{resource_title}. Leállíthathatod az értesítések fogadását az előző linkkel.
127
163
  email_subject: Új mérföldkő kész áll!
128
164
  notification_title: A(z) <a href="%{resource_path}">%{resource_title}</a> kezdeményezést már %{percentage}% aláírta.
165
+ support_threshold_reached:
166
+ email_intro: A(z) %{resource_title} kezdeményezés elérte a támogatási küszöböt
167
+ email_outro: Ezt az értesítést kaptad, mert te vagy a platform adminja.
168
+ email_subject: Támogatási küszöb elérve
129
169
  gamification:
130
170
  badges:
131
171
  initiatives:
@@ -170,10 +210,15 @@ hu:
170
210
  content_blocks:
171
211
  highlighted_initiatives:
172
212
  max_results: A megjelenítendő elemek maximális száma
213
+ order:
214
+ most_recent: Legfrissebb
215
+ exports:
216
+ initiatives: Kezdeményezések
173
217
  initiatives:
174
218
  edit:
175
219
  accept: Kezdeményezés elfogadása
176
220
  confirm: Biztos vagy benne?
221
+ confirm_send_to_technical_validation: Biztos vagy benne?
177
222
  discard: Kezdeményezés félrerakása
178
223
  export_pdf_signatures: Aláírások exportálása PDF-be
179
224
  export_votes: Exportálás támogatása
@@ -189,9 +234,23 @@ hu:
189
234
  actions_title: Művelet
190
235
  preview: Előnézet
191
236
  print: Nyomtatás
237
+ initiative_attachments:
238
+ documents: Dokumentumok
239
+ edit: Szerkeszt
240
+ new: Új
241
+ photos: Fotók
192
242
  update:
193
243
  error: Hiba történt
194
244
  success: Az állampolgári kezdeményezés frissítése sikeres
245
+ initiatives_settings:
246
+ edit:
247
+ update: Frissítés
248
+ form:
249
+ comments: Legtöbb hozzászólással
250
+ date: Legfrissebb
251
+ publication_date: Legfrissebben közzétett
252
+ random: Véletlenszerű
253
+ signatures: Legtöbb aláírással rendelkező
195
254
  initiatives_type_scopes:
196
255
  create:
197
256
  error: Hiba történt
@@ -222,6 +281,7 @@ hu:
222
281
  destroy: Törlés
223
282
  update: Frissítés
224
283
  form:
284
+ authorizations: Hitelesítési beállítások
225
285
  title: Általános információk
226
286
  initiative_type_scopes:
227
287
  title: Kezdeményezés típusának hatásköre
@@ -300,7 +360,9 @@ hu:
300
360
  email_subject: '%{author_nickname} támogatta a kezdeményezést'
301
361
  notification_title: 'A(z) <a href="%{resource_path}">%{resource_title}</a>kezdeményezést támogatta: <a href="%{author_path}">%{author_name} %{author_nickname}</a>.'
302
362
  form:
363
+ add_attachments: Dokumentumok
303
364
  attachment_legend: "(Opcionális) Csatolmány hozzáadása"
365
+ delete_attachment: Törlés
304
366
  index:
305
367
  title: Kezdeményezések
306
368
  initiative_signatures:
@@ -337,12 +399,20 @@ hu:
337
399
  hidden_authors_count:
338
400
  one: és további 1 személy
339
401
  other: és még %{count} ember
402
+ committee_members:
403
+ approve: Jóváhagy
404
+ confirm_revoke: Biztos vagy benne?
405
+ invite_to_committee_help: Ossza meg ezt a hivatkozást, hogy meghívjon más résztvevőket a támogatói bizottságba
406
+ no_members_yet: Nincsenek tagok a támogatói bizottságban
407
+ revoke: Visszavonás
408
+ title: Bizottsági tagok
340
409
  count:
341
410
  title:
342
411
  one: "%{count} kezdeményezést"
343
412
  other: "%{count} kezdeményezést"
344
413
  filters:
345
414
  any: Bármely
415
+ area: Terület
346
416
  author: Szerző
347
417
  myself: Kezdeményezéseim
348
418
  search: Keresés
@@ -355,6 +425,10 @@ hu:
355
425
  unfold: Kibont
356
426
  index_header:
357
427
  new_initiative: Új kezdeményezés
428
+ not_authorized:
429
+ close: Bezárás
430
+ explanation: Ha új kezdeményezést szeretne létrehozni, el kell végezni az Ön adatainak ellenőrzését.
431
+ title: Engedélyezés szükséges
358
432
  initiatives:
359
433
  closed_initiatives_warning: Jelenleg nincs nyitott találkozó, de itt megtalálhatod az összes zárt találkozó listáját.
360
434
  no_initiatives_warning: Egyik kezdeményezés sem felel meg a keresési feltételnek.
@@ -369,12 +443,30 @@ hu:
369
443
  most_voted: Legtöbb aláírás
370
444
  random: Véletlenszerű
371
445
  recent: Legutóbbi
446
+ recently_published: Legfrissebben közzétett
372
447
  print:
448
+ address: Cím
373
449
  city: Település
450
+ email: Email
451
+ full_name: Teljes név
452
+ id_number: ID Szám
453
+ initiative:
454
+ attachments: Csatolt dokumentáció (kérem minden dokumentum nevét írja meg lentebb)
455
+ description: 'Leírás:'
456
+ title: 'Cím:'
457
+ type: A kezdeményezés típusa
458
+ phone_number: Telefonszám
459
+ place_date: Hely, dátum
460
+ print: Nyomtatás
461
+ province: Megye
462
+ signature: Aláírás
374
463
  result:
375
464
  initiative_rejected_reason: A kezdeményezést a támogatás hiánya miatt elutasították.
376
465
  show:
466
+ edit: Szerkeszt
377
467
  follow_description: Értesítést kapjon, ha ebben a kezdeményezésben vannak hírek
468
+ offline_method: E kezdeményezés keretében csak személyes aláírásokat gyűjtenek.
469
+ send_to_technical_validation: Elküldés technikai ellenőrzésre
378
470
  signatures_count:
379
471
  one: " aláírás"
380
472
  other: " aláírások"
@@ -408,13 +500,32 @@ hu:
408
500
  highlighted_initiatives:
409
501
  active_initiatives: Aktív kezdeményezések
410
502
  see_all_initiatives: Összes kezdeményezés
503
+ show:
504
+ badge_name:
505
+ accepted: Elegendő aláírás
506
+ created: Létrehozva
507
+ discarded: Elvetve
508
+ published: Közzétéve
509
+ rejected: Nincs elegendő aláírás
510
+ validating: Technikai érvényesítés
511
+ signature_interval:
512
+ title: Az aláírásgyűjtési időszak
411
513
  states:
412
514
  accepted: Elfogadva
413
515
  expired: Lejárt
414
516
  unavailable_scope: Nem áll rendelkezésre
517
+ update:
518
+ error: Hiba történt
519
+ success: A kezdeményezés frissítése sikeres
520
+ versions:
521
+ shared:
522
+ back_to_resource: Vissza a kezdeményezéshez
415
523
  menu:
416
524
  initiatives: Kezdeményezések
417
525
  resources:
526
+ initiative:
527
+ actions:
528
+ comment: Megjegyzés
418
529
  initiatives_type:
419
530
  actions:
420
531
  title: Hozzászólások
@@ -1,3 +1,4 @@
1
+ ---
1
2
  id:
2
3
  activemodel:
3
4
  attributes:
@@ -1,4 +1,5 @@
1
- is-IS:
1
+ ---
2
+ is:
2
3
  activemodel:
3
4
  attributes:
4
5
  initiative:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  it:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ja:
2
3
  activemodel:
3
4
  attributes:
@@ -24,6 +25,7 @@ ja:
24
25
  banner_image: バナー画像
25
26
  child_scope_threshold_enabled: 下層スコープの署名を有効にする
26
27
  collect_user_extra_fields: 署名に参加者の個人データを収集する
28
+ comments_enabled: コメントを有効にする
27
29
  custom_signature_end_date_enabled: 著者が署名の収集期間の終わりを選択できるようにする
28
30
  description: 説明
29
31
  document_number_authorization_handler: 署名上のドキュメント番号を検証する権限
@@ -81,12 +83,17 @@ ja:
81
83
  label: タイプ
82
84
  search_placeholder:
83
85
  title_or_description_or_id_string_or_author_name_or_author_nickname_cont: '%{collection} をタイトル、説明、ID、または著者名で検索します。'
86
+ initiatives_settings:
87
+ update:
88
+ error: エラーが発生しました
89
+ success: イニシアチブの設定が正常に更新されました
84
90
  menu:
85
91
  attachments: 添付ファイル
86
92
  committee_members: 委員会メンバー
87
93
  components: コンポーネント
88
94
  information: 情報
89
95
  initiatives: イニシアチブ
96
+ initiatives_settings: 設定
90
97
  initiatives_types: イニシアチブ種別
91
98
  moderations: モデレーション
92
99
  models:
@@ -238,6 +245,16 @@ ja:
238
245
  update:
239
246
  error: エラーが発生しました
240
247
  success: イニシアチブが正常に更新されました
248
+ initiatives_settings:
249
+ edit:
250
+ update: 更新
251
+ form:
252
+ comments: コメント数の多い順
253
+ date: 新着順
254
+ publication_date: 公開日の新しい順
255
+ random: ランダム
256
+ signatures: 署名数順
257
+ title: イニシアチブの設定
241
258
  initiatives_type_scopes:
242
259
  create:
243
260
  error: エラーが発生しました
@@ -269,7 +286,7 @@ ja:
269
286
  update: 更新
270
287
  form:
271
288
  authorizations: 認証設定
272
- child_scope_threshold_enabled_help: "この設定では、対面での署名収集をサポートせず、サブスコープの署\n名フラグを有効にし、スコープとユーザーを関連付ける承認ハンドラと連携します。オーソリゼーションの設定で、下記のオーソリゼーションを必ず選択してください。これが機能するためには、1つのスコープ - N個のサブスコープというように、階層的に構成されている必要があります。この設定がどのように機能するかについては、 <a href=\"https://docs.decidim.org/en/admin/spaces/initiatives/\" target=\"_blank\">このリンク</a> を参照してください。"
289
+ child_scope_threshold_enabled_help: 'この設定フラグはオフライン投票をサポートしておらず、サブスコープを有効にし、スコープをユーザに関連付ける認証ハンドラで動作します。 認証の設定が間違っていないことを確認してください。正しく動作させるためには、スコープを 親1つにつき子N個が対応する階層構造で構成する必要があります。 この設定の仕組みについての詳細は、<a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">イニシアチブの管理者ドキュメント</a> を参照してください。'
273
290
  only_global_scope_enabled_help: '「下層スコープ署名」を有効にし、グローバルスコープを親スコープとして設定する場合、このフラグをチェックします。これを有効にすると、イニシアチブ作成ウィザードでイニシアチブ種別の選択がスキップされます。この設定の仕組みについての詳細は、<a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">このリンク</a> を参照してください。'
274
291
  options: オプション
275
292
  title: 一般情報
@@ -287,6 +304,12 @@ ja:
287
304
  send_to_technical_validation: "%{user_name} が %{resource_name} イニシアチブを技術的検証に提出しました"
288
305
  unpublish: "%{user_name} が %{resource_name} イニシアチブを破棄しました"
289
306
  update: "%{user_name} が %{resource_name} のイニシアチブを更新しました"
307
+ initiatives_settings:
308
+ update: "%{user_name} がイニシアチブの設定を更新しました"
309
+ initiatives_type:
310
+ create: "%{user_name} が %{resource_name} イニシアチブタイプを作成しました"
311
+ delete: "%{user_name} が %{resource_name} イニシアチブタイプを削除しました"
312
+ update: "%{user_name} は %{resource_name} イニシアチブタイプを更新しました"
290
313
  admin_states:
291
314
  accepted: 十分な署名
292
315
  created: 作成済み
@@ -557,6 +580,8 @@ ja:
557
580
  published: 公開済み
558
581
  rejected: 十分な署名がありません
559
582
  validating: 技術的検証
583
+ signature_interval:
584
+ title: 署名の収集期間
560
585
  states:
561
586
  accepted: 承認済み
562
587
  expired: 期限切れ
@@ -1 +1,2 @@
1
+ ---
1
2
  ko:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lb:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  lt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lv:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  mt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  nl:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  "no":
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  om:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pl:
2
3
  activemodel:
3
4
  attributes:
@@ -1,4 +1,5 @@
1
- pt-BR:
1
+ ---
2
+ pt:
2
3
  activemodel:
3
4
  attributes:
4
5
  initiative:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pt:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ro:
2
3
  activemodel:
3
4
  attributes:
@@ -24,6 +25,7 @@ ro:
24
25
  banner_image: Imagine banner
25
26
  child_scope_threshold_enabled: Activează semnăturile pentru domeniul de interes copil
26
27
  collect_user_extra_fields: Colectarea datelor cu caracter personal ale participantului la semnătură
28
+ comments_enabled: Comentarii activate
27
29
  custom_signature_end_date_enabled: Permite autorilor să aleagă sfârșitul perioadei de colectare a semnăturilor
28
30
  description: Descriere
29
31
  document_number_authorization_handler: Autorizare pentru verificarea numărului documentului pe semnături
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ru:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  si:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sk:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sl:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  so:
@@ -1 +1,2 @@
1
+ ---
1
2
  sr:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sv:
2
3
  activemodel:
3
4
  attributes:
@@ -229,6 +230,12 @@ sv:
229
230
  update:
230
231
  error: Ett fel har inträffat
231
232
  success: Initiativet har uppdaterats
233
+ initiatives_settings:
234
+ edit:
235
+ update: Uppdatera
236
+ form:
237
+ comments: Mest kommenterade
238
+ random: Slumpmässigt
232
239
  initiatives_type_scopes:
233
240
  create:
234
241
  error: Ett fel har inträffat
@@ -1 +1,2 @@
1
+ ---
1
2
  sw:
@@ -1 +1,2 @@
1
+ ---
1
2
  ti:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  tr:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  uk:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  val:
@@ -1 +1,2 @@
1
+ ---
1
2
  vi:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  zh-CN:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  zh-TW:
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddCommentsEnabledToInitiativeTypes < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_initiatives_types, :comments_enabled, :boolean, null: false, default: true
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateDecidimInitiativesSettings < ActiveRecord::Migration[5.2]
4
+ def change
5
+ create_table :decidim_initiatives_settings do |t|
6
+ t.string :initiatives_order, default: "random"
7
+ t.references :decidim_organization, foreign_key: true, index: true
8
+ end
9
+ end
10
+ end
@@ -19,6 +19,8 @@ module Decidim
19
19
  resources :initiatives_type_scopes, except: [:index, :show]
20
20
  end
21
21
 
22
+ resources :initiatives_settings, only: [:edit, :update], controller: "initiatives_settings"
23
+
22
24
  resources :initiatives, only: [:index, :edit, :update], param: :slug do
23
25
  member do
24
26
  get :send_to_technical_validation
@@ -159,6 +161,20 @@ module Decidim
159
161
  decidim_admin_initiatives.initiatives_types_path,
160
162
  active: is_active_link?(decidim_admin_initiatives.initiatives_types_path),
161
163
  if: allowed_to?(:manage, :initiative_type)
164
+
165
+ menu.add_item :initiatives_settings,
166
+ I18n.t("menu.initiatives_settings", scope: "decidim.admin"),
167
+ decidim_admin_initiatives.edit_initiatives_setting_path(
168
+ Decidim::InitiativesSettings.find_or_create_by!(
169
+ organization: current_organization
170
+ )
171
+ ),
172
+ active: is_active_link?(
173
+ decidim_admin_initiatives.edit_initiatives_setting_path(
174
+ Decidim::InitiativesSettings.find_or_create_by!(organization: current_organization)
175
+ )
176
+ ),
177
+ if: allowed_to?(:update, :initiatives_settings)
162
178
  end
163
179
  end
164
180
  end
@@ -61,7 +61,7 @@ Decidim.register_participatory_space(:initiatives) do |participatory_space|
61
61
  title: Decidim::Faker::Localized.sentence(word_count: 5),
62
62
  description: Decidim::Faker::Localized.sentence(word_count: 25),
63
63
  organization: organization,
64
- banner_image: ActiveStorage::Blob.create_after_upload!(
64
+ banner_image: ActiveStorage::Blob.create_and_upload!(
65
65
  io: File.open(File.join(seeds_root, "city2.jpeg")),
66
66
  filename: "banner_image.jpeg",
67
67
  content_type: "image/jpeg",
@@ -90,7 +90,7 @@ Decidim.register_participatory_space(:initiatives) do |participatory_space|
90
90
  signature_type: "online",
91
91
  signature_start_date: Date.current - 7.days,
92
92
  signature_end_date: Date.current + 7.days,
93
- published_at: Time.current - 7.days,
93
+ published_at: 7.days.ago,
94
94
  author: Decidim::User.reorder(Arel.sql("RANDOM()")).first,
95
95
  organization: organization
96
96
  }
@@ -112,7 +112,7 @@ Decidim.register_participatory_space(:initiatives) do |participatory_space|
112
112
  description: Decidim::Faker::Localized.sentence(word_count: 5),
113
113
  attached_to: initiative,
114
114
  content_type: "image/jpeg",
115
- file: ActiveStorage::Blob.create_after_upload!(
115
+ file: ActiveStorage::Blob.create_and_upload!(
116
116
  io: File.open(File.join(seeds_root, "city.jpeg")),
117
117
  filename: "city.jpeg",
118
118
  content_type: "image/jpeg",
@@ -8,7 +8,14 @@ FactoryBot.define do
8
8
  title { generate_localized_title }
9
9
  description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
10
10
  organization
11
- banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") } # Keep after organization
11
+ # Keep banner_image after organization
12
+ banner_image do
13
+ ActiveStorage::Blob.create_and_upload!(
14
+ io: File.open(Decidim::Dev.test_file("city2.jpeg", "image/jpeg")),
15
+ filename: "city2.jpeg",
16
+ content_type: "image/jpeg"
17
+ ).signed_id
18
+ end
12
19
  signature_type { :online }
13
20
  attachments_enabled { true }
14
21
  undo_online_signatures_enabled { true }
@@ -18,6 +25,11 @@ FactoryBot.define do
18
25
  minimum_committee_members { 3 }
19
26
  child_scope_threshold_enabled { false }
20
27
  only_global_scope_enabled { false }
28
+ comments_enabled { true }
29
+
30
+ trait :with_comments_disabled do
31
+ comments_enabled { false }
32
+ end
21
33
 
22
34
  trait :attachments_enabled do
23
35
  attachments_enabled { true }
@@ -264,4 +276,25 @@ FactoryBot.define do
264
276
  state { "rejected" }
265
277
  end
266
278
  end
279
+
280
+ factory :initiatives_settings, class: "Decidim::InitiativesSettings" do
281
+ initiatives_order { "random" }
282
+ organization
283
+
284
+ trait :most_recent do
285
+ initiatives_order { "date" }
286
+ end
287
+
288
+ trait :most_signed do
289
+ initiatives_order { "signatures" }
290
+ end
291
+
292
+ trait :most_commented do
293
+ initiatives_order { "comments" }
294
+ end
295
+
296
+ trait :most_recently_published do
297
+ initiatives_order { "publication_date" }
298
+ end
299
+ end
267
300
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-initiatives version.
5
5
  module Initiatives
6
6
  def self.version
7
- "0.26.2"
7
+ "0.27.0.rc1"
8
8
  end
9
9
  end
10
10
  end