decidim-conferences 0.24.3 → 0.25.0.rc1
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 +4 -18
- 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 +4 -18
- data/config/locales/es-PY.yml +4 -18
- data/config/locales/es.yml +4 -18
- 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 +4 -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 +23 -23
- 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 +27 -25
- 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/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
|
@@ -50,10 +50,6 @@ module Decidim
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
initializer "decidim_conferences.assets" do |app|
|
54
|
-
app.config.assets.precompile += %w(decidim_conferences_manifest.js)
|
55
|
-
end
|
56
|
-
|
57
53
|
initializer "decidim_conferences.add_cells_view_paths" do
|
58
54
|
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Conferences::Engine.root}/app/cells")
|
59
55
|
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Conferences::Engine.root}/app/views") # for partials
|
@@ -67,11 +63,12 @@ module Decidim
|
|
67
63
|
|
68
64
|
initializer "decidim_conferences.menu" do
|
69
65
|
Decidim.menu :menu do |menu|
|
70
|
-
menu.
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
66
|
+
menu.add_item :conferences,
|
67
|
+
I18n.t("menu.conferences", scope: "decidim"),
|
68
|
+
decidim_conferences.conferences_path,
|
69
|
+
position: 2.8,
|
70
|
+
if: Decidim::Conference.where(organization: current_organization).published.any?,
|
71
|
+
active: :inclusive
|
75
72
|
end
|
76
73
|
end
|
77
74
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
Decidim.register_participatory_space(:conferences) do |participatory_space|
|
4
|
-
participatory_space.icon = "
|
4
|
+
participatory_space.icon = "media/images/decidim_conferences.svg"
|
5
5
|
participatory_space.model_class_name = "Decidim::Conference"
|
6
6
|
participatory_space.stylesheet = "decidim/conferences/conferences"
|
7
7
|
|
@@ -64,8 +64,18 @@ Decidim.register_participatory_space(:conferences) do |participatory_space|
|
|
64
64
|
Decidim::Faker::Localized.paragraph(sentence_count: 3)
|
65
65
|
end,
|
66
66
|
organization: organization,
|
67
|
-
hero_image:
|
68
|
-
|
67
|
+
hero_image: ActiveStorage::Blob.create_after_upload!(
|
68
|
+
io: File.open(File.join(seeds_root, "city.jpeg")),
|
69
|
+
filename: "hero_image.jpeg",
|
70
|
+
content_type: "image/jpeg",
|
71
|
+
metadata: nil
|
72
|
+
), # Keep after organization
|
73
|
+
banner_image: ActiveStorage::Blob.create_after_upload!(
|
74
|
+
io: File.open(File.join(seeds_root, "city2.jpeg")),
|
75
|
+
filename: "banner_image.jpeg",
|
76
|
+
content_type: "image/jpeg",
|
77
|
+
metadata: nil
|
78
|
+
), # Keep after organization
|
69
79
|
promoted: true,
|
70
80
|
published_at: 2.weeks.ago,
|
71
81
|
objectives: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
@@ -115,21 +125,39 @@ Decidim.register_participatory_space(:conferences) do |participatory_space|
|
|
115
125
|
description: Decidim::Faker::Localized.sentence(word_count: 5),
|
116
126
|
attachment_collection: attachment_collection,
|
117
127
|
attached_to: conference,
|
118
|
-
|
128
|
+
content_type: "application/pdf",
|
129
|
+
file: ActiveStorage::Blob.create_after_upload!(
|
130
|
+
io: File.open(File.join(seeds_root, "Exampledocument.pdf")),
|
131
|
+
filename: "Exampledocument.pdf",
|
132
|
+
content_type: "application/pdf",
|
133
|
+
metadata: nil
|
134
|
+
) # Keep after attached_to
|
119
135
|
)
|
120
136
|
|
121
137
|
Decidim::Attachment.create!(
|
122
138
|
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
123
139
|
description: Decidim::Faker::Localized.sentence(word_count: 5),
|
124
140
|
attached_to: conference,
|
125
|
-
|
141
|
+
content_type: "image/jpeg",
|
142
|
+
file: ActiveStorage::Blob.create_after_upload!(
|
143
|
+
io: File.open(File.join(seeds_root, "city.jpeg")),
|
144
|
+
filename: "city.jpeg",
|
145
|
+
content_type: "image/jpeg",
|
146
|
+
metadata: nil
|
147
|
+
) # Keep after attached_to
|
126
148
|
)
|
127
149
|
|
128
150
|
Decidim::Attachment.create!(
|
129
151
|
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
130
152
|
description: Decidim::Faker::Localized.sentence(word_count: 5),
|
131
153
|
attached_to: conference,
|
132
|
-
|
154
|
+
content_type: "application/pdf",
|
155
|
+
file: ActiveStorage::Blob.create_after_upload!(
|
156
|
+
io: File.open(File.join(seeds_root, "Exampledocument.pdf")),
|
157
|
+
filename: "Exampledocument.pdf",
|
158
|
+
content_type: "application/pdf",
|
159
|
+
metadata: nil
|
160
|
+
) # Keep after attached_to
|
133
161
|
)
|
134
162
|
|
135
163
|
2.times do
|
@@ -165,7 +193,12 @@ Decidim.register_participatory_space(:conferences) do |participatory_space|
|
|
165
193
|
link: Faker::Internet.url,
|
166
194
|
partner_type: type,
|
167
195
|
conference: conference,
|
168
|
-
logo:
|
196
|
+
logo: ActiveStorage::Blob.create_after_upload!(
|
197
|
+
io: File.open(File.join(seeds_root, "logo.png")),
|
198
|
+
filename: "logo.png",
|
199
|
+
content_type: "image/png",
|
200
|
+
metadata: nil
|
201
|
+
) # Keep after conference
|
169
202
|
)
|
170
203
|
end
|
171
204
|
end
|