decidim-assemblies 0.30.2 → 0.31.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.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_settings_form/show.erb +3 -1
  3. data/app/commands/decidim/assemblies/admin/create_assembly.rb +1 -1
  4. data/app/commands/decidim/assemblies/admin/{copy_assembly.rb → duplicate_assembly.rb} +20 -21
  5. data/app/commands/decidim/assemblies/admin/update_assembly.rb +1 -1
  6. data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +3 -3
  7. data/app/controllers/decidim/assemblies/admin/assembly_duplicates_controller.rb +35 -0
  8. data/app/controllers/decidim/assemblies/admin/assembly_imports_controller.rb +1 -1
  9. data/app/controllers/decidim/assemblies/admin/assembly_landing_page_controller.rb +4 -0
  10. data/app/forms/decidim/assemblies/admin/{assembly_copy_form.rb → assembly_duplicate_form.rb} +4 -4
  11. data/app/forms/decidim/assemblies/admin/assembly_form.rb +0 -1
  12. data/app/models/decidim/assembly.rb +0 -4
  13. data/app/packs/entrypoints/decidim_assemblies_admin.js +0 -1
  14. data/app/packs/src/decidim/assemblies/admin/assemblies.js +3 -62
  15. data/app/packs/src/decidim/assemblies/controllers/.gitkeep +0 -0
  16. data/app/packs/src/decidim/assemblies/controllers/assembly_admin/assembly_admin.test.js +1077 -0
  17. data/app/packs/src/decidim/assemblies/controllers/assembly_admin/controller.js +66 -0
  18. data/app/permissions/decidim/assemblies/permissions.rb +7 -7
  19. data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +0 -1
  20. data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +1 -3
  21. data/app/queries/decidim/assemblies/assemblies_stats_followers_count.rb +14 -0
  22. data/app/queries/decidim/assemblies/assemblies_stats_participants_count.rb +14 -0
  23. data/app/serializers/decidim/assemblies/assembly_importer.rb +0 -1
  24. data/app/views/decidim/assemblies/admin/assemblies/_assembly_row.html.erb +118 -49
  25. data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +8 -12
  26. data/app/views/decidim/assemblies/admin/assemblies/edit.html.erb +1 -9
  27. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +2 -2
  28. data/app/views/decidim/assemblies/admin/assemblies/index.js.erb +4 -0
  29. data/app/views/decidim/assemblies/admin/assemblies/manage_trash.html.erb +2 -1
  30. data/app/views/decidim/assemblies/admin/assemblies/new.html.erb +1 -1
  31. data/app/views/decidim/assemblies/admin/{assembly_copies → assembly_duplicates}/_form.html.erb +4 -4
  32. data/app/views/decidim/assemblies/admin/assembly_duplicates/new.html.erb +19 -0
  33. data/app/views/decidim/assemblies/admin/assembly_user_roles/index.html.erb +42 -18
  34. data/app/views/decidim/assemblies/assemblies/index.html.erb +0 -1
  35. data/app/views/layouts/decidim/admin/_manage_assemblies.html.erb +1 -1
  36. data/config/assets.rb +2 -3
  37. data/config/locales/ar.yml +0 -13
  38. data/config/locales/bg.yml +0 -17
  39. data/config/locales/bs-BA.yml +0 -4
  40. data/config/locales/ca-IT.yml +11 -16
  41. data/config/locales/ca.yml +11 -16
  42. data/config/locales/cs.yml +11 -16
  43. data/config/locales/de.yml +12 -17
  44. data/config/locales/el.yml +0 -13
  45. data/config/locales/en.yml +11 -16
  46. data/config/locales/es-MX.yml +12 -17
  47. data/config/locales/es-PY.yml +12 -17
  48. data/config/locales/es.yml +12 -17
  49. data/config/locales/eu.yml +11 -16
  50. data/config/locales/fi-plain.yml +11 -16
  51. data/config/locales/fi.yml +11 -16
  52. data/config/locales/fr-CA.yml +11 -16
  53. data/config/locales/fr.yml +11 -16
  54. data/config/locales/ga-IE.yml +0 -6
  55. data/config/locales/gl.yml +0 -13
  56. data/config/locales/he-IL.yml +0 -12
  57. data/config/locales/hu.yml +0 -14
  58. data/config/locales/id-ID.yml +0 -12
  59. data/config/locales/is-IS.yml +0 -10
  60. data/config/locales/it.yml +4 -17
  61. data/config/locales/ja.yml +12 -17
  62. data/config/locales/kaa.yml +0 -3
  63. data/config/locales/ko.yml +0 -4
  64. data/config/locales/lb.yml +0 -12
  65. data/config/locales/lt.yml +0 -14
  66. data/config/locales/lv.yml +0 -13
  67. data/config/locales/nl.yml +0 -13
  68. data/config/locales/no.yml +0 -13
  69. data/config/locales/pl.yml +0 -17
  70. data/config/locales/pt-BR.yml +0 -17
  71. data/config/locales/pt.yml +0 -18
  72. data/config/locales/ro-RO.yml +2 -14
  73. data/config/locales/ru.yml +0 -10
  74. data/config/locales/sk.yml +0 -8
  75. data/config/locales/sl.yml +0 -12
  76. data/config/locales/sq-AL.yml +0 -15
  77. data/config/locales/sr-CS.yml +0 -4
  78. data/config/locales/sv.yml +10 -16
  79. data/config/locales/tr-TR.yml +0 -13
  80. data/config/locales/uk.yml +0 -10
  81. data/config/locales/zh-CN.yml +0 -13
  82. data/config/locales/zh-TW.yml +0 -13
  83. data/db/migrate/20250604081741_remove_hastags_column_assemblies.rb +7 -0
  84. data/lib/decidim/api/assembly_type.rb +10 -6
  85. data/lib/decidim/assemblies/admin_engine.rb +1 -1
  86. data/lib/decidim/assemblies/api.rb +0 -1
  87. data/lib/decidim/assemblies/engine.rb +5 -14
  88. data/lib/decidim/assemblies/participatory_space.rb +14 -0
  89. data/lib/decidim/assemblies/query_extensions.rb +0 -18
  90. data/lib/decidim/assemblies/seeds.rb +2 -3
  91. data/lib/decidim/assemblies/test/factories.rb +2 -2
  92. data/lib/decidim/assemblies/version.rb +1 -1
  93. metadata +23 -21
  94. data/app/controllers/decidim/assemblies/admin/assembly_copies_controller.rb +0 -35
  95. data/app/packs/entrypoints/decidim_assemblies.js +0 -4
  96. data/app/packs/src/decidim/assemblies/assemblies.js +0 -14
  97. data/app/queries/decidim/assemblies/metrics/assemblies_metric_manage.rb +0 -27
  98. data/app/views/decidim/assemblies/admin/assembly_copies/new.html.erb +0 -19
  99. data/lib/decidim/api/assemblies_type_type.rb +0 -16
