decidim-assemblies 0.30.1 → 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.
- checksums.yaml +4 -4
- data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_settings_form/show.erb +3 -1
- data/app/commands/decidim/assemblies/admin/create_assembly.rb +1 -1
- data/app/commands/decidim/assemblies/admin/{copy_assembly.rb → duplicate_assembly.rb} +20 -21
- data/app/commands/decidim/assemblies/admin/update_assembly.rb +1 -1
- data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +3 -3
- data/app/controllers/decidim/assemblies/admin/assembly_duplicates_controller.rb +35 -0
- data/app/controllers/decidim/assemblies/admin/assembly_imports_controller.rb +1 -1
- data/app/controllers/decidim/assemblies/admin/assembly_landing_page_controller.rb +4 -0
- data/app/forms/decidim/assemblies/admin/{assembly_copy_form.rb → assembly_duplicate_form.rb} +4 -4
- data/app/forms/decidim/assemblies/admin/assembly_form.rb +0 -1
- data/app/models/decidim/assembly.rb +0 -4
- data/app/packs/entrypoints/decidim_assemblies_admin.js +0 -1
- data/app/packs/src/decidim/assemblies/admin/assemblies.js +3 -62
- data/app/packs/src/decidim/assemblies/controllers/.gitkeep +0 -0
- data/app/packs/src/decidim/assemblies/controllers/assembly_admin/assembly_admin.test.js +1077 -0
- data/app/packs/src/decidim/assemblies/controllers/assembly_admin/controller.js +66 -0
- data/app/permissions/decidim/assemblies/permissions.rb +9 -9
- data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +0 -1
- data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +1 -3
- data/app/queries/decidim/assemblies/assemblies_stats_followers_count.rb +14 -0
- data/app/queries/decidim/assemblies/assemblies_stats_participants_count.rb +14 -0
- data/app/serializers/decidim/assemblies/assembly_importer.rb +5 -4
- data/app/views/decidim/assemblies/admin/assemblies/_assembly_row.html.erb +118 -49
- data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +8 -12
- data/app/views/decidim/assemblies/admin/assemblies/edit.html.erb +1 -9
- data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +2 -2
- data/app/views/decidim/assemblies/admin/assemblies/index.js.erb +4 -0
- data/app/views/decidim/assemblies/admin/assemblies/manage_trash.html.erb +2 -1
- data/app/views/decidim/assemblies/admin/assemblies/new.html.erb +1 -1
- data/app/views/decidim/assemblies/admin/{assembly_copies → assembly_duplicates}/_form.html.erb +4 -4
- data/app/views/decidim/assemblies/admin/assembly_duplicates/new.html.erb +19 -0
- data/app/views/decidim/assemblies/admin/assembly_user_roles/index.html.erb +42 -18
- data/app/views/decidim/assemblies/assemblies/index.html.erb +0 -1
- data/app/views/layouts/decidim/admin/_manage_assemblies.html.erb +1 -1
- data/config/assets.rb +2 -3
- data/config/locales/ar.yml +0 -19
- data/config/locales/bg.yml +0 -23
- data/config/locales/bs-BA.yml +0 -4
- data/config/locales/ca-IT.yml +11 -16
- data/config/locales/ca.yml +11 -16
- data/config/locales/cs.yml +12 -17
- data/config/locales/de.yml +14 -19
- data/config/locales/el.yml +0 -19
- data/config/locales/en.yml +11 -16
- data/config/locales/es-MX.yml +15 -20
- data/config/locales/es-PY.yml +15 -20
- data/config/locales/es.yml +13 -18
- data/config/locales/eu.yml +14 -19
- data/config/locales/fi-plain.yml +13 -18
- data/config/locales/fi.yml +13 -18
- data/config/locales/fr-CA.yml +10 -15
- data/config/locales/fr.yml +10 -15
- data/config/locales/ga-IE.yml +0 -6
- data/config/locales/gl.yml +0 -19
- data/config/locales/he-IL.yml +0 -17
- data/config/locales/hu.yml +0 -20
- data/config/locales/id-ID.yml +0 -18
- data/config/locales/is-IS.yml +0 -12
- data/config/locales/it.yml +39 -23
- data/config/locales/ja.yml +12 -17
- data/config/locales/kaa.yml +0 -3
- data/config/locales/ko.yml +0 -4
- data/config/locales/lb.yml +0 -18
- data/config/locales/lt.yml +0 -20
- data/config/locales/lv.yml +0 -19
- data/config/locales/nl.yml +0 -19
- data/config/locales/no.yml +0 -19
- data/config/locales/pl.yml +0 -23
- data/config/locales/pt-BR.yml +0 -23
- data/config/locales/pt.yml +0 -24
- data/config/locales/ro-RO.yml +2 -20
- data/config/locales/ru.yml +0 -16
- data/config/locales/sk.yml +0 -8
- data/config/locales/sl.yml +0 -18
- data/config/locales/sq-AL.yml +0 -21
- data/config/locales/sr-CS.yml +0 -4
- data/config/locales/sv.yml +17 -23
- data/config/locales/tr-TR.yml +0 -19
- data/config/locales/uk.yml +0 -16
- data/config/locales/zh-CN.yml +0 -19
- data/config/locales/zh-TW.yml +0 -19
- data/db/migrate/20250604081741_remove_hastags_column_assemblies.rb +7 -0
- data/lib/decidim/api/assembly_type.rb +10 -6
- data/lib/decidim/assemblies/admin_engine.rb +1 -1
- data/lib/decidim/assemblies/api.rb +0 -1
- data/lib/decidim/assemblies/engine.rb +5 -14
- data/lib/decidim/assemblies/menu.rb +1 -1
- data/lib/decidim/assemblies/participatory_space.rb +14 -0
- data/lib/decidim/assemblies/query_extensions.rb +0 -18
- data/lib/decidim/assemblies/seeds.rb +2 -3
- data/lib/decidim/assemblies/test/factories.rb +2 -2
- data/lib/decidim/assemblies/version.rb +1 -1
- metadata +23 -21
- data/app/controllers/decidim/assemblies/admin/assembly_copies_controller.rb +0 -35
- data/app/packs/entrypoints/decidim_assemblies.js +0 -4
- data/app/packs/src/decidim/assemblies/assemblies.js +0 -14
- data/app/queries/decidim/assemblies/metrics/assemblies_metric_manage.rb +0 -27
- data/app/views/decidim/assemblies/admin/assembly_copies/new.html.erb +0 -19
- data/lib/decidim/api/assemblies_type_type.rb +0 -16
data/config/locales/tr-TR.yml
CHANGED
@@ -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,15 +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
|
-
assemblies_copies:
|
103
|
-
create:
|
104
|
-
error: Bu kurul çoğaltırken bir hata oluştu.
|
105
|
-
success: Kurul başarıyla kopyalandı.
|
106
|
-
assembly_copies:
|
107
|
-
new:
|
108
|
-
copy: Kopya
|
109
|
-
select: Çoğaltmak istediğiniz verileri seçin
|
110
|
-
title: Kurulu çoğalt
|
111
98
|
assembly_imports:
|
112
99
|
create:
|
113
100
|
error: Bu kurul derlenirken, içeri aktarılırken bir hata oluştu.
|
@@ -173,7 +160,6 @@ tr:
|
|
173
160
|
admin: Yönetici
|
174
161
|
collaborator: İşbirlikçi
|
175
162
|
moderator: Moderatör
|
176
|
-
valuator: Bilirkişi
|
177
163
|
titles:
|
178
164
|
assemblies: Kurullar
|
179
165
|
assemblies_types: Kurul türleri
|
@@ -281,11 +267,6 @@ tr:
|
|
281
267
|
not_found: 'Kurul türü veritabanında bulunamadı (ID: %{id})'
|
282
268
|
menu:
|
283
269
|
assemblies: Kurullar
|
284
|
-
metrics:
|
285
|
-
assemblies:
|
286
|
-
description: Oluşturulan kurul sayısı
|
287
|
-
object: kurullar
|
288
|
-
title: Kurullar
|
289
270
|
participatory_processes:
|
290
271
|
show:
|
291
272
|
related_assemblies: İlgili kurullar
|
data/config/locales/uk.yml
CHANGED
@@ -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,15 +89,6 @@ uk:
|
|
93
89
|
update:
|
94
90
|
error: При спробі оновити ці збори сталася помилка.
|
95
91
|
success: Збори успішно оновлено.
|
96
|
-
assemblies_copies:
|
97
|
-
create:
|
98
|
-
error: При спробі створити копію цих зборів сталася помилка.
|
99
|
-
success: Успішно створено копію зборів.
|
100
|
-
assembly_copies:
|
101
|
-
new:
|
102
|
-
copy: Скопіювати
|
103
|
-
select: Оберіть відомості, копію яких ви хотіли б створити
|
104
|
-
title: Створити копію зборів
|
105
92
|
assembly_publications:
|
106
93
|
create:
|
107
94
|
error: Під час оприлюднення цих зборів сталася помилка.
|
@@ -215,9 +202,6 @@ uk:
|
|
215
202
|
not_found: 'Ці збори не знайдено в базі даних (ID: %{id})'
|
216
203
|
menu:
|
217
204
|
assemblies: Збори
|
218
|
-
metrics:
|
219
|
-
assemblies:
|
220
|
-
title: Збори
|
221
205
|
layouts:
|
222
206
|
decidim:
|
223
207
|
assemblies:
|
data/config/locales/zh-CN.yml
CHANGED
@@ -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,15 +82,6 @@ zh-CN:
|
|
86
82
|
update:
|
87
83
|
error: 更新这个组件时出现问题。
|
88
84
|
success: 程序更新成功。
|
89
|
-
assemblies_copies:
|
90
|
-
create:
|
91
|
-
error: 复制这个组件时出现问题。
|
92
|
-
success: 已成功复制组合。
|
93
|
-
assembly_copies:
|
94
|
-
new:
|
95
|
-
copy: 复制
|
96
|
-
select: 选择要重复的数据
|
97
|
-
title: 复制程序集
|
98
85
|
assembly_imports:
|
99
86
|
create:
|
100
87
|
error: 导入此组件时出现问题。
|
@@ -160,7 +147,6 @@ zh-CN:
|
|
160
147
|
admin: 管理员
|
161
148
|
collaborator: 协作者
|
162
149
|
moderator: 版主
|
163
|
-
valuator: 值者
|
164
150
|
titles:
|
165
151
|
assemblies: 程序集
|
166
152
|
assemblies_types: 程序集类型
|
@@ -263,11 +249,6 @@ zh-CN:
|
|
263
249
|
not_found: '在数据库中找不到程序集类型 (ID: %{id})'
|
264
250
|
menu:
|
265
251
|
assemblies: 程序集
|
266
|
-
metrics:
|
267
|
-
assemblies:
|
268
|
-
description: 创建的集合数
|
269
|
-
object: 程序集
|
270
|
-
title: 程序集
|
271
252
|
participatory_processes:
|
272
253
|
show:
|
273
254
|
related_assemblies: 相关的会议
|
data/config/locales/zh-TW.yml
CHANGED
@@ -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,15 +97,6 @@ zh-TW:
|
|
101
97
|
update:
|
102
98
|
error: 更新此大會時出現問題
|
103
99
|
success: 此大會成功更新
|
104
|
-
assemblies_copies:
|
105
|
-
create:
|
106
|
-
error: 複製此大會時出現問題
|
107
|
-
success: 大會已成功複製
|
108
|
-
assembly_copies:
|
109
|
-
new:
|
110
|
-
copy: 複製
|
111
|
-
select: 請選擇您想要複製的資料
|
112
|
-
title: 複製大會
|
113
100
|
assembly_imports:
|
114
101
|
create:
|
115
102
|
error: 這個大會匯入時發生了問題
|
@@ -175,7 +162,6 @@ zh-TW:
|
|
175
162
|
admin: 管理員
|
176
163
|
collaborator: 合作者
|
177
164
|
moderator: 版主
|
178
|
-
valuator: 評價者
|
179
165
|
titles:
|
180
166
|
assemblies: 大會
|
181
167
|
assemblies_types: 大會類型
|
@@ -297,11 +283,6 @@ zh-TW:
|
|
297
283
|
not_found: '在資料庫中找不到該大會類型 (ID: %{id})'
|
298
284
|
menu:
|
299
285
|
assemblies: 大會
|
300
|
-
metrics:
|
301
|
-
assemblies:
|
302
|
-
description: 建立的大會數量
|
303
|
-
object: 大會
|
304
|
-
title: 大會
|
305
286
|
participatory_processes:
|
306
287
|
show:
|
307
288
|
related_assemblies: 相關大會
|
@@ -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
|
-
|
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 :
|
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"
|
@@ -59,7 +59,10 @@ module Decidim
|
|
59
59
|
end
|
60
60
|
|
61
61
|
initializer "decidim_assemblies.stats" do
|
62
|
-
Decidim.stats.register :assemblies_count,
|
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.
|
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
|
@@ -139,7 +139,7 @@ module Decidim
|
|
139
139
|
decidim_admin_assemblies.assembly_share_tokens_path(current_participatory_space),
|
140
140
|
active: is_active_link?(decidim_admin_assemblies.assembly_share_tokens_path(current_participatory_space)),
|
141
141
|
icon_name: "share-line",
|
142
|
-
if: allowed_to?(:read, :
|
142
|
+
if: allowed_to?(:read, :share_token, current_participatory_space:)
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
@@ -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
|
-
|
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
|
-
|
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 :
|
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: :
|
190
|
+
role: :evaluator,
|
191
191
|
skip_injection: evaluator.skip_injection)
|
192
192
|
end
|
193
193
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-assemblies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.31.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-09-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,70 +18,70 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.31.0.rc1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.31.0.rc1
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-admin
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.31.0.rc1
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.31.0.rc1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: decidim-dev
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.31.0.rc1
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.31.0.rc1
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-meetings
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.31.0.rc1
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.31.0.rc1
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: decidim-proposals
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.31.0.rc1
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
84
|
+
version: 0.31.0.rc1
|
85
85
|
description: Assemblies component for decidim.
|
86
86
|
email:
|
87
87
|
- josepjaume@gmail.com
|
@@ -113,9 +113,9 @@ files:
|
|
113
113
|
- app/cells/decidim/assemblies/content_blocks/related_assemblies_cell.rb
|
114
114
|
- app/cells/decidim/assemblies/content_blocks/stats_cell.rb
|
115
115
|
- app/cells/decidim/assembly_activity_cell.rb
|
116
|
-
- app/commands/decidim/assemblies/admin/copy_assembly.rb
|
117
116
|
- app/commands/decidim/assemblies/admin/create_assemblies_type.rb
|
118
117
|
- app/commands/decidim/assemblies/admin/create_assembly.rb
|
118
|
+
- app/commands/decidim/assemblies/admin/duplicate_assembly.rb
|
119
119
|
- app/commands/decidim/assemblies/admin/import_assembly.rb
|
120
120
|
- app/commands/decidim/assemblies/admin/update_assemblies_type.rb
|
121
121
|
- app/commands/decidim/assemblies/admin/update_assembly.rb
|
@@ -128,7 +128,7 @@ files:
|
|
128
128
|
- app/controllers/decidim/assemblies/admin/assemblies_controller.rb
|
129
129
|
- app/controllers/decidim/assemblies/admin/assembly_attachment_collections_controller.rb
|
130
130
|
- app/controllers/decidim/assemblies/admin/assembly_attachments_controller.rb
|
131
|
-
- app/controllers/decidim/assemblies/admin/
|
131
|
+
- app/controllers/decidim/assemblies/admin/assembly_duplicates_controller.rb
|
132
132
|
- app/controllers/decidim/assemblies/admin/assembly_exports_controller.rb
|
133
133
|
- app/controllers/decidim/assemblies/admin/assembly_imports_controller.rb
|
134
134
|
- app/controllers/decidim/assemblies/admin/assembly_landing_page_content_blocks_controller.rb
|
@@ -152,7 +152,7 @@ files:
|
|
152
152
|
- app/controllers/decidim/assemblies/participatory_space_private_users_controller.rb
|
153
153
|
- app/events/decidim/role_assigned_to_assembly_event.rb
|
154
154
|
- app/forms/decidim/assemblies/admin/assemblies_type_form.rb
|
155
|
-
- app/forms/decidim/assemblies/admin/
|
155
|
+
- app/forms/decidim/assemblies/admin/assembly_duplicate_form.rb
|
156
156
|
- app/forms/decidim/assemblies/admin/assembly_form.rb
|
157
157
|
- app/forms/decidim/assemblies/admin/assembly_import_form.rb
|
158
158
|
- app/forms/decidim/assemblies/admin/assembly_user_role_form.rb
|
@@ -164,13 +164,14 @@ files:
|
|
164
164
|
- app/models/decidim/assemblies_type.rb
|
165
165
|
- app/models/decidim/assembly.rb
|
166
166
|
- app/models/decidim/assembly_user_role.rb
|
167
|
-
- app/packs/entrypoints/decidim_assemblies.js
|
168
167
|
- app/packs/entrypoints/decidim_assemblies_admin.js
|
169
168
|
- app/packs/entrypoints/decidim_assemblies_admin_list.js
|
170
169
|
- app/packs/images/decidim/assemblies/decidim_assemblies.svg
|
171
170
|
- app/packs/src/decidim/assemblies/admin/assemblies.js
|
172
171
|
- app/packs/src/decidim/assemblies/admin/assemblies_list.js
|
173
|
-
- app/packs/src/decidim/assemblies/
|
172
|
+
- app/packs/src/decidim/assemblies/controllers/.gitkeep
|
173
|
+
- app/packs/src/decidim/assemblies/controllers/assembly_admin/assembly_admin.test.js
|
174
|
+
- app/packs/src/decidim/assemblies/controllers/assembly_admin/controller.js
|
174
175
|
- app/permissions/decidim/assemblies/permissions.rb
|
175
176
|
- app/presenters/decidim/assemblies/admin_log/assemblies_setting_presenter.rb
|
176
177
|
- app/presenters/decidim/assemblies/admin_log/assemblies_type_presenter.rb
|
@@ -183,9 +184,10 @@ files:
|
|
183
184
|
- app/presenters/decidim/log/value_types/assembly_presenter.rb
|
184
185
|
- app/presenters/decidim/log/value_types/assembly_type_presenter.rb
|
185
186
|
- app/queries/decidim/assemblies/admin/admin_users.rb
|
187
|
+
- app/queries/decidim/assemblies/assemblies_stats_followers_count.rb
|
188
|
+
- app/queries/decidim/assemblies/assemblies_stats_participants_count.rb
|
186
189
|
- app/queries/decidim/assemblies/assemblies_with_user_role.rb
|
187
190
|
- app/queries/decidim/assemblies/filtered_assemblies.rb
|
188
|
-
- app/queries/decidim/assemblies/metrics/assemblies_metric_manage.rb
|
189
191
|
- app/queries/decidim/assemblies/organization_assemblies.rb
|
190
192
|
- app/queries/decidim/assemblies/organization_prioritized_assemblies.rb
|
191
193
|
- app/queries/decidim/assemblies/organization_published_assemblies.rb
|
@@ -207,8 +209,8 @@ files:
|
|
207
209
|
- app/views/decidim/assemblies/admin/assemblies/index.js.erb
|
208
210
|
- app/views/decidim/assemblies/admin/assemblies/manage_trash.html.erb
|
209
211
|
- app/views/decidim/assemblies/admin/assemblies/new.html.erb
|
210
|
-
- app/views/decidim/assemblies/admin/
|
211
|
-
- app/views/decidim/assemblies/admin/
|
212
|
+
- app/views/decidim/assemblies/admin/assembly_duplicates/_form.html.erb
|
213
|
+
- app/views/decidim/assemblies/admin/assembly_duplicates/new.html.erb
|
212
214
|
- app/views/decidim/assemblies/admin/assembly_imports/_form.html.erb
|
213
215
|
- app/views/decidim/assemblies/admin/assembly_imports/new.html.erb
|
214
216
|
- app/views/decidim/assemblies/admin/assembly_user_roles/_form.html.erb
|
@@ -335,8 +337,8 @@ files:
|
|
335
337
|
- db/migrate/20240822161222_add_deleted_at_to_decidim_assemblies.rb
|
336
338
|
- db/migrate/20241016101151_migrate_assembly_members_to_private_users.rb
|
337
339
|
- db/migrate/20241108141651_remove_column_show_statistics_from_assemblies.rb
|
340
|
+
- db/migrate/20250604081741_remove_hastags_column_assemblies.rb
|
338
341
|
- decidim-assemblies.gemspec
|
339
|
-
- lib/decidim/api/assemblies_type_type.rb
|
340
342
|
- lib/decidim/api/assembly_type.rb
|
341
343
|
- lib/decidim/assemblies.rb
|
342
344
|
- lib/decidim/assemblies/admin.rb
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Assemblies
|
5
|
-
module Admin
|
6
|
-
# Controller that allows managing assemblies.
|
7
|
-
#
|
8
|
-
class AssemblyCopiesController < Decidim::Assemblies::Admin::ApplicationController
|
9
|
-
include Concerns::AssemblyAdmin
|
10
|
-
|
11
|
-
def new
|
12
|
-
enforce_permission_to :create, :assembly
|
13
|
-
@form = form(AssemblyCopyForm).from_model(current_assembly)
|
14
|
-
end
|
15
|
-
|
16
|
-
def create
|
17
|
-
enforce_permission_to :create, :assembly
|
18
|
-
@form = form(AssemblyCopyForm).from_params(params)
|
19
|
-
|
20
|
-
CopyAssembly.call(@form, current_assembly, current_user) do
|
21
|
-
on(:ok) do
|
22
|
-
flash[:notice] = I18n.t("assemblies_copies.create.success", scope: "decidim.admin")
|
23
|
-
redirect_to assemblies_path
|
24
|
-
end
|
25
|
-
|
26
|
-
on(:invalid) do
|
27
|
-
flash.now[:alert] = I18n.t("assemblies_copies.create.error", scope: "decidim.admin")
|
28
|
-
render :new
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|