decidim-assemblies 0.23.3 → 0.24.1
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/assemblies/assembly_m_cell.rb +2 -0
- data/app/cells/decidim/assemblies/statistic/show.erb +9 -0
- data/app/cells/decidim/assemblies/statistic_cell.rb +20 -0
- data/app/cells/decidim/assemblies/statistics/show.erb +17 -0
- data/app/cells/decidim/assemblies/statistics_cell.rb +18 -0
- data/app/commands/decidim/assemblies/admin/create_assembly.rb +1 -0
- data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +12 -72
- data/app/commands/decidim/assemblies/admin/update_assembly.rb +2 -1
- data/app/controllers/decidim/assemblies/admin/imports_controller.rb +14 -0
- data/app/controllers/decidim/assemblies/admin/moderations/reports_controller.rb +14 -0
- data/app/controllers/decidim/assemblies/assemblies_controller.rb +1 -1
- data/app/events/decidim/role_assigned_to_assembly_event.rb +1 -1
- data/app/forms/decidim/assemblies/admin/assembly_form.rb +3 -0
- data/app/helpers/decidim/assemblies/admin/assemblies_admin_menu_helper.rb +15 -0
- data/app/models/decidim/assembly.rb +3 -3
- data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +35 -25
- data/app/queries/decidim/assemblies/organization_assemblies.rb +1 -1
- data/app/queries/decidim/assemblies/organization_published_assemblies.rb +1 -1
- data/app/serializers/decidim/assemblies/assembly_serializer.rb +1 -0
- data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +4 -0
- data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +11 -1
- data/app/views/decidim/assemblies/assemblies/show.html.erb +1 -1
- data/app/views/layouts/decidim/admin/assemblies.html.erb +2 -20
- data/app/views/layouts/decidim/admin/assembly.html.erb +2 -1
- data/config/locales/ar.yml +2 -1
- data/config/locales/ca.yml +9 -3
- data/config/locales/cs.yml +9 -3
- data/config/locales/de.yml +9 -3
- data/config/locales/el.yml +2 -4
- data/config/locales/en.yml +9 -3
- data/config/locales/es-MX.yml +9 -3
- data/config/locales/es-PY.yml +9 -3
- data/config/locales/es.yml +9 -3
- data/config/locales/eu.yml +2 -1
- data/config/locales/fi-plain.yml +9 -3
- data/config/locales/fi.yml +9 -3
- data/config/locales/fr-CA.yml +9 -3
- data/config/locales/fr.yml +9 -3
- data/config/locales/gl.yml +59 -1
- data/config/locales/hu.yml +2 -4
- data/config/locales/id-ID.yml +2 -1
- data/config/locales/is-IS.yml +1 -1
- data/config/locales/it.yml +2 -4
- data/config/locales/ja.yml +2 -4
- data/config/locales/lv.yml +2 -4
- data/config/locales/nl.yml +12 -3
- data/config/locales/no.yml +2 -4
- data/config/locales/pl.yml +21 -9
- data/config/locales/pt-BR.yml +2 -1
- data/config/locales/pt.yml +2 -4
- data/config/locales/ro-RO.yml +149 -102
- data/config/locales/ru.yml +3 -2
- data/config/locales/sk.yml +0 -3
- data/config/locales/sl.yml +2 -1
- data/config/locales/sr-CS.yml +0 -3
- data/config/locales/sv.yml +11 -3
- data/config/locales/tr-TR.yml +2 -4
- data/config/locales/uk.yml +3 -2
- data/config/locales/zh-CN.yml +2 -4
- data/db/migrate/20210204152393_add_weight_field_to_assembly.rb +7 -0
- data/db/migrate/20210310120444_add_followable_counter_cache_to_assemblies.rb +16 -0
- data/lib/decidim/api/assemblies_type_type.rb +16 -0
- data/lib/decidim/api/assembly_member_type.rb +28 -0
- data/lib/decidim/api/assembly_type.rb +64 -0
- data/lib/decidim/assemblies.rb +1 -0
- data/lib/decidim/assemblies/admin_engine.rb +31 -1
- data/lib/decidim/assemblies/api.rb +9 -0
- data/lib/decidim/assemblies/engine.rb +3 -5
- data/lib/decidim/assemblies/participatory_space.rb +38 -38
- data/lib/decidim/assemblies/query_extensions.rb +39 -20
- data/lib/decidim/assemblies/test/factories.rb +5 -4
- data/lib/decidim/assemblies/version.rb +1 -1
- metadata +23 -14
- data/app/types/decidim/assemblies/assemblies_type_type.rb +0 -17
- data/app/types/decidim/assemblies/assembly_member_type.rb +0 -29
- data/app/types/decidim/assemblies/assembly_type.rb +0 -67
- data/app/views/decidim/assemblies/assemblies/_statistics.html.erb +0 -10
data/config/locales/ru.yml
CHANGED
@@ -307,17 +307,18 @@ ru:
|
|
307
307
|
target: Кто участвует
|
308
308
|
statistics:
|
309
309
|
answers_count: Ответов
|
310
|
-
assemblies_count:
|
310
|
+
assemblies_count: Собрания
|
311
311
|
comments_count: Комментариев
|
312
312
|
debates_count: Обсуждений
|
313
313
|
endorsements_count: Выражений поддержки
|
314
|
-
headline: Деятельность
|
315
314
|
meetings_count: Встреч
|
316
315
|
orders_count: Голосов
|
317
316
|
pages_count: Страниц
|
317
|
+
participants_count: Участников
|
318
318
|
projects_count: Проектов
|
319
319
|
proposals_count: Предложений
|
320
320
|
results_count: Итогов
|
321
|
+
supports_count: Голосов
|
321
322
|
surveys_count: Опросов
|
322
323
|
users_count: Участников
|
323
324
|
votes_count: Голосов
|
data/config/locales/sk.yml
CHANGED
@@ -129,7 +129,6 @@ sk:
|
|
129
129
|
admin_log:
|
130
130
|
assembly_type:
|
131
131
|
create: "%{user_name} vytvoril %{resource_name} nový typ zhromaždenia"
|
132
|
-
delete: "%{user_name} odstránil %{resource_name} používateľa z typu zhromaždenia %{space_name}"
|
133
132
|
publish: "%{user_name} vytvoril nový typ zhromaždenia %{resource_name}"
|
134
133
|
unpublish: "%{user_name} zrušil publikovanie typu zhromaždenia %{resource_name}"
|
135
134
|
update: "%{user_name} aktualizoval typ zhromaždenia %{resource_name}"
|
@@ -163,8 +162,6 @@ sk:
|
|
163
162
|
home:
|
164
163
|
hero:
|
165
164
|
participate_title: Podieľajte sa na procesoch platformy
|
166
|
-
sub_hero:
|
167
|
-
register_title: Vytvorte si účet na platforme
|
168
165
|
participatory_processes:
|
169
166
|
pages:
|
170
167
|
home:
|
data/config/locales/sl.yml
CHANGED
@@ -238,14 +238,15 @@ sl:
|
|
238
238
|
assemblies_count: Združbe
|
239
239
|
comments_count: Komentarji
|
240
240
|
debates_count: Debate
|
241
|
-
headline: Dejavnost
|
242
241
|
meetings_count: Sestanki
|
243
242
|
orders_count: Podpora
|
244
243
|
pages_count: Strani
|
244
|
+
participants_count: Udeleženci
|
245
245
|
posts_count: Objave
|
246
246
|
projects_count: Projekti
|
247
247
|
proposals_count: Predlogi
|
248
248
|
results_count: Rezultati
|
249
|
+
supports_count: Podpora
|
249
250
|
surveys_count: Ankete
|
250
251
|
users_count: Udeleženci
|
251
252
|
votes_count: Podpora
|
data/config/locales/sr-CS.yml
CHANGED
@@ -25,7 +25,6 @@ sr:
|
|
25
25
|
admin_log:
|
26
26
|
assembly_type:
|
27
27
|
create: "%{user_name} je stvorio tip veća %{resource_name}"
|
28
|
-
delete: "%{user_name} je uklonio člana %{resource_name} iz tipa veća %{space_name}"
|
29
28
|
publish: "%{user_name} je objavio tip veća %{resource_name}"
|
30
29
|
unpublish: "%{user_name} je odustao od objavljivanja tipa veća %{resource_name}"
|
31
30
|
update: "%{user_name} je ažurirao tip veća %{resource_name}"
|
@@ -64,8 +63,6 @@ sr:
|
|
64
63
|
home:
|
65
64
|
hero:
|
66
65
|
participate_title: Učestvujte u procesima platforme
|
67
|
-
sub_hero:
|
68
|
-
register_title: Registrujte se na platformu
|
69
66
|
participatory_processes:
|
70
67
|
pages:
|
71
68
|
home:
|
data/config/locales/sv.yml
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
sv:
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
|
+
assemblies_setting:
|
5
|
+
enable_organization_chart: Aktivera organisationskarta
|
4
6
|
assembly:
|
5
7
|
area_id: Område
|
6
8
|
assembly_type: Typ av grupp
|
@@ -50,6 +52,7 @@ sv:
|
|
50
52
|
target: Vem deltar
|
51
53
|
title: Titel
|
52
54
|
twitter: Twitter
|
55
|
+
weight: Vikt
|
53
56
|
youtube: YouTube
|
54
57
|
assembly_member:
|
55
58
|
birthday: Födelsedag
|
@@ -60,6 +63,7 @@ sv:
|
|
60
63
|
full_name: Fullständigt namn
|
61
64
|
gender: Kön
|
62
65
|
position: Befattning
|
66
|
+
user_id: Användare
|
63
67
|
assembly_user_role:
|
64
68
|
email: E-post
|
65
69
|
name: Namn
|
@@ -246,7 +250,7 @@ sv:
|
|
246
250
|
update: "%{user_name} uppdaterade inställningarna för församlingarna"
|
247
251
|
assembly_type:
|
248
252
|
create: "%{user_name} skapade grupptypen %{resource_name}"
|
249
|
-
delete: "%{user_name}
|
253
|
+
delete: "%{user_name} raderade grupptypen %{resource_name}"
|
250
254
|
publish: "%{user_name} publicerade grupptypen %{resource_name}"
|
251
255
|
unpublish: "%{user_name} avpublicerade grupptypen %{resource_name}"
|
252
256
|
update: "%{user_name} uppdaterade grupptypen %{resource_name}"
|
@@ -383,14 +387,18 @@ sv:
|
|
383
387
|
comments_count: Kommentarer
|
384
388
|
debates_count: Debatter
|
385
389
|
endorsements_count: Instämmanden
|
386
|
-
|
390
|
+
followers_count: Följare
|
391
|
+
headline: Statistik
|
387
392
|
meetings_count: Möten
|
388
393
|
orders_count: Stöd
|
389
394
|
pages_count: Sidor
|
395
|
+
participants_count: Deltagare
|
390
396
|
posts_count: Inlägg
|
397
|
+
processes_count: Dialoger
|
391
398
|
projects_count: Projekt
|
392
399
|
proposals_count: Förslag
|
393
400
|
results_count: Resultat
|
401
|
+
supports_count: Stöd
|
394
402
|
surveys_count: Undersökningar
|
395
403
|
users_count: Deltagare
|
396
404
|
votes_count: Stöd
|
@@ -441,7 +449,7 @@ sv:
|
|
441
449
|
hero:
|
442
450
|
participate_title: Delta i plattformens dialoger
|
443
451
|
sub_hero:
|
444
|
-
register_title: Skapa ett konto
|
452
|
+
register_title: Skapa ett konto
|
445
453
|
participatory_processes:
|
446
454
|
pages:
|
447
455
|
home:
|
data/config/locales/tr-TR.yml
CHANGED
@@ -249,7 +249,6 @@ tr:
|
|
249
249
|
update: "%{user_name}, kurul ayarlarını güncelledi"
|
250
250
|
assembly_type:
|
251
251
|
create: "%{user_name},%{resource_name} kurul türünü oluşturdu"
|
252
|
-
delete: "%{user_name},%{resource_name} üyesini %{space_name} kurul türünden kaldırdı"
|
253
252
|
publish: "%{user_name}, %{resource_name} kurul türünü yayınladı"
|
254
253
|
unpublish: "%{user_name}, %{resource_name} kurul türünü yayından kaldırdı"
|
255
254
|
update: "%{user_name}, %{resource_name} kurul türünü güncelledi"
|
@@ -386,14 +385,15 @@ tr:
|
|
386
385
|
comments_count: Yorumlar
|
387
386
|
debates_count: Tartışmalar
|
388
387
|
endorsements_count: Onaylar
|
389
|
-
headline: Aktivite
|
390
388
|
meetings_count: Toplantılar
|
391
389
|
orders_count: Destekler
|
392
390
|
pages_count: Sayfalar
|
391
|
+
participants_count: Katılımcılar
|
393
392
|
posts_count: Yayınlar
|
394
393
|
projects_count: Projeler
|
395
394
|
proposals_count: Teklifler
|
396
395
|
results_count: Sonuçlar
|
396
|
+
supports_count: Destekler
|
397
397
|
surveys_count: Anketler
|
398
398
|
users_count: Katılımcılar
|
399
399
|
votes_count: Destekler
|
@@ -443,8 +443,6 @@ tr:
|
|
443
443
|
home:
|
444
444
|
hero:
|
445
445
|
participate_title: Platformun süreçlerine katılın
|
446
|
-
sub_hero:
|
447
|
-
register_title: Platformda bir hesap oluşturmak için kaydolun
|
448
446
|
participatory_processes:
|
449
447
|
pages:
|
450
448
|
home:
|
data/config/locales/uk.yml
CHANGED
@@ -307,17 +307,18 @@ uk:
|
|
307
307
|
target: Хто бере участь
|
308
308
|
statistics:
|
309
309
|
answers_count: Відповідей
|
310
|
-
assemblies_count:
|
310
|
+
assemblies_count: Збори
|
311
311
|
comments_count: Коментарів
|
312
312
|
debates_count: Обговорень
|
313
313
|
endorsements_count: Проявів підтримки
|
314
|
-
headline: Діяльність
|
315
314
|
meetings_count: Зустрічей
|
316
315
|
orders_count: Голосів
|
317
316
|
pages_count: Сторінок
|
317
|
+
participants_count: Учасників
|
318
318
|
projects_count: Проектів
|
319
319
|
proposals_count: Пропозицій
|
320
320
|
results_count: Підсумків
|
321
|
+
supports_count: Голосів
|
321
322
|
surveys_count: Опитувань
|
322
323
|
users_count: Учасників
|
323
324
|
votes_count: Голосів
|
data/config/locales/zh-CN.yml
CHANGED
@@ -243,7 +243,6 @@ zh-CN:
|
|
243
243
|
update: "%{user_name} 更新了程序集设置"
|
244
244
|
assembly_type:
|
245
245
|
create: "%{user_name} 创建了 %{resource_name} 组装类型"
|
246
|
-
delete: "%{user_name} 将 %{resource_name} 成员从 %{space_name} 组装类型中移除"
|
247
246
|
publish: "%{user_name} 发布了 %{resource_name} 组装类型"
|
248
247
|
unpublish: "%{user_name} 未发布的 %{resource_name} 组装类型"
|
249
248
|
update: "%{user_name} 更新了 %{resource_name} 装配体类型"
|
@@ -377,14 +376,15 @@ zh-CN:
|
|
377
376
|
comments_count: 评论
|
378
377
|
debates_count: 辩论
|
379
378
|
endorsements_count: 授权
|
380
|
-
headline: 活动
|
381
379
|
meetings_count: 会议
|
382
380
|
orders_count: 支持
|
383
381
|
pages_count: 页 次
|
382
|
+
participants_count: 参加者
|
384
383
|
posts_count: 员额
|
385
384
|
projects_count: 项目
|
386
385
|
proposals_count: 建议
|
387
386
|
results_count: 成果
|
387
|
+
supports_count: 支持
|
388
388
|
surveys_count: 调查
|
389
389
|
users_count: 参加者
|
390
390
|
votes_count: 支持
|
@@ -434,8 +434,6 @@ zh-CN:
|
|
434
434
|
home:
|
435
435
|
hero:
|
436
436
|
participate_title: 参与平台进程
|
437
|
-
sub_hero:
|
438
|
-
register_title: 注册在平台上创建帐户
|
439
437
|
participatory_processes:
|
440
438
|
pages:
|
441
439
|
home:
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddFollowableCounterCacheToAssemblies < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
add_column :decidim_assemblies, :follows_count, :integer, null: false, default: 0, index: true
|
6
|
+
|
7
|
+
reversible do |dir|
|
8
|
+
dir.up do
|
9
|
+
Decidim::Assembly.reset_column_information
|
10
|
+
Decidim::Assembly.find_each do |record|
|
11
|
+
record.class.reset_counters(record.id, :follows)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Assemblies
|
5
|
+
# This type represents an AssembliesType.
|
6
|
+
class AssembliesTypeType < Decidim::Api::Types::BaseObject
|
7
|
+
description "An assemblies type"
|
8
|
+
|
9
|
+
field :id, GraphQL::Types::ID, "The assemblies type's unique ID", null: false
|
10
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title of this assemblies type.", null: false
|
11
|
+
field :created_at, Decidim::Core::DateTimeType, "The time this assemblies type was created", null: false
|
12
|
+
field :updated_at, Decidim::Core::DateTimeType, "The time this assemblies type was updated", null: false
|
13
|
+
field :assemblies, [Decidim::Assemblies::AssemblyType, { null: true }], "Assemblies with this assemblies type", null: false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Assemblies
|
5
|
+
# This type represents a assembly.
|
6
|
+
class AssemblyMemberType < Decidim::Api::Types::BaseObject
|
7
|
+
description "An assembly member"
|
8
|
+
|
9
|
+
field :id, GraphQL::Types::ID, "Internal ID of the member", null: false
|
10
|
+
field :full_name, GraphQL::Types::String, "Full name of the member", null: true
|
11
|
+
field :position, GraphQL::Types::String, "Position of the member in the assembly", null: true
|
12
|
+
|
13
|
+
field :user, Decidim::Core::UserType, "The corresponding decidim user", null: true
|
14
|
+
|
15
|
+
field :created_at, Decidim::Core::DateTimeType, "The time this member was created", null: true
|
16
|
+
field :updated_at, Decidim::Core::DateTimeType, "The time this member was updated", null: true
|
17
|
+
|
18
|
+
field :weight, GraphQL::Types::Int, "Order of appearance in which it should be represented", null: true
|
19
|
+
field :gender, GraphQL::Types::String, "Gender of the member", null: true
|
20
|
+
# field :birthday, Decidim::Core::DateType, "Birthday date of the member" # non-public currently
|
21
|
+
field :birthplace, GraphQL::Types::String, "Birthplace of the member", null: true
|
22
|
+
field :designation_date, Decidim::Core::DateType, "Date of designation of the member", null: true
|
23
|
+
# field :designationMode, types.String, "Mode in which the member was designated", property: :designation_mode # non-public currently
|
24
|
+
field :position_other, GraphQL::Types::String, "Custom position name", null: true
|
25
|
+
field :ceased_date, Decidim::Core::DateType, "Date of cease for the member", null: true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Assemblies
|
5
|
+
# This type represents a assembly.
|
6
|
+
class AssemblyType < Decidim::Api::Types::BaseObject
|
7
|
+
implements Decidim::Core::ParticipatorySpaceInterface
|
8
|
+
implements Decidim::Core::AttachableInterface
|
9
|
+
implements Decidim::Core::ParticipatorySpaceResourceableInterface
|
10
|
+
|
11
|
+
description "An assembly"
|
12
|
+
|
13
|
+
field :id, ID, "The internal ID for this assembly", null: false
|
14
|
+
field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this assembly", null: true
|
15
|
+
field :short_description, Decidim::Core::TranslatedFieldType, "The sort description of this assembly", null: true
|
16
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description of this assembly", null: true
|
17
|
+
field :slug, String, "The slug of this assembly", null: false
|
18
|
+
field :hashtag, String, "The hashtag for this assembly", null: true
|
19
|
+
field :created_at, Decidim::Core::DateTimeType, "The time this assembly was created", null: false
|
20
|
+
field :updated_at, Decidim::Core::DateTimeType, "The time this assembly was updated", null: false
|
21
|
+
field :published_at, Decidim::Core::DateTimeType, "The time this assembly was published", null: false
|
22
|
+
field :reference, String, "Reference for this assembly", null: false
|
23
|
+
field :categories, [Decidim::Core::CategoryType, { null: true }], "Categories for this assembly", null: false
|
24
|
+
|
25
|
+
field :hero_image, String, "The hero image for this assembly", null: true
|
26
|
+
field :banner_image, String, "The banner image for this assembly", null: true
|
27
|
+
field :promoted, Boolean, "If this assembly is promoted (therefore in the homepage)", null: true
|
28
|
+
field :developer_group, Decidim::Core::TranslatedFieldType, "The promoter group of this assembly", null: true
|
29
|
+
field :meta_scope, Decidim::Core::TranslatedFieldType, "The scope metadata of this assembly", null: true
|
30
|
+
field :local_area, Decidim::Core::TranslatedFieldType, "The organization area of this assembly", null: true
|
31
|
+
field :target, Decidim::Core::TranslatedFieldType, "Who participates in this assembly", null: true
|
32
|
+
field :participatory_scope, Decidim::Core::TranslatedFieldType, "What is decided on this assembly", null: true
|
33
|
+
field :participatory_structure, Decidim::Core::TranslatedFieldType, "How it is decided on this assembly", null: true
|
34
|
+
field :show_statistics, Boolean, "If this assembly should show statistics", null: true
|
35
|
+
field :scopes_enabled, Boolean, "If this assembly has scopes enabled", null: true
|
36
|
+
field :private_space, Boolean, "If this assembly is a private space", null: true
|
37
|
+
field :area, Decidim::Core::AreaApiType, "Area of this assembly", null: true
|
38
|
+
field :parent, Decidim::Assemblies::AssemblyType, "The parent assembly of this assembly", null: true
|
39
|
+
field :parents_path, String, "Assembly hierarchy representation", null: true
|
40
|
+
field :children_count, Integer, "Number of children assemblies", null: true
|
41
|
+
field :purpose_of_action, Decidim::Core::TranslatedFieldType, "Purpose of action", null: true
|
42
|
+
field :composition, Decidim::Core::TranslatedFieldType, "Composition of this assembly", null: true
|
43
|
+
field :assembly_type, Decidim::Assemblies::AssembliesTypeType, "Type of the assembly", null: true
|
44
|
+
field :creation_date, Decidim::Core::DateType, "Creation date of this assembly", null: true
|
45
|
+
field :created_by, String, "The creator of this assembly", null: true
|
46
|
+
field :created_by_other, Decidim::Core::TranslatedFieldType, "Custom creator", null: true
|
47
|
+
field :duration, Decidim::Core::DateType, "Duration of this assembly", null: true
|
48
|
+
field :included_at, Decidim::Core::DateType, "Included at", null: true
|
49
|
+
field :closing_date, Decidim::Core::DateType, "Closing date of the assembly", null: true
|
50
|
+
field :closing_date_reason, Decidim::Core::TranslatedFieldType, "Closing date reason of this assembly", null: true
|
51
|
+
field :internal_organisation, Decidim::Core::TranslatedFieldType, "Internal organisation of this assembly", null: true
|
52
|
+
field :is_transparent, Boolean, "If this assembly is transparent", null: true
|
53
|
+
field :special_features, Decidim::Core::TranslatedFieldType, "Special features of this assembly", null: true
|
54
|
+
field :twitter_handler, String, "Twitter handler", null: true
|
55
|
+
field :instagram_handler, String, "Instagram handler", null: true
|
56
|
+
field :facebook_handler, String, "Facebook handler", null: true
|
57
|
+
field :youtube_handler, String, "Youtube handler", null: true
|
58
|
+
field :github_handler, String, "Github handler", null: true
|
59
|
+
|
60
|
+
field :members, [Decidim::Assemblies::AssemblyMemberType, { null: true }], "Members of this assembly", null: false
|
61
|
+
field :children, [Decidim::Assemblies::AssemblyType, { null: true }], "Childrens of this assembly", null: false
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
data/lib/decidim/assemblies.rb
CHANGED
@@ -50,6 +50,7 @@ module Decidim
|
|
50
50
|
get :share
|
51
51
|
end
|
52
52
|
resources :exports, only: :create
|
53
|
+
resources :imports, only: [:new, :create]
|
53
54
|
end
|
54
55
|
|
55
56
|
resources :moderations do
|
@@ -58,6 +59,7 @@ module Decidim
|
|
58
59
|
put :hide
|
59
60
|
put :unhide
|
60
61
|
end
|
62
|
+
resources :reports, controller: "moderations/reports", only: [:index, :show]
|
61
63
|
end
|
62
64
|
|
63
65
|
resources :participatory_space_private_users, controller: "participatory_space_private_users" do
|
@@ -81,6 +83,12 @@ module Decidim
|
|
81
83
|
end
|
82
84
|
end
|
83
85
|
|
86
|
+
initializer "decidim_assemblies.action_controller" do |_app|
|
87
|
+
ActiveSupport.on_load :action_controller do
|
88
|
+
helper Decidim::Assemblies::Admin::AssembliesAdminMenuHelper if respond_to?(:helper)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
84
92
|
initializer "decidim_assemblies.admin_assets" do |app|
|
85
93
|
app.config.assets.precompile += %w(admin/decidim_assemblies_manifest.js)
|
86
94
|
end
|
@@ -90,11 +98,33 @@ module Decidim
|
|
90
98
|
menu.item I18n.t("menu.assemblies", scope: "decidim.admin"),
|
91
99
|
decidim_admin_assemblies.assemblies_path,
|
92
100
|
icon_name: "dial",
|
93
|
-
position:
|
101
|
+
position: 2.2,
|
94
102
|
active: :inclusive,
|
95
103
|
if: allowed_to?(:enter, :space_area, space_name: :assemblies)
|
96
104
|
end
|
97
105
|
end
|
106
|
+
|
107
|
+
initializer "decidim_assemblies.admin_assemblies_menu" do
|
108
|
+
Decidim.menu :admin_assemblies_menu do |menu|
|
109
|
+
menu.item I18n.t("menu.assemblies", scope: "decidim.admin"),
|
110
|
+
decidim_admin_assemblies.assemblies_path,
|
111
|
+
position: 1.0,
|
112
|
+
active: is_active_link?(decidim_admin_assemblies.assemblies_path),
|
113
|
+
if: allowed_to?(:read, :assembly_list)
|
114
|
+
|
115
|
+
menu.item I18n.t("menu.assemblies_types", scope: "decidim.admin"),
|
116
|
+
decidim_admin_assemblies.assemblies_types_path,
|
117
|
+
active: is_active_link?(decidim_admin_assemblies.assemblies_types_path),
|
118
|
+
position: 1.1,
|
119
|
+
if: allowed_to?(:manage, :assemblies_type)
|
120
|
+
|
121
|
+
menu.item I18n.t("menu.assemblies_settings", scope: "decidim.admin"),
|
122
|
+
decidim_admin_assemblies.edit_assemblies_settings_path,
|
123
|
+
active: is_active_link?(decidim_admin_assemblies.edit_assemblies_settings_path),
|
124
|
+
position: 1.3,
|
125
|
+
if: allowed_to?(:read, :assemblies_setting)
|
126
|
+
end
|
127
|
+
end
|
98
128
|
end
|
99
129
|
end
|
100
130
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Assemblies
|
5
|
+
autoload :AssemblyType, "decidim/api/assembly_type"
|
6
|
+
autoload :AssemblyMemberType, "decidim/api/assembly_member_type"
|
7
|
+
autoload :AssembliesTypeType, "decidim/api/assemblies_type_type"
|
8
|
+
end
|
9
|
+
end
|