@@ -10,9 +10,6 @@ sk:
10
10
  closing_date: Dátum uzavretia
11
11
  closing_date_reason: Dôvod dátumu uzavretia
12
12
  composition: Zloženie
13
- copy_categories: Kopírovať kategórie
14
- copy_components: Kopírovať súčasti
15
- copy_features: Kopírovať prvky
16
13
  created_by: Vytvorené
17
14
  created_by_other: Vytvorené iným
18
15
  creation_date: Dátum vytvorenia
@@ -24,7 +21,6 @@ sk:
24
21
  duration: Trvanie
25
22
  facebook: Facebook
26
23
  github: GitHub
27
- hashtag: Hashtag
28
24
  hero_image: Obrázok na hlavnej stránke
29
25
  included_at: Zahrnuté v
30
26
  instagram: Instagram
@@ -94,10 +90,6 @@ sk:
94
90
  update:
95
91
  error: Pri tvorbe nového zhromaždenia nastala chyba.
96
92
  success: Zhromaždenie úspešne aktualizované.
97
- models:
98
- assembly_user_role:
99
- roles:
100
- valuator: Hodnotiteľ
101
93
  titles:
102
94
  assemblies_types: Typy zhromaždení
103
95
  admin_log:
@@ -10,9 +10,6 @@ sl:
10
10
  closing_date: Datum zaprtja
11
11
  closing_date_reason: Razlog za datum zaprtja
12
12
  composition: Sestava
13
- copy_categories: Kopiraj kategorije
14
- copy_components: Kopiraj sestavni del
15
- copy_features: Kopiraj značilnosti
16
13
  created_by: Ustvaril
17
14
  creation_date: Datum nastanka
18
15
  decidim_area_id: Področje
@@ -22,7 +19,6 @@ sl:
22
19
  duration: Trajanje
23
20
  facebook: Facebook
24
21
  github: GitHub
25
- hashtag: Ključnik
26
22
  hero_image: Domača slika
27
23
  included_at: Vsebovan
28
24
  instagram: Instagram
