decidim-conferences 0.24.2 → 0.25.0.rc3
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/conferences/conference_m_cell.rb +1 -1
- data/app/cells/decidim/conferences/conference_speaker/show.erb +2 -2
- data/app/cells/decidim/conferences/conference_speaker_cell.rb +3 -3
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +1 -1
- data/app/cells/decidim/conferences/partner_cell.rb +2 -2
- data/app/commands/decidim/conferences/admin/copy_conference.rb +9 -2
- data/app/commands/decidim/conferences/admin/create_conference_speaker.rb +4 -2
- data/app/commands/decidim/conferences/admin/update_conference.rb +5 -10
- data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +5 -9
- data/app/commands/decidim/conferences/admin/update_diploma.rb +2 -2
- data/app/commands/decidim/conferences/admin/update_partner.rb +5 -5
- data/app/controllers/decidim/conferences/admin/conference_invites_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +3 -3
- data/app/controllers/decidim/conferences/admin/conferences_controller.rb +1 -5
- data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +2 -4
- data/app/forms/decidim/conferences/admin/conference_form.rb +2 -2
- data/app/forms/decidim/conferences/admin/conference_speaker_form.rb +1 -1
- data/app/forms/decidim/conferences/admin/partner_form.rb +2 -2
- data/app/models/decidim/conference.rb +8 -8
- data/app/models/decidim/conference_speaker.rb +2 -2
- data/app/models/decidim/conferences/partner.rb +2 -2
- data/app/packs/entrypoints/decidim_conferences_admin.js +7 -0
- data/app/{assets/images/decidim/conferences/conference.svg → packs/images/decidim/conferences/decidim_conferences.svg} +0 -0
- data/app/{assets/javascripts/decidim/conferences/admin/conference_invite_form.es6 → packs/src/decidim/conferences/admin/conference_invite_form.js} +3 -3
- data/app/{assets/javascripts/decidim/conferences/admin/conference_speakers.js.es6 → packs/src/decidim/conferences/admin/conference_speakers.js} +3 -3
- data/app/packs/src/decidim/conferences/admin/conferences.js +27 -0
- data/app/{assets/stylesheet → packs/stylesheets}/decidim/conferences/conferences.scss +0 -0
- data/app/presenters/decidim/conferences/conference_stats_presenter.rb +8 -22
- data/app/queries/decidim/conferences/admin/admin_users.rb +24 -11
- data/app/uploaders/decidim/conferences/diploma_uploader.rb +4 -2
- data/app/uploaders/decidim/conferences/partner_logo_uploader.rb +5 -5
- data/app/uploaders/decidim/cw/conferences/diploma_uploader.rb +14 -0
- data/app/uploaders/decidim/cw/conferences/partner_logo_uploader.rb +15 -0
- data/app/views/decidim/conferences/admin/conference_copies/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_invites/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_speakers/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_speakers/edit.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conferences/_form.html.erb +1 -3
- data/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb +4 -4
- data/app/views/decidim/conferences/admin/partners/index.html.erb +1 -1
- data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma_user.html.erb +2 -2
- data/app/views/decidim/conferences/conference_program/_program_meeting.html.erb +5 -5
- data/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +3 -3
- data/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +3 -3
- data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +1 -1
- data/app/views/decidim/conferences/conferences/show.html.erb +2 -3
- data/app/views/devise/mailer/join_conference.html.erb +5 -5
- data/app/views/layouts/decidim/_conference_hero.html.erb +1 -1
- data/app/views/layouts/decidim/admin/conference.html.erb +4 -106
- data/app/views/layouts/decidim/conference.html.erb +2 -2
- data/app/views/layouts/decidim/diploma.html.erb +1 -1
- data/config/assets.rb +9 -0
- data/config/locales/ar.yml +0 -18
- data/config/locales/ca.yml +8 -22
- data/config/locales/cs.yml +4 -18
- data/config/locales/de.yml +4 -18
- data/config/locales/el.yml +0 -18
- data/config/locales/en.yml +4 -18
- data/config/locales/es-MX.yml +8 -22
- data/config/locales/es-PY.yml +8 -22
- data/config/locales/es.yml +8 -22
- data/config/locales/eu.yml +0 -18
- data/config/locales/fi-plain.yml +4 -18
- data/config/locales/fi.yml +4 -18
- data/config/locales/fr-CA.yml +1 -18
- data/config/locales/fr-LU.yml +577 -0
- data/config/locales/fr.yml +1 -18
- data/config/locales/gl.yml +23 -18
- data/config/locales/hu.yml +0 -18
- data/config/locales/id-ID.yml +0 -18
- data/config/locales/it.yml +49 -18
- data/config/locales/ja.yml +43 -18
- data/config/locales/lb-LU.yml +1 -0
- data/config/locales/lv.yml +0 -17
- data/config/locales/nl.yml +4 -18
- data/config/locales/no.yml +0 -18
- data/config/locales/pl.yml +27 -26
- data/config/locales/pt-BR.yml +59 -18
- data/config/locales/pt.yml +0 -18
- data/config/locales/ro-RO.yml +24 -18
- data/config/locales/sk.yml +0 -18
- data/config/locales/sl.yml +0 -2
- data/config/locales/sv.yml +2 -17
- data/config/locales/tr-TR.yml +0 -18
- data/config/locales/zh-CN.yml +0 -18
- data/db/migrate/20210408204953_allow_null_logo_column_in_decidim_conferences_partners_table.rb +7 -0
- data/lib/decidim/api/conference_partner_type.rb +4 -0
- data/lib/decidim/api/conference_speaker_type.rb +4 -0
- data/lib/decidim/api/conference_type.rb +9 -1
- data/lib/decidim/conferences/admin_engine.rb +138 -8
- data/lib/decidim/conferences/engine.rb +6 -9
- data/lib/decidim/conferences/participatory_space.rb +40 -7
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +26 -24
- data/app/assets/config/admin/decidim_conferences_manifest.js +0 -3
- data/app/assets/config/decidim_conferences_manifest.js +0 -2
- data/app/assets/javascripts/decidim/conferences/admin/conferences.js.es6 +0 -30
- data/app/assets/javascripts/decidim/conferences/conferences.js.es6 +0 -0
- data/app/views/decidim/conferences/conferences/_statistics.html.erb +0 -10
- data/config/locales/ja-JP.yml +0 -575
data/config/locales/ro-RO.yml
CHANGED
@@ -3,6 +3,7 @@ ro:
|
|
3
3
|
attributes:
|
4
4
|
conference:
|
5
5
|
assemblies_ids: Organizații asemănătoare
|
6
|
+
available_slots: Locuri disponibile
|
6
7
|
banner_image: Imagine pentru banner
|
7
8
|
consultations_ids: Consultări conexe
|
8
9
|
copy_categories: Copiază categoriile
|
@@ -10,26 +11,45 @@ ro:
|
|
10
11
|
copy_features: Copiază caracteristici
|
11
12
|
decidim_scope_id: Domeniu de interes
|
12
13
|
description: Descriere
|
14
|
+
end_date: Data de sfârșit
|
13
15
|
hashtag: Hashtag
|
14
16
|
hero_image: Imagine pagina principală
|
17
|
+
location: Locație
|
18
|
+
main_logo: Logo principal
|
19
|
+
objectives: Obiective
|
15
20
|
participatory_processes_ids: Procese participative conexe
|
16
21
|
promoted: Evidenţiat
|
17
22
|
published_at: Publicat la
|
23
|
+
registration_terms: Condiții de înscriere
|
24
|
+
registrations_enabled: Înregistrare activată
|
18
25
|
scope_id: Domeniu de interes
|
19
26
|
scopes_enabled: Domenii de interes activate
|
20
27
|
short_description: Descriere scurtă
|
21
28
|
show_statistics: Arată statistici
|
29
|
+
signature: Semnătură
|
30
|
+
signature_name: numele semnăturii
|
22
31
|
slogan: Slogan
|
23
32
|
slug: Adresă URL
|
33
|
+
start_date: Data de început
|
24
34
|
title: Titlu
|
25
35
|
conference_media_link:
|
36
|
+
date: Dată
|
37
|
+
link: Link
|
38
|
+
title: Titlu
|
26
39
|
weight: Greutate
|
27
40
|
conference_partner:
|
41
|
+
logo: Logo
|
42
|
+
name: Nume
|
28
43
|
weight: Greutate
|
44
|
+
conference_registration_invite:
|
45
|
+
email: E-mail
|
29
46
|
conference_registration_type:
|
30
47
|
weight: Greutate
|
31
48
|
conference_speaker:
|
49
|
+
avatar: Avatar
|
32
50
|
full_name: Numele complet
|
51
|
+
position: Poziție
|
52
|
+
user_id: Utilizator
|
33
53
|
conference_user_role:
|
34
54
|
email: E-mail
|
35
55
|
name: Nume
|
@@ -215,7 +235,7 @@ ro:
|
|
215
235
|
price: Preț
|
216
236
|
registrations_count: Numărul de înregistrări
|
217
237
|
title: Titlu
|
218
|
-
weight:
|
238
|
+
weight: Poziția comenzii
|
219
239
|
name: Tip de înregistrare
|
220
240
|
partners:
|
221
241
|
create:
|
@@ -471,6 +491,7 @@ ro:
|
|
471
491
|
home:
|
472
492
|
highlighted_conferences:
|
473
493
|
active_conferences: Conferințe active
|
494
|
+
conferences_button_title: Link către pagina de conferințe care afișează toate conferințele
|
474
495
|
see_all_conferences: Vezi toate conferințele
|
475
496
|
photo:
|
476
497
|
image:
|
@@ -502,23 +523,6 @@ ro:
|
|
502
523
|
related_assemblies: Asambluri asemănătoare
|
503
524
|
related_consultations: Consultări conexe
|
504
525
|
related_participatory_processes: Procese participative conexe
|
505
|
-
statistics:
|
506
|
-
answers_count: Răspunsuri
|
507
|
-
comments_count: Comentarii
|
508
|
-
conference_count: Conferințe
|
509
|
-
debates_count: Dezbateri
|
510
|
-
endorsements_count: Susținători
|
511
|
-
headline: Activitate
|
512
|
-
meetings_count: Întâlniri
|
513
|
-
orders_count: Suportă
|
514
|
-
pages_count: Pagini
|
515
|
-
posts_count: Mesaje
|
516
|
-
projects_count: Proiecte
|
517
|
-
proposals_count: Propuneri
|
518
|
-
results_count: Rezultate
|
519
|
-
surveys_count: Chestionare
|
520
|
-
users_count: Participanți
|
521
|
-
votes_count: Suportă
|
522
526
|
events:
|
523
527
|
conferences:
|
524
528
|
conference_registration_confirmed:
|
@@ -566,6 +570,8 @@ ro:
|
|
566
570
|
title: Mass-media și link-uri
|
567
571
|
menu:
|
568
572
|
conferences: Conferințe
|
573
|
+
statistics:
|
574
|
+
conferences_count: Conferințe
|
569
575
|
devise:
|
570
576
|
mailer:
|
571
577
|
join_conference:
|
data/config/locales/sk.yml
CHANGED
@@ -218,7 +218,6 @@ sk:
|
|
218
218
|
price: Cena
|
219
219
|
registrations_count: Počet registrácií
|
220
220
|
title: Názov
|
221
|
-
weight: Váha
|
222
221
|
name: Typ registrácie
|
223
222
|
partners:
|
224
223
|
create:
|
@@ -500,23 +499,6 @@ sk:
|
|
500
499
|
related_assemblies: Súvisiace zhromaždenia
|
501
500
|
related_consultations: Súvisiace Konzultácie
|
502
501
|
related_participatory_processes: Súvisiace participatívne procesy
|
503
|
-
statistics:
|
504
|
-
answers_count: Odpovede
|
505
|
-
comments_count: Komentáre
|
506
|
-
conference_count: Konferencie
|
507
|
-
debates_count: Debaty
|
508
|
-
endorsements_count: Schválenia
|
509
|
-
headline: Aktivita
|
510
|
-
meetings_count: Stretnutia
|
511
|
-
orders_count: Podporenia
|
512
|
-
pages_count: Stránky
|
513
|
-
posts_count: Príspevky
|
514
|
-
projects_count: Projekty
|
515
|
-
proposals_count: Návrhy
|
516
|
-
results_count: Výsledky
|
517
|
-
surveys_count: Prieskumy
|
518
|
-
users_count: Účastníci
|
519
|
-
votes_count: Podporenia
|
520
502
|
events:
|
521
503
|
conferences:
|
522
504
|
conference_registration_confirmed:
|
data/config/locales/sl.yml
CHANGED
data/config/locales/sv.yml
CHANGED
@@ -532,23 +532,6 @@ sv:
|
|
532
532
|
related_assemblies: Relaterade grupper
|
533
533
|
related_consultations: Relaterade samråd
|
534
534
|
related_participatory_processes: Relaterade dialoger
|
535
|
-
statistics:
|
536
|
-
answers_count: Svar
|
537
|
-
comments_count: Kommentarer
|
538
|
-
conference_count: Konferenser
|
539
|
-
debates_count: Debatter
|
540
|
-
endorsements_count: Instämmanden
|
541
|
-
headline: Aktivitet
|
542
|
-
meetings_count: Möten
|
543
|
-
orders_count: Stöd
|
544
|
-
pages_count: Sidor
|
545
|
-
posts_count: Inlägg
|
546
|
-
projects_count: Projekt
|
547
|
-
proposals_count: Förslag
|
548
|
-
results_count: Resultat
|
549
|
-
surveys_count: Undersökningar
|
550
|
-
users_count: Deltagare
|
551
|
-
votes_count: Stöd
|
552
535
|
events:
|
553
536
|
conferences:
|
554
537
|
conference_registration_confirmed:
|
@@ -596,6 +579,8 @@ sv:
|
|
596
579
|
title: Media och länkar
|
597
580
|
menu:
|
598
581
|
conferences: Konferenser
|
582
|
+
statistics:
|
583
|
+
conferences_count: Konferenser
|
599
584
|
devise:
|
600
585
|
mailer:
|
601
586
|
join_conference:
|
data/config/locales/tr-TR.yml
CHANGED
@@ -212,7 +212,6 @@ tr:
|
|
212
212
|
price: Fiyat
|
213
213
|
registrations_count: Kayıt sayısı
|
214
214
|
title: Başlık
|
215
|
-
weight: Ağırlık
|
216
215
|
name: Kayıt Türü
|
217
216
|
partners:
|
218
217
|
create:
|
@@ -494,23 +493,6 @@ tr:
|
|
494
493
|
related_assemblies: İlgili montajlar
|
495
494
|
related_consultations: İlgili istişareler
|
496
495
|
related_participatory_processes: İlgili Katılımcı Süreçler
|
497
|
-
statistics:
|
498
|
-
answers_count: Cevaplar
|
499
|
-
comments_count: Yorumlar
|
500
|
-
conference_count: Konferanslar
|
501
|
-
debates_count: Tartışmalar
|
502
|
-
endorsements_count: Cirolar
|
503
|
-
headline: Aktivite
|
504
|
-
meetings_count: Toplantılar
|
505
|
-
orders_count: oy
|
506
|
-
pages_count: Sayfalar
|
507
|
-
posts_count: Mesajlar
|
508
|
-
projects_count: Projeler
|
509
|
-
proposals_count: Teklif
|
510
|
-
results_count: Sonuçlar
|
511
|
-
surveys_count: Anketler
|
512
|
-
users_count: Katılımcılar
|
513
|
-
votes_count: oy
|
514
496
|
events:
|
515
497
|
conferences:
|
516
498
|
conference_registration_confirmed:
|
data/config/locales/zh-CN.yml
CHANGED
@@ -209,7 +209,6 @@ zh-CN:
|
|
209
209
|
price: 价格
|
210
210
|
registrations_count: 注册次数
|
211
211
|
title: 标题
|
212
|
-
weight: 权重
|
213
212
|
name: 注册类型
|
214
213
|
partners:
|
215
214
|
create:
|
@@ -489,23 +488,6 @@ zh-CN:
|
|
489
488
|
related_assemblies: 相关的会议
|
490
489
|
related_consultations: 相关协商
|
491
490
|
related_participatory_processes: 相关的参与进程
|
492
|
-
statistics:
|
493
|
-
answers_count: 答案
|
494
|
-
comments_count: 评论
|
495
|
-
conference_count: 会议
|
496
|
-
debates_count: 辩论
|
497
|
-
endorsements_count: 授权
|
498
|
-
headline: 活动
|
499
|
-
meetings_count: 会议
|
500
|
-
orders_count: 支持
|
501
|
-
pages_count: 页 次
|
502
|
-
posts_count: 员额
|
503
|
-
projects_count: 项目
|
504
|
-
proposals_count: 建议
|
505
|
-
results_count: 成果
|
506
|
-
surveys_count: 调查
|
507
|
-
users_count: 参加者
|
508
|
-
votes_count: 支持
|
509
491
|
events:
|
510
492
|
conferences:
|
511
493
|
conference_registration_confirmed:
|
@@ -14,6 +14,10 @@ module Decidim
|
|
14
14
|
field :logo, GraphQL::Types::String, "Link to the partner's logo", null: true
|
15
15
|
field :created_at, Decidim::Core::DateTimeType, "The time this partner was created", null: true
|
16
16
|
field :updated_at, Decidim::Core::DateTimeType, "The time this partner was updated", null: true
|
17
|
+
|
18
|
+
def logo
|
19
|
+
object.attached_uploader(:logo).path
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
@@ -18,6 +18,10 @@ module Decidim
|
|
18
18
|
|
19
19
|
field :created_at, Decidim::Core::DateTimeType, "The time this member was created ", null: true
|
20
20
|
field :updated_at, Decidim::Core::DateTimeType, "The time this member was updated", null: true
|
21
|
+
|
22
|
+
def avatar
|
23
|
+
object.attached_uploader(:avatar).path
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
@@ -7,6 +7,7 @@ module Decidim
|
|
7
7
|
implements Decidim::Core::ParticipatorySpaceInterface
|
8
8
|
implements Decidim::Core::ScopableInterface
|
9
9
|
implements Decidim::Core::AttachableInterface
|
10
|
+
implements Decidim::Core::CategoriesContainerInterface
|
10
11
|
|
11
12
|
description "A conference"
|
12
13
|
|
@@ -35,8 +36,15 @@ module Decidim
|
|
35
36
|
|
36
37
|
field :speakers, [Decidim::Conferences::ConferenceSpeakerType, { null: true }], "List of speakers in this conference", null: true
|
37
38
|
field :partners, [Decidim::Conferences::ConferencePartnerType, { null: true }], "List of partners in this conference", null: true
|
38
|
-
field :categories, [Decidim::Core::CategoryType, { null: true }], "List of categories in this conference", null: true
|
39
39
|
field :media_links, [Decidim::Conferences::ConferenceMediaLinkType, { null: true }], "List of media links in this conference", null: true
|
40
|
+
|
41
|
+
def hero_image
|
42
|
+
object.attached_uploader(:hero_image).path
|
43
|
+
end
|
44
|
+
|
45
|
+
def banner_image
|
46
|
+
object.attached_uploader(:banner_image).path
|
47
|
+
end
|
40
48
|
end
|
41
49
|
end
|
42
50
|
end
|
@@ -85,18 +85,148 @@ module Decidim
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
-
initializer "decidim_conferences.
|
89
|
-
|
88
|
+
initializer "decidim_conferences.admin_conferences_components_menu" do
|
89
|
+
Decidim.menu :admin_conferences_components_menu do |menu|
|
90
|
+
current_participatory_space.components.each do |component|
|
91
|
+
caption = translated_attribute(component.name)
|
92
|
+
if component.primary_stat.present?
|
93
|
+
caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter")
|
94
|
+
end
|
95
|
+
|
96
|
+
menu.add_item [component.manifest_name, component.id].join("_"),
|
97
|
+
caption.html_safe,
|
98
|
+
manage_component_path(component),
|
99
|
+
active: is_active_link?(manage_component_path(component)) ||
|
100
|
+
is_active_link?(decidim_admin_conferences.edit_component_path(current_participatory_space, component)) ||
|
101
|
+
is_active_link?(decidim_admin_conferences.edit_component_permissions_path(current_participatory_space, component)) ||
|
102
|
+
participatory_space_active_link?(component),
|
103
|
+
if: component.manifest.admin_engine && user_role_config.component_is_accessible?(component.manifest_name)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
initializer "decidim_conferences.conferences_admin_registrations_menu" do
|
108
|
+
Decidim.menu :conferences_admin_registrations_menu do |menu|
|
109
|
+
menu.add_item :conference_registration_types,
|
110
|
+
I18n.t("registration_types", scope: "decidim.admin.menu.conferences_submenu"),
|
111
|
+
decidim_admin_conferences.conference_registration_types_path(current_participatory_space),
|
112
|
+
active: is_active_link?(decidim_admin_conferences.conference_registration_types_path(current_participatory_space)),
|
113
|
+
if: allowed_to?(:read, :registration_type, conference: current_participatory_space)
|
114
|
+
|
115
|
+
menu.add_item :conference_conference_registrations,
|
116
|
+
I18n.t("user_registrations", scope: "decidim.admin.menu.conferences_submenu"),
|
117
|
+
decidim_admin_conferences.conference_conference_registrations_path(current_participatory_space),
|
118
|
+
active: is_active_link?(decidim_admin_conferences.conference_conference_registrations_path(current_participatory_space)),
|
119
|
+
if: allowed_to?(:read, :conference_registration, conference: current_participatory_space)
|
120
|
+
|
121
|
+
menu.add_item :conference_conference_invites,
|
122
|
+
I18n.t("conference_invites", scope: "decidim.admin.menu.conferences_submenu"),
|
123
|
+
decidim_admin_conferences.conference_conference_invites_path(current_participatory_space),
|
124
|
+
active: is_active_link?(decidim_admin_conferences.conference_conference_invites_path(current_participatory_space)),
|
125
|
+
if: allowed_to?(:read, :conference_invite, conference: current_participatory_space)
|
126
|
+
|
127
|
+
menu.add_item :edit_conference_diploma,
|
128
|
+
I18n.t("diploma", scope: "decidim.admin.menu.conferences_submenu"),
|
129
|
+
decidim_admin_conferences.edit_conference_diploma_path(current_participatory_space),
|
130
|
+
active: is_active_link?(decidim_admin_conferences.edit_conference_diploma_path(current_participatory_space)),
|
131
|
+
if: allowed_to?(:update, :conference, conference: current_participatory_space)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
initializer "decidim_conferences.conferences_admin_attachments_menu" do
|
135
|
+
Decidim.menu :conferences_admin_attachments_menu do |menu|
|
136
|
+
menu.add_item :conference_attachment_collections,
|
137
|
+
I18n.t("attachment_collections", scope: "decidim.admin.menu.conferences_submenu"),
|
138
|
+
decidim_admin_conferences.conference_attachment_collections_path(current_participatory_space),
|
139
|
+
active: is_active_link?(decidim_admin_conferences.conference_attachment_collections_path(current_participatory_space)),
|
140
|
+
if: allowed_to?(:read, :attachment_collection, conference: current_participatory_space)
|
141
|
+
|
142
|
+
menu.add_item :conference_attachments,
|
143
|
+
I18n.t("attachment_files", scope: "decidim.admin.menu.conferences_submenu"),
|
144
|
+
decidim_admin_conferences.conference_attachments_path(current_participatory_space),
|
145
|
+
active: is_active_link?(decidim_admin_conferences.conference_attachments_path(current_participatory_space)),
|
146
|
+
if: allowed_to?(:read, :attachment, conference: current_participatory_space)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
initializer "decidim_conferences.conferences_admin_menu" do
|
150
|
+
Decidim.menu :conferences_admin_menu do |menu|
|
151
|
+
menu.add_item :edit_conference,
|
152
|
+
I18n.t("info", scope: "decidim.admin.menu.conferences_submenu"),
|
153
|
+
decidim_admin_conferences.edit_conference_path(current_participatory_space),
|
154
|
+
position: 1,
|
155
|
+
if: allowed_to?(:update, :conference, conference: current_participatory_space),
|
156
|
+
active: is_active_link?(decidim_admin_conferences.edit_conference_path(current_participatory_space))
|
157
|
+
|
158
|
+
menu.add_item :components,
|
159
|
+
I18n.t("components", scope: "decidim.admin.menu.conferences_submenu"),
|
160
|
+
decidim_admin_conferences.components_path(current_participatory_space),
|
161
|
+
active: is_active_link?(decidim_admin_conferences.components_path(current_participatory_space)),
|
162
|
+
if: allowed_to?(:read, :component, conference: current_participatory_space),
|
163
|
+
submenu: { target_menu: :admin_conferences_components_menu, options: { container_options: { id: "components-list" } } }
|
164
|
+
|
165
|
+
menu.add_item :categories,
|
166
|
+
I18n.t("categories", scope: "decidim.admin.menu.conferences_submenu"),
|
167
|
+
decidim_admin_conferences.categories_path(current_participatory_space),
|
168
|
+
active: is_active_link?(decidim_admin_conferences.categories_path(current_participatory_space)),
|
169
|
+
if: allowed_to?(:read, :category, conference: current_participatory_space)
|
170
|
+
|
171
|
+
menu.add_item :attachments,
|
172
|
+
I18n.t("attachments", scope: "decidim.admin.menu.conferences_submenu"),
|
173
|
+
"#",
|
174
|
+
active: is_active_link?(decidim_admin_conferences.conference_attachment_collections_path(current_participatory_space)) ||
|
175
|
+
is_active_link?(decidim_admin_conferences.conference_attachments_path(current_participatory_space)),
|
176
|
+
if: allowed_to?(:read, :attachment_collection, conference: current_participatory_space) ||
|
177
|
+
allowed_to?(:read, :attachment, conference: current_participatory_space),
|
178
|
+
submenu: { target_menu: :conferences_admin_attachments_menu }
|
179
|
+
|
180
|
+
menu.add_item :conference_media_links,
|
181
|
+
I18n.t("media_links", scope: "decidim.admin.menu.conferences_submenu"),
|
182
|
+
decidim_admin_conferences.conference_media_links_path(current_participatory_space),
|
183
|
+
if: allowed_to?(:read, :media_link, conference: current_participatory_space),
|
184
|
+
active: is_active_link?(decidim_admin_conferences.conference_media_links_path(current_participatory_space))
|
185
|
+
|
186
|
+
menu.add_item :conference_partners,
|
187
|
+
I18n.t("partners", scope: "decidim.admin.menu.conferences_submenu"),
|
188
|
+
decidim_admin_conferences.conference_partners_path(current_participatory_space),
|
189
|
+
if: allowed_to?(:read, :partner, conference: current_participatory_space),
|
190
|
+
active: is_active_link?(decidim_admin_conferences.conference_partners_path(current_participatory_space))
|
191
|
+
|
192
|
+
menu.add_item :conference_speakers,
|
193
|
+
I18n.t("conference_speakers", scope: "decidim.admin.menu.conferences_submenu"),
|
194
|
+
decidim_admin_conferences.conference_speakers_path(current_participatory_space),
|
195
|
+
if: allowed_to?(:read, :conference_speaker, conference: current_participatory_space),
|
196
|
+
active: is_active_link?(decidim_admin_conferences.conference_speakers_path(current_participatory_space))
|
197
|
+
|
198
|
+
menu.add_item :registrations,
|
199
|
+
I18n.t("registrations", scope: "decidim.admin.menu.conferences_submenu"),
|
200
|
+
"#",
|
201
|
+
active: false,
|
202
|
+
if: allowed_to?(:read, :conference_invite, conference: current_participatory_space) ||
|
203
|
+
allowed_to?(:read, :registration_type, conference: current_participatory_space) ||
|
204
|
+
allowed_to?(:read, :conference_registration, conference: current_participatory_space),
|
205
|
+
submenu: { target_menu: :conferences_admin_registrations_menu }
|
206
|
+
|
207
|
+
menu.add_item :conference_user_roles,
|
208
|
+
I18n.t("conference_admins", scope: "decidim.admin.menu.conferences_submenu"),
|
209
|
+
decidim_admin_conferences.conference_user_roles_path(current_participatory_space),
|
210
|
+
if: allowed_to?(:read, :conference_user_role, conference: current_participatory_space),
|
211
|
+
active: is_active_link?(decidim_admin_conferences.conference_user_roles_path(current_participatory_space))
|
212
|
+
|
213
|
+
menu.add_item :moderations,
|
214
|
+
I18n.t("moderations", scope: "decidim.admin.menu.conferences_submenu"),
|
215
|
+
decidim_admin_conferences.moderations_path(current_participatory_space),
|
216
|
+
if: allowed_to?(:read, :moderation, conference: current_participatory_space),
|
217
|
+
active: is_active_link?(decidim_admin_conferences.moderations_path(current_participatory_space))
|
218
|
+
end
|
90
219
|
end
|
91
220
|
|
92
221
|
initializer "decidim_conferences.admin_menu" do
|
93
222
|
Decidim.menu :admin_menu do |menu|
|
94
|
-
menu.
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
223
|
+
menu.add_item :conferences,
|
224
|
+
I18n.t("menu.conferences", scope: "decidim.admin"),
|
225
|
+
decidim_admin_conferences.conferences_path,
|
226
|
+
icon_name: "microphone",
|
227
|
+
position: 2.8,
|
228
|
+
active: :inclusive,
|
229
|
+
if: allowed_to?(:enter, :space_area, space_name: :conferences)
|
100
230
|
end
|
101
231
|
end
|
102
232
|
end
|