@@ -91,9 +87,6 @@ sl:
91
87
  update:
92
88
  error: Pojavila se je težava pri urejanju združbe.
93
89
  success: Združba uspešno posodobljena.
94
- assembly_copies:
95
- new:
96
- copy: Kopiraj
97
90
  assembly_imports:
98
91
  create:
99
92
  error: Pojavila se je težava pri uvozu te združbe.
@@ -150,11 +143,6 @@ sl:
150
143
  title: Kaj so združbe?
151
144
  menu:
152
145
  assemblies: Združbe
153
- metrics:
154
- assemblies:
155
- description: Število kreiranih združb
156
- object: združbe
157
- title: Združbe
158
146
  participatory_processes:
159
147
  show:
160
148
  related_assemblies: Povezane združbe
@@ -11,9 +11,6 @@ sq:
11
11
  closing_date: Data e mbylljes
12
12
  closing_date_reason: Arsyeja e datës së mbylljes
13
13
  composition: Përbërja
14
- copy_categories: Kopjo kategoritë
15
- copy_components: Kopjo komponentet
16
- copy_features: Kopjo veçoritë
17
14
  created_by: Krijuar nga
18
15
  created_by_other: Krijuar nga tjetër
19
16
  creation_date: Data e krijimit
@@ -26,7 +23,6 @@ sq:
26
23
  duration: Kohëzgjatja
27
24
  facebook: Facebook
28
25
  github: Github
29
- hashtag: Hashtag
30
26
  hero_image: Imazhi kryesor
31
27
  import_attachments: Importoni bashkëngjitjet
32
28
  import_categories: Importoni kategoritë
@@ -95,9 +91,6 @@ sq:
95
91
  update:
96
92
  error: Ndodhi një gabim gjatë përditësimit të asamblesë.
97
93
  success: Asambleja u përditësua me sukses.
98
- assembly_copies:
99
- new:
100
- copy: Kopjo
101
94
  assembly_imports:
102
95
  create:
103
96
  error: Ndodhi një gabim gjatë importimit të asamblesë.
@@ -147,7 +140,6 @@ sq:
147
140
  attachments: Skedat e bashkëlidhura
148
141
  components: Komponentet
149
142
  info: Rreth asamblesë
150
- landing_page: Faqja hyrëse
151
143
  moderations: Moderimet
152
144
  see_assembly: Shiko asamblenë
153
145
  models:
@@ -177,7 +169,6 @@ sq:
177
169
  admin: Administrator
178
170
  collaborator: Bashkëpunëtor/e
179
171
  moderator: Moderator/e
180
- valuator: Vlerësues/e
181
172
  titles:
182
173
  assemblies: Asambletë
183
174
  assemblies_types: Tipet e asambleve
@@ -223,9 +214,6 @@ sq:
223
214
  social_handlers: Rrjete sociale
224
215
  title: Informacion i përgjithshëm
225
216
  visibility: Vizibiliteti
226
- assembly_copies:
227
- form:
228
- slug_help_html: 'Për gjenerimin e URL së kësaj asambleje përdoren URL slugs. Pranohen vetëm gërma, numra dhe viza horizontale, dhe duhet të fillojë me gërmë. Shembull: %{url}'
229
217
  assembly_imports:
230
218
  form:
231
219
  slug_help_html: 'Për gjenerimin e URL së kësaj asambleje përdoren URL slugs. Pranohen vetëm gërma, numra dhe viza horizontale, dhe duhet të fillojë me gërmë. Shembull: %{url}'
@@ -308,6 +296,3 @@ sq:
308
296
  assembly_members:
309
297
  index:
310
298
  title: Anëtarët
311
- metrics:
312
- assemblies:
313
- title: Asambletë
@@ -2,10 +2,6 @@
2
2
  sr:
3
3
  decidim:
4
4
  admin:
5
- models:
6
- assembly_user_role:
7
- roles:
8
- valuator: Procenjivač
9
5
  titles:
10
6
  assemblies_types: Tipovi veća
11
7
  admin_log:
@@ -11,9 +11,6 @@ sv:
11
11
  closing_date: Slutdatum
12
12
  closing_date_reason: Anledning till avslut
13
13
  composition: Sammansättning
14
- copy_categories: Kopiera kategorier
15
- copy_components: Kopiera komponenter
16
- copy_features: Kopiera funktioner
17
14
  created_by: Skapad av
18
15
  created_by_other: Skapad av andra
19
16
  creation_date: Skapad datum
@@ -23,10 +20,12 @@ sv:
23
20
  developer_group: Arrangör
24
21
  document: Dokument
25
22
  domain: Domän
23
+ duplicate_categories: Duplicera kategorier
24
+ duplicate_components: Duplicera komponenter
25
+ duplicate_features: Duplicera funktioner
26
26
  duration: Varaktighet
27
27
  facebook: Facebook
28
28
  github: GitHub
29
- hashtag: Hashtag
30
29
  hero_image: Startbild
31
30
  import_attachments: Importera bilagor
32
31
  import_categories: Importera kategorier
@@ -113,13 +112,13 @@ sv:
113
112
  update:
114
113
  error: Det gick inte att uppdatera samrådet.
115
114
  success: Samrådet har uppdaterats.
116
- assemblies_copies:
115
+ assemblies_duplicates:
117
116
  create:
118
117
  error: Det gick inte att duplicera samrådet.
119
118
  success: Samrådet har duplicerats.
120
- assembly_copies:
119
+ assembly_duplicates:
121
120
  new:
122
- copy: Kopiera
121
+ duplicate: Duplicera
123
122
  select: Välj vilka data som du vill duplicera
124
123
  title: Duplicera samråd
125
124
  assembly_imports:
@@ -171,7 +170,6 @@ sv:
171
170
  attachments: Bilagor
172
171
  components: Komponenter
173
172
  info: Om samrådet
174
- landing_page: Landningssida
175
173
  moderations: Moderering
176
174
  private_users: Medlemmar
177
175
  see_assembly: Visa samråd
@@ -194,6 +192,7 @@ sv:
194
192
  vice_president: Vice ordförande
195
193
  assembly_user_role:
196
194
  fields:
195
+ actions: Handlingar
197
196
  email: E-post
198
197
  name: Namn
199
198
  role: Roll
@@ -201,8 +200,8 @@ sv:
201
200
  roles:
202
201
  admin: Administratör
203
202
  collaborator: Medverkande
203
+ evaluator: Utvärderare
204
204
  moderator: Moderator
205
- valuator: Handläggare
206
205
  taxonomy_filters:
207
206
  space_filter_for:
208
207
  assemblies: Alla samråd
@@ -260,7 +259,7 @@ sv:
260
259
  taxonomies: Kategorier
261
260
  title: Allmän information
262
261
  visibility: Synlighet
263
- assembly_copies:
262
+ assembly_duplicates:
264
263
  form:
265
264
  slug_help_html: 'URL-slugs används till att generera URL:er till samrådet. Använd bara bokstäver, siffror och bindestreck, och de måste börja med en bokstav. Exempel: %{url}'
266
265
  assembly_imports:
@@ -377,11 +376,6 @@ sv:
377
376
  not_found: 'Typen av samråd hittades inte i databasen (ID: %{id})'
378
377
  menu:
379
378
  assemblies: Samråd
380
- metrics:
381
- assemblies:
382
- description: Antal skapade samråd
383
- object: samråd
384
- title: Samråd
385
379
  open_data:
386
380
  help:
387
381
  assemblies:
@@ -402,7 +396,6 @@ sv:
402
396
  facebook_handler: Facebook-namn
403
397
  follows_count: Antal följare
404
398
  github_handler: Github-namn
405
- hashtag: Samrådets hashtag, används för Twitter/X
406
399
  id: Unikt id för samrådet
407
400
  included_at: Datum när samrådet skapades
408
401
  instagram_handler: Instagram-namn
@@ -436,6 +429,7 @@ sv:
436
429
  related_assemblies: Relaterade samråd
437
430
  statistics:
438
431
  assemblies_count: Samråd
432
+ assemblies_count_tooltip: Antal offentliga samråd.
439
433
  layouts:
440
434
  decidim:
441
435
  assemblies:
@@ -11,9 +11,6 @@ tr:
11
11
  closing_date: Kapanış tarihi
12
12
  closing_date_reason: Kapanış tarihi nedeni
13
13
  composition: bileştirme, kompozisyon
14
- copy_categories: Kategorileri kopyala
15
- copy_components: Bileşenleri kopyala
16
- copy_features: Özellikleri kopyala
17
14
  created_by: Tarafından yaratıldı
18
15
  created_by_other: Diğer tarafından oluşturuldu
19
16
  creation_date: Tarih oluşturuldu
@@ -26,7 +23,6 @@ tr:
26
23
  duration: süre
27
24
  facebook: Facebook
28
25
  github: GitHub
29
- hashtag: Başlık etiketi
30
26
  hero_image: Ana resim
31
27
  import_attachments: Eki içe aktar
32
28
  import_categories: Kategorileri içe aktar
@@ -99,9 +95,6 @@ tr:
99
95
  update:
100
96
  error: Bu kurul güncellenirken bir hata oluştu.
101
97
  success: Kurul başarıyla güncellendi.
102
- assembly_copies:
103
- new:
104
- copy: Kopya
105
98
  assembly_imports:
106
99
  create:
107
100
  error: Bu kurul derlenirken, içeri aktarılırken bir hata oluştu.
@@ -167,7 +160,6 @@ tr:
167
160
  admin: Yönetici
168
161
  collaborator: İşbirlikçi
169
162
  moderator: Moderatör
170
- valuator: Bilirkişi
171
163
  titles:
172
164
  assemblies: Kurullar
173
165
  assemblies_types: Kurul türleri
@@ -275,11 +267,6 @@ tr:
275
267
  not_found: 'Kurul türü veritabanında bulunamadı (ID: %{id})'
276
268
  menu:
277
269
  assemblies: Kurullar
278
- metrics:
279
- assemblies:
280
- description: Oluşturulan kurul sayısı
281
- object: kurullar
282
- title: Kurullar
283
270
  participatory_processes:
284
271
  show:
285
272
  related_assemblies: İlgili kurullar
@@ -10,9 +10,6 @@ uk:
10
10
  closing_date: Дата закриття
11
11
  closing_date_reason: Причина дати закриття
12
12
  composition: Склад
13
- copy_categories: Скопіювати категорії
14
- copy_components: Копіювати складові
15
- copy_features: Скопіювати складові
16
13
  created_by: 'Автор:'
17
14
  created_by_other: Створено кимось іншим
18
15
  creation_date: Дата створення
@@ -24,7 +21,6 @@ uk:
24
21
  duration: Тривалість
25
22
  facebook: Фейсбук
26
23
  github: ГітХаб
27
- hashtag: Хештег
28
24
  hero_image: Зображення головної сторінки
29
25
  included_at: Включено в
30
26
  instagram: Інстаграм
@@ -93,9 +89,6 @@ uk:
93
89
  update:
94
90
  error: При спробі оновити ці збори сталася помилка.
95
91
  success: Збори успішно оновлено.
96
- assembly_copies:
97
- new:
98
- copy: Скопіювати
99
92
  assembly_publications:
100
93
  create:
101
94
  error: Під час оприлюднення цих зборів сталася помилка.
@@ -209,9 +202,6 @@ uk:
209
202
  not_found: 'Ці збори не знайдено в базі даних (ID: %{id})'
210
203
  menu:
211
204
  assemblies: Збори
212
- metrics:
213
- assemblies:
214
- title: Збори
215
205
  layouts:
216
206
  decidim:
217
207
  assemblies:
@@ -10,9 +10,6 @@ zh-CN:
10
10
  closing_date: 结束日期
11
11
  closing_date_reason: 结束日期原因
12
12
  composition: 组成
13
- copy_categories: 复制类别
14
- copy_components: 复制组件
15
- copy_features: 复制功能
16
13
  created_by: 创建者
17
14
  created_by_other: 由其他人创建
18
15
  creation_date: 创建日期
@@ -24,7 +21,6 @@ zh-CN:
24
21
  duration: 期限
25
22
  facebook: Facebook
26
23
  github: GitHub
27
- hashtag: 标签
28
24
  hero_image: 首页图像
29
25
  included_at: 包含于
30
26
  instagram: Instagram
@@ -86,9 +82,6 @@ zh-CN:
86
82
  update:
87
83
  error: 更新这个组件时出现问题。
88
84
  success: 程序更新成功。
89
- assembly_copies:
90
- new:
91
- copy: 复制
92
85
  assembly_imports:
93
86
  create:
94
87
  error: 导入此组件时出现问题。
@@ -154,7 +147,6 @@ zh-CN:
154
147
  admin: 管理员
155
148
  collaborator: 协作者
156
149
  moderator: 版主
157
- valuator: 值者
158
150
  titles:
159
151
  assemblies: 程序集
160
152
  assemblies_types: 程序集类型
@@ -257,11 +249,6 @@ zh-CN:
257
249
  not_found: '在数据库中找不到程序集类型 (ID: %{id})'
258
250
  menu:
259
251
  assemblies: 程序集
260
- metrics:
261
- assemblies:
262
- description: 创建的集合数
263
- object: 程序集
264
- title: 程序集
265
252
  participatory_processes:
266
253
  show:
267
254
  related_assemblies: 相关的会议
@@ -11,9 +11,6 @@ zh-TW:
11
11
  closing_date: 截止日期
12
12
  closing_date_reason: 截止日期原因
13
13
  composition: 組成
14
- copy_categories: 複製類別
15
- copy_components: 複製組件
16
- copy_features: 複製功能
17
14
  created_by: 創建者
18
15
  created_by_other: 由其他人創建
19
16
  creation_date: 創建日期
@@ -26,7 +23,6 @@ zh-TW:
26
23
  duration: 持續時間
27
24
  facebook: 臉書
28
25
  github: GitHub
29
- hashtag: 主題標籤
30
26
  hero_image: 首頁圖片
31
27
  import_attachments: 匯入附件
32
28
  import_categories: 匯入類別
@@ -101,9 +97,6 @@ zh-TW:
101
97
  update:
102
98
  error: 更新此大會時出現問題
103
99
  success: 此大會成功更新
104
- assembly_copies:
105
- new:
106
- copy: 複製
107
100
  assembly_imports:
108
101
  create:
109
102
  error: 這個大會匯入時發生了問題
@@ -169,7 +162,6 @@ zh-TW:
169
162
  admin: 管理員
170
163
  collaborator: 合作者
171
164
  moderator: 版主
172
- valuator: 評價者
173
165
  titles:
174
166
  assemblies: 大會
175
167
  assemblies_types: 大會類型
@@ -291,11 +283,6 @@ zh-TW:
291
283
  not_found: '在資料庫中找不到該大會類型 (ID: %{id})'
292
284
  menu:
293
285
  assemblies: 大會
294
- metrics:
295
- assemblies:
296
- description: 建立的大會數量
297
- object: 大會
298
- title: 大會
299
286
  participatory_processes:
300
287
  show:
301
288
  related_assemblies: 相關大會
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class RemoveHastagsColumnAssemblies < ActiveRecord::Migration[7.1]
4
+ def change
5
+ remove_column :decidim_assemblies, :hashtag, :string, if_exists: true
6
+ end
7
+ end
@@ -6,17 +6,20 @@ module Decidim
6
6
  class AssemblyType < Decidim::Api::Types::BaseObject
7
7
  implements Decidim::Core::ParticipatorySpaceInterface
8
8
  implements Decidim::Core::AttachableInterface
9
+ implements Decidim::Core::AttachableCollectionInterface
9
10
  implements Decidim::Core::ParticipatorySpaceResourceableInterface
10
11
  implements Decidim::Core::TaxonomizableInterface
11
12
  implements Decidim::Core::CategoriesContainerInterface
12
13
  implements Decidim::Core::TimestampsInterface
14
+ implements Decidim::Core::TraceableInterface
15
+ implements Decidim::Core::ReferableInterface
16
+ implements Decidim::Core::FollowableInterface
13
17
 
14
18
  description "An assembly"
15
19
 
16
20
  field :announcement, Decidim::Core::TranslatedFieldType, "Highlighted announcement for this assembly", null: true
17
- field :area, Decidim::Core::AreaApiType, "Area of this assembly", null: true
18
- field :assembly_type, Decidim::Assemblies::AssembliesTypeType, "Type of the assembly", null: true
19
21
  field :banner_image, String, "The banner image for this assembly", null: true
22
+ field :children, [Decidim::Assemblies::AssemblyType, { null: true }], "Children of this assembly", null: false
20
23
  field :children_count, Integer, "Number of children assemblies", null: true
21
24
  field :closing_date, Decidim::Core::DateType, "Closing date of the assembly", null: true
22
25
  field :closing_date_reason, Decidim::Core::TranslatedFieldType, "Closing date reason of this assembly", null: true
@@ -29,9 +32,7 @@ module Decidim
29
32
  field :duration, Decidim::Core::DateType, "Duration of this assembly", null: true
30
33
  field :facebook_handler, String, "Facebook handler", null: true
31
34
  field :github_handler, String, "GitHub handler", null: true
32
- field :hashtag, String, "The hashtag for this assembly", null: true
33
35
  field :hero_image, String, "The hero image for this assembly", null: true
34
- field :id, ID, "The internal ID for this assembly", null: false
35
36
  field :included_at, Decidim::Core::DateType, "Included at", null: true
36
37
  field :instagram_handler, String, "Instagram handler", null: true
37
38
  field :internal_organisation, Decidim::Core::TranslatedFieldType, "Internal organisation of this assembly", null: true
@@ -46,7 +47,6 @@ module Decidim
46
47
  field :promoted, Boolean, "If this assembly is promoted (therefore in the homepage)", null: true
47
48
  field :published_at, Decidim::Core::DateTimeType, "The time this assembly was published", null: false
48
49
  field :purpose_of_action, Decidim::Core::TranslatedFieldType, "Purpose of action", null: true
49
- field :reference, String, "Reference for this assembly", null: false
50
50
  field :scopes_enabled, Boolean, "If this assembly has scopes enabled", null: true
51
51
  field :short_description, Decidim::Core::TranslatedFieldType, "The sort description of this assembly", null: true
52
52
  field :slug, String, "The slug of this assembly", null: false
@@ -54,9 +54,13 @@ module Decidim
54
54
  field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this assembly", null: true
55
55
  field :target, Decidim::Core::TranslatedFieldType, "Who participates in this assembly", null: true
56
56
  field :twitter_handler, String, "Twitter handler", null: true
57
+ field :url, GraphQL::Types::String, "The URL of this assembly", null: true
58
+ field :weight, GraphQL::Types::Int, "The weight for this object", null: false
57
59
  field :youtube_handler, String, "YouTube handler", null: true
58
60
 
59
- field :children, [Decidim::Assemblies::AssemblyType, { null: true }], "Children of this assembly", null: false
61
+ def url
62
+ EngineRouter.main_proxy(object).assembly_url(object)
63
+ end
60
64
 
61
65
  def hero_image
62
66
  object.attached_uploader(:hero_image).url
@@ -19,7 +19,7 @@ module Decidim
19
19
  constraints(->(request) { Decidim::Admin::OrganizationDashboardConstraint.new(request).matches? }) do
20
20
  resources :assemblies, param: :slug, except: [:show, :destroy] do
21
21
  resource :publish, controller: "assembly_publications", only: [:create, :destroy]
22
- resources :copies, controller: "assembly_copies", only: [:new, :create]
22
+ resources :duplicates, controller: "assembly_duplicates", only: [:new, :create]
23
23
  resources :user_roles, controller: "assembly_user_roles" do
24
24
  member do
25
25
  post :resend_invitation, to: "assembly_user_roles#resend_invitation"
@@ -3,6 +3,5 @@
3
3
  module Decidim
4
4
  module Assemblies
5
5
  autoload :AssemblyType, "decidim/api/assembly_type"
6
- autoload :AssembliesTypeType, "decidim/api/assemblies_type_type"
7
6
  end
8
7
  end
@@ -59,7 +59,10 @@ module Decidim
59
59
  end
60
60
 
61
61
  initializer "decidim_assemblies.stats" do
62
- Decidim.stats.register :assemblies_count, priority: StatsRegistry::HIGH_PRIORITY do |organization, _start_at, _end_at|
62
+ Decidim.stats.register :assemblies_count,
63
+ priority: StatsRegistry::HIGH_PRIORITY,
64
+ icon_name: "government-line",
65
+ tooltip_key: "assemblies_count_tooltip" do |organization, _start_at, _end_at|
63
66
  Decidim::Assembly.where(organization:).public_spaces.count
64
67
  end
65
68
  end
@@ -96,23 +99,11 @@ module Decidim
96
99
  Decidim::Assemblies::ContentBlocks::RegistryManager.register!
97
100
  end
98
101
 
99
- initializer "decidim_assemblies.register_metrics" do
100
- Decidim.metrics_registry.register(:assemblies) do |metric_registry|
101
- metric_registry.manager_class = "Decidim::Assemblies::Metrics::AssembliesMetricManage"
102
-
103
- metric_registry.settings do |settings|
104
- settings.attribute :highlighted, type: :boolean, default: false
105
- settings.attribute :scopes, type: :array, default: %w(home)
106
- settings.attribute :weight, type: :integer, default: 1
107
- end
108
- end
109
- end
110
-
111
102
  initializer "decidim_assemblies.query_extensions" do
112
103
  Decidim::Api::QueryType.include Decidim::Assemblies::QueryExtensions
113
104
  end
114
105
 
115
- initializer "decidim_assemblies.webpacker.assets_path" do
106
+ initializer "decidim_assemblies.shakapacker.assets_path" do
116
107
  Decidim.register_assets_path File.expand_path("app/packs", root)
117
108
  end
118
109
  end
@@ -21,6 +21,20 @@ Decidim.register_participatory_space(:assemblies) do |participatory_space|
21
21
  resource.searchable = true
22
22
  end
23
23
 
24
+ participatory_space.register_stat :followers_count,
25
+ priority: Decidim::StatsRegistry::MEDIUM_PRIORITY,
26
+ icon_name: "user-follow-line",
27
+ tooltip_key: "followers_count_tooltip" do
28
+ Decidim::Assemblies::AssembliesStatsFollowersCount.for(participatory_space)
29
+ end
30
+
31
+ participatory_space.register_stat :participants_count,
32
+ priority: Decidim::StatsRegistry::MEDIUM_PRIORITY,
33
+ icon_name: "user-line",
34
+ tooltip_key: "participants_count_tooltip" do
35
+ Decidim::Assemblies::AssembliesStatsParticipantsCount.for(participatory_space)
36
+ end
37
+
24
38
  participatory_space.context(:public) do |context|
25
39
  context.engine = Decidim::Assemblies::Engine
26
40
  context.layout = "layouts/decidim/assembly"
@@ -11,11 +11,6 @@ module Decidim
11
11
  #
12
12
  # Returns nothing.
13
13
  def self.included(type)
14
- type.field :assemblies_types, [AssembliesTypeType], null: false, description: "Lists all assemblies types"
15
-
16
- type.field :assemblies_type, AssembliesTypeType, null: true, description: "Finds an assemblies type group" do
17
- argument :id, GraphQL::Types::ID, description: "The ID of the Assemblies type", required: true
18
- end
19
14
  type.field :assemblies,
20
15
  [Decidim::Assemblies::AssemblyType],
21
16
  null: true,
@@ -32,19 +27,6 @@ module Decidim
32
27
  end
33
28
  end
34
29
 
35
- def assemblies_types(*)
36
- Decidim::AssembliesType.where(
37
- organization: context[:current_organization]
38
- )
39
- end
40
-
41
- def assemblies_type(id:)
42
- Decidim::AssembliesType.find_by(
43
- organization: context[:current_organization],
44
- id:
45
- )
46
- end
47
-
48
30
  def assemblies(filter: {}, order: {})
49
31
  manifest = Decidim.participatory_space_manifests.select { |m| m.name == :assemblies }.first
50
32
  Decidim::Core::ParticipatorySpaceListBase.new(manifest:).call(object, { filter:, order: }, context)
@@ -9,7 +9,7 @@ module Decidim
9
9
  create_content_block!
10
10
 
11
11
  taxonomy = create_taxonomy!(name: "Assembly Types", parent: nil)
12
- 2.times do
12
+ number_of_records.times do
13
13
  create_taxonomy!(name: ::Faker::Lorem.word, parent: taxonomy)
14
14
  end
15
15
  # filters for assemblies only
@@ -17,7 +17,7 @@ module Decidim
17
17
  taxonomies: taxonomy.all_children,
18
18
  participatory_space_manifests: [:assemblies])
19
19
 
20
- 2.times do |_n|
20
+ number_of_records.times do |_n|
21
21
  assembly = create_assembly!
22
22
 
23
23
  create_assembly_user_roles!(assembly:)
@@ -52,7 +52,6 @@ module Decidim
52
52
  title: Decidim::Faker::Localized.sentence(word_count: 5),
53
53
  slug: Decidim::Faker::Internet.unique.slug(words: nil, glue: "-"),
54
54
  subtitle: Decidim::Faker::Localized.sentence(word_count: 2),
55
- hashtag: "##{::Faker::Lorem.word}",
56
55
  short_description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
57
56
  Decidim::Faker::Localized.sentence(word_count: 3)
58
57
  end,
@@ -174,7 +174,7 @@ FactoryBot.define do
174
174
  end
175
175
  end
176
176
 
177
- factory :assembly_valuator, parent: :user, class: "Decidim::User" do
177
+ factory :assembly_evaluator, parent: :user, class: "Decidim::User" do
178
178
  transient do
179
179
  skip_injection { false }
180
180
  assembly { create(:assembly) }
@@ -187,7 +187,7 @@ FactoryBot.define do
187
187
  create(:assembly_user_role,
188
188
  user:,
189
189
  assembly: evaluator.assembly,
190
- role: :valuator,
190
+ role: :evaluator,
191
191
  skip_injection: evaluator.skip_injection)
192
192
  end
193
193
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-assemblies version.
5
5
  module Assemblies
6
6
  def self.version
7
- "0.30.2"
7
+ "0.31.0.rc1"
8
8
  end
9
9
  end
10
10
  end