decidim-conferences 0.30.2 → 0.31.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_settings_form/show.erb +3 -1
- data/app/commands/decidim/conferences/admin/create_conference.rb +1 -1
- data/app/commands/decidim/conferences/admin/{copy_conference.rb → duplicate_conference.rb} +15 -16
- data/app/commands/decidim/conferences/admin/update_conference.rb +2 -2
- data/app/controllers/decidim/conferences/admin/conference_duplicates_controller.rb +35 -0
- data/app/controllers/decidim/conferences/admin/conference_invites_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +4 -4
- data/app/controllers/decidim/conferences/admin/conferences_controller.rb +3 -3
- data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/media_links_controller.rb +2 -2
- data/app/controllers/decidim/conferences/admin/partners_controller.rb +2 -2
- data/app/controllers/decidim/conferences/admin/registration_types_controller.rb +2 -2
- data/app/forms/decidim/conferences/admin/{conference_copy_form.rb → conference_duplicate_form.rb} +3 -3
- data/app/forms/decidim/conferences/admin/conference_form.rb +0 -4
- data/app/helpers/decidim/conferences/conference_helper.rb +1 -0
- data/app/jobs/decidim/conferences/upcoming_conference_notification_job.rb +1 -1
- data/app/models/decidim/conference.rb +0 -4
- data/app/models/decidim/conferences/registration_type.rb +4 -0
- data/app/packs/entrypoints/decidim_conferences_admin.js +0 -1
- data/app/packs/src/decidim/conferences/admin/conference_invite_form.js +1 -1
- data/app/packs/src/decidim/conferences/admin/conference_speakers.js +1 -1
- data/app/packs/src/decidim/conferences/admin/conferences.js +1 -1
- data/app/packs/stylesheets/decidim/conferences/conferences.scss +5 -5
- data/app/permissions/decidim/conferences/permissions.rb +4 -4
- data/app/presenters/decidim/conference_speaker_presenter.rb +0 -4
- data/app/presenters/decidim/conferences/admin_log/conference_presenter.rb +0 -1
- data/app/presenters/decidim/conferences/conference_stats_presenter.rb +1 -3
- data/app/queries/decidim/conferences/admin/conference_speakers.rb +2 -2
- data/app/queries/decidim/conferences/conferences_stats_followers_count.rb +14 -0
- data/app/queries/decidim/conferences/conferences_stats_participants_count.rb +14 -0
- data/app/views/decidim/conferences/admin/{conference_copies → conference_duplicates}/_form.html.erb +3 -3
- data/app/views/decidim/conferences/admin/conference_duplicates/new.html.erb +19 -0
- data/app/views/decidim/conferences/admin/conference_registrations/index.html.erb +34 -20
- data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +51 -22
- data/app/views/decidim/conferences/admin/conference_user_roles/index.html.erb +44 -17
- data/app/views/decidim/conferences/admin/conferences/_actions.html.erb +108 -33
- data/app/views/decidim/conferences/admin/conferences/_conference_row.html.erb +4 -4
- data/app/views/decidim/conferences/admin/conferences/_conferences_thead.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conferences/_form.html.erb +115 -40
- data/app/views/decidim/conferences/admin/conferences/edit.html.erb +0 -8
- data/app/views/decidim/conferences/admin/conferences/index.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conferences/manage_trash.html.erb +2 -1
- data/app/views/decidim/conferences/admin/media_links/index.html.erb +32 -13
- data/app/views/decidim/conferences/admin/partners/index.html.erb +33 -14
- data/app/views/decidim/conferences/admin/registration_types/index.html.erb +56 -21
- data/app/views/decidim/conferences/conference_program/show.html.erb +1 -1
- data/app/views/decidim/conferences/conferences/_conference_hero.html.erb +0 -5
- data/app/views/decidim/conferences/conferences/show.html.erb +1 -1
- data/app/views/layouts/decidim/diploma.html.erb +2 -2
- data/config/assets.rb +2 -2
- data/config/locales/ar.yml +1 -10
- data/config/locales/bg.yml +1 -13
- data/config/locales/bs-BA.yml +0 -5
- data/config/locales/ca-IT.yml +24 -12
- data/config/locales/ca.yml +24 -12
- data/config/locales/cs.yml +23 -11
- data/config/locales/de.yml +25 -13
- data/config/locales/el.yml +1 -10
- data/config/locales/en.yml +24 -12
- data/config/locales/es-MX.yml +24 -12
- data/config/locales/es-PY.yml +24 -12
- data/config/locales/es.yml +24 -12
- data/config/locales/eu.yml +24 -12
- data/config/locales/fi-plain.yml +23 -11
- data/config/locales/fi.yml +23 -11
- data/config/locales/fr-CA.yml +24 -15
- data/config/locales/fr.yml +24 -15
- data/config/locales/ga-IE.yml +2 -6
- data/config/locales/gl.yml +1 -10
- data/config/locales/hu.yml +1 -10
- data/config/locales/id-ID.yml +1 -9
- data/config/locales/it.yml +1 -10
- data/config/locales/ja.yml +25 -13
- data/config/locales/lb.yml +1 -7
- data/config/locales/lt.yml +1 -10
- data/config/locales/lv.yml +1 -10
- data/config/locales/nl.yml +1 -10
- data/config/locales/no.yml +1 -10
- data/config/locales/pl.yml +1 -13
- data/config/locales/pt-BR.yml +1 -13
- data/config/locales/pt.yml +1 -10
- data/config/locales/ro-RO.yml +3 -10
- data/config/locales/sk.yml +1 -10
- data/config/locales/sl.yml +0 -5
- data/config/locales/sr-CS.yml +0 -5
- data/config/locales/sv.yml +16 -13
- data/config/locales/tr-TR.yml +1 -10
- data/config/locales/zh-CN.yml +1 -10
- data/config/locales/zh-TW.yml +1 -10
- data/db/migrate/20250605094623_remove_hashtag_column_conferences.rb +7 -0
- data/lib/decidim/api/conference_registration_type_type.rb +30 -0
- data/lib/decidim/api/conference_speaker_type.rb +12 -0
- data/lib/decidim/api/conference_type.rb +15 -3
- data/lib/decidim/conferences/admin_engine.rb +1 -1
- data/lib/decidim/conferences/api.rb +1 -0
- data/lib/decidim/conferences/conference_diploma_pdf.rb +1 -1
- data/lib/decidim/conferences/engine.rb +5 -3
- data/lib/decidim/conferences/participatory_space.rb +14 -0
- data/lib/decidim/conferences/seeds.rb +5 -6
- data/lib/decidim/conferences/test/factories.rb +2 -2
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +19 -15
- data/app/controllers/decidim/conferences/admin/conference_copies_controller.rb +0 -35
- data/app/views/decidim/conferences/admin/conference_copies/new.html.erb +0 -19
data/config/locales/sk.yml
CHANGED
@@ -3,14 +3,9 @@ sk:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
conference:
|
6
|
-
assemblies_ids: Podobné zhromaždenia
|
7
6
|
banner_image: Obrázok banneru
|
8
|
-
copy_categories: Kopírovať kategórie
|
9
|
-
copy_components: Kopírovať komponenty
|
10
|
-
copy_features: Kopírovať prvky
|
11
7
|
decidim_scope_id: Rozsah
|
12
8
|
description: Popis
|
13
|
-
hashtag: Hashtag
|
14
9
|
hero_image: Obrázok na hlavnej stránke
|
15
10
|
participatory_processes_ids: Podobné participatívne procesy
|
16
11
|
promoted: Zvýraznené
|
@@ -48,9 +43,6 @@ sk:
|
|
48
43
|
actions:
|
49
44
|
confirm: Potvrdiť
|
50
45
|
send_diplomas: Zaslať certifikáty o účasti
|
51
|
-
conference_copies:
|
52
|
-
new:
|
53
|
-
copy: Kopírovať
|
54
46
|
conference_publications:
|
55
47
|
create:
|
56
48
|
error: Vyskytol sa problém s publikovaním konferencie.
|
@@ -99,12 +91,12 @@ sk:
|
|
99
91
|
exports:
|
100
92
|
registrations: Registrácie
|
101
93
|
form:
|
94
|
+
images: Obrázky
|
102
95
|
title: Všeobecné informácie
|
103
96
|
index:
|
104
97
|
published: Zverejnené
|
105
98
|
new:
|
106
99
|
create: Vytvoriť
|
107
|
-
title: Konferencia
|
108
100
|
update:
|
109
101
|
error: Vyskytol sa problém s aktualizáciou tejto konferencie.
|
110
102
|
success: Konferencia úspešne aktualizovaná.
|
@@ -152,7 +144,6 @@ sk:
|
|
152
144
|
admin: Administrátor
|
153
145
|
collaborator: Spolupracovník
|
154
146
|
moderator: Moderátor
|
155
|
-
valuator: Hodnotiteľ
|
156
147
|
media_link:
|
157
148
|
fields:
|
158
149
|
date: Dátum
|
data/config/locales/sl.yml
CHANGED
@@ -3,9 +3,7 @@ sl:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
conference:
|
6
|
-
assemblies_ids: Povezane združbe
|
7
6
|
description: Opis
|
8
|
-
hashtag: Ključnik
|
9
7
|
published_at: Objavljeno
|
10
8
|
short_description: Kratek opis
|
11
9
|
show_statistics: Pokaži statistiko
|
@@ -20,9 +18,6 @@ sl:
|
|
20
18
|
admin:
|
21
19
|
actions:
|
22
20
|
confirm: Potrdi
|
23
|
-
conference_copies:
|
24
|
-
new:
|
25
|
-
copy: Kopiraj
|
26
21
|
conference_speakers:
|
27
22
|
edit:
|
28
23
|
update: Posodobi
|
data/config/locales/sr-CS.yml
CHANGED
data/config/locales/sv.yml
CHANGED
@@ -6,13 +6,9 @@ sv:
|
|
6
6
|
assemblies_ids: Relaterade samråd
|
7
7
|
available_slots: Tillgängliga platser
|
8
8
|
banner_image: Bannerbild
|
9
|
-
copy_categories: Kopiera kategorier
|
10
|
-
copy_components: Kopiera komponenter
|
11
|
-
copy_features: Kopiera funktioner
|
12
9
|
decidim_scope_id: Indelning
|
13
10
|
description: Beskrivning
|
14
11
|
end_date: Slutdatum
|
15
|
-
hashtag: Hashtag
|
16
12
|
hero_image: Bild till startsida
|
17
13
|
location: Plats
|
18
14
|
main_logo: Logotyp
|
@@ -99,9 +95,6 @@ sv:
|
|
99
95
|
new_speaker: Ny talare
|
100
96
|
send_diplomas: Skicka deltagarbevis
|
101
97
|
view_deleted_conferences: Visa raderade konferenser
|
102
|
-
conference_copies:
|
103
|
-
new:
|
104
|
-
copy: Kopiera
|
105
98
|
conference_publications:
|
106
99
|
create:
|
107
100
|
error: Det gick inte att publicera konferensen.
|
@@ -162,7 +155,13 @@ sv:
|
|
162
155
|
exports:
|
163
156
|
registrations: Registreringar
|
164
157
|
form:
|
158
|
+
duration: Tid
|
159
|
+
images: Bilder
|
160
|
+
metadata: Metadata
|
161
|
+
registrations: Anmälningar
|
162
|
+
related_spaces: Relaterade utrymmen
|
165
163
|
title: Allmän information
|
164
|
+
visibility: Synlighet
|
166
165
|
index:
|
167
166
|
published: Publicerad
|
168
167
|
unpublished: Ej publicerad
|
@@ -170,7 +169,7 @@ sv:
|
|
170
169
|
title: Borttagna konferenser
|
171
170
|
new:
|
172
171
|
create: Skapa
|
173
|
-
title:
|
172
|
+
title: Ny konferens
|
174
173
|
update:
|
175
174
|
error: Det gick inte att uppdatera konferensen.
|
176
175
|
success: Konferensen har uppdaterats.
|
@@ -213,17 +212,20 @@ sv:
|
|
213
212
|
models:
|
214
213
|
conference:
|
215
214
|
fields:
|
215
|
+
actions: Åtgärder
|
216
216
|
created_at: Skapad
|
217
217
|
published: Publicerad
|
218
218
|
title: Titel
|
219
219
|
conference_speaker:
|
220
220
|
fields:
|
221
|
+
actions: Handlingar
|
221
222
|
affiliation: Anknytning
|
222
223
|
full_name: Fullständigt namn
|
223
224
|
position: Position
|
224
225
|
name: Talare
|
225
226
|
conference_user_role:
|
226
227
|
fields:
|
228
|
+
actions: Handlingar
|
227
229
|
email: E-post
|
228
230
|
name: Namn
|
229
231
|
role: Roll
|
@@ -231,16 +233,18 @@ sv:
|
|
231
233
|
roles:
|
232
234
|
admin: Administratör
|
233
235
|
collaborator: Medarbetare
|
236
|
+
evaluator: Utvärderare
|
234
237
|
moderator: Moderator
|
235
|
-
valuator: Handläggare
|
236
238
|
media_link:
|
237
239
|
fields:
|
240
|
+
actions: Handlingar
|
238
241
|
date: Datum
|
239
242
|
link: Länk
|
240
243
|
title: Titel
|
241
244
|
name: Medialänk
|
242
245
|
partner:
|
243
246
|
fields:
|
247
|
+
actions: Handlingar
|
244
248
|
link: Länk
|
245
249
|
logo: Logotyp
|
246
250
|
name: Namn
|
@@ -251,6 +255,7 @@ sv:
|
|
251
255
|
main_promotor: Huvudarrangör
|
252
256
|
registration_type:
|
253
257
|
fields:
|
258
|
+
actions: Handlingar
|
254
259
|
conference_meetings: Konferensmöten
|
255
260
|
price: Pris
|
256
261
|
registrations_count: Antal registreringar
|
@@ -345,9 +350,6 @@ sv:
|
|
345
350
|
title: Talare
|
346
351
|
conferences:
|
347
352
|
admin:
|
348
|
-
conference_copies:
|
349
|
-
form:
|
350
|
-
slug_help_html: 'URL-slugs används till att generera URL:er till konferensen. Använd bara bokstäver, siffror och bindestreck, och de måste börja med en bokstav. Exempel: %{url}'
|
351
353
|
conference_invites:
|
352
354
|
create:
|
353
355
|
error: Det gick inte att bjuda in deltagaren till konferensen.
|
@@ -510,6 +512,7 @@ sv:
|
|
510
512
|
sent: Skickad
|
511
513
|
conference_registration:
|
512
514
|
fields:
|
515
|
+
actions: Handlingar
|
513
516
|
email: E-post
|
514
517
|
name: Namn
|
515
518
|
registration_type: Registreringstyp
|
@@ -608,10 +611,10 @@ sv:
|
|
608
611
|
description: Längre beskrivning av konferensen
|
609
612
|
end_date: Det datum då konferens avslutas.
|
610
613
|
follows_count: Antal följare
|
611
|
-
hashtag: Konferensens hashtag, används för Twitter/X
|
612
614
|
id: Unikt id för konferensen
|
613
615
|
statistics:
|
614
616
|
conferences_count: Konferenser
|
617
|
+
conferences_count_tooltip: Antalet publicerade konferenser.
|
615
618
|
devise:
|
616
619
|
mailer:
|
617
620
|
join_conference:
|
data/config/locales/tr-TR.yml
CHANGED
@@ -3,14 +3,9 @@ tr:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
conference:
|
6
|
-
assemblies_ids: İlgili kurullar
|
7
6
|
banner_image: Banner resmi
|
8
|
-
copy_categories: Kategorileri kopyala
|
9
|
-
copy_components: Bileşenleri kopyala
|
10
|
-
copy_features: Özellikleri kopyala
|
11
7
|
decidim_scope_id: Kapsam
|
12
8
|
description: Açıklama
|
13
|
-
hashtag: Etiket
|
14
9
|
hero_image: Ana resim
|
15
10
|
participatory_processes_ids: İlgili katılımcı süreçleri
|
16
11
|
promoted: Vurgulanan
|
@@ -48,9 +43,6 @@ tr:
|
|
48
43
|
new_registration_type: Yeni kayıt türü
|
49
44
|
new_speaker: Yeni Konuşmacı
|
50
45
|
send_diplomas: Katılım sertifikaları gönder
|
51
|
-
conference_copies:
|
52
|
-
new:
|
53
|
-
copy: Kopyala
|
54
46
|
conference_publications:
|
55
47
|
create:
|
56
48
|
error: Bu konferansı yayınlarken bir sorun oluştu.
|
@@ -99,12 +91,12 @@ tr:
|
|
99
91
|
exports:
|
100
92
|
registrations: Kayıtlar
|
101
93
|
form:
|
94
|
+
images: Fotoğraflar
|
102
95
|
title: Genel bilgi
|
103
96
|
index:
|
104
97
|
published: Yayınlandı
|
105
98
|
new:
|
106
99
|
create: Oluştur
|
107
|
-
title: Konferans
|
108
100
|
update:
|
109
101
|
error: Bu konferans güncellenirken bir hata oluştu.
|
110
102
|
success: Konferans başarıyla güncellendi.
|
@@ -152,7 +144,6 @@ tr:
|
|
152
144
|
admin: Yönetici
|
153
145
|
collaborator: İşbirlikçi
|
154
146
|
moderator: Moderatör
|
155
|
-
valuator: Bilirkişi
|
156
147
|
media_link:
|
157
148
|
fields:
|
158
149
|
date: Tarih
|
data/config/locales/zh-CN.yml
CHANGED
@@ -3,14 +3,9 @@ zh-CN:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
conference:
|
6
|
-
assemblies_ids: 相关程序集
|
7
6
|
banner_image: 横幅图像
|
8
|
-
copy_categories: 复制类别
|
9
|
-
copy_components: 复制组件
|
10
|
-
copy_features: 复制功能
|
11
7
|
decidim_scope_id: 范围
|
12
8
|
description: 描述
|
13
|
-
hashtag: 标签
|
14
9
|
hero_image: 首页图像
|
15
10
|
participatory_processes_ids: 相关的参与进程
|
16
11
|
promoted: 高亮
|
@@ -39,9 +34,6 @@ zh-CN:
|
|
39
34
|
actions:
|
40
35
|
confirm: 确认
|
41
36
|
send_diplomas: 发送出勤证书
|
42
|
-
conference_copies:
|
43
|
-
new:
|
44
|
-
copy: 复制
|
45
37
|
conference_publications:
|
46
38
|
create:
|
47
39
|
error: 发布此会议时出现问题。
|
@@ -90,12 +82,12 @@ zh-CN:
|
|
90
82
|
exports:
|
91
83
|
registrations: 注册
|
92
84
|
form:
|
85
|
+
images: 图像
|
93
86
|
title: 一般信息
|
94
87
|
index:
|
95
88
|
published: 已发布
|
96
89
|
new:
|
97
90
|
create: 创建
|
98
|
-
title: 'Original: ENGLISH'
|
99
91
|
update:
|
100
92
|
error: 更新此会议时出现问题。
|
101
93
|
success: 会议已成功更新。
|
@@ -143,7 +135,6 @@ zh-CN:
|
|
143
135
|
admin: 管理员
|
144
136
|
collaborator: 协作者
|
145
137
|
moderator: 版主
|
146
|
-
valuator: 值者
|
147
138
|
media_link:
|
148
139
|
fields:
|
149
140
|
date: 日期
|
data/config/locales/zh-TW.yml
CHANGED
@@ -3,16 +3,11 @@ zh-TW:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
conference:
|
6
|
-
assemblies_ids: 相關大會
|
7
6
|
available_slots: 可用時段
|
8
7
|
banner_image: 橫幅圖片
|
9
|
-
copy_categories: 複製類別
|
10
|
-
copy_components: 複製組件
|
11
|
-
copy_features: 複製功能
|
12
8
|
decidim_scope_id: 範圍
|
13
9
|
description: 說明
|
14
10
|
end_date: 結束日期
|
15
|
-
hashtag: 主題標籤
|
16
11
|
hero_image: 首頁圖片
|
17
12
|
location: 位置
|
18
13
|
main_logo: 主要標誌
|
@@ -85,9 +80,6 @@ zh-TW:
|
|
85
80
|
actions:
|
86
81
|
confirm: 確認
|
87
82
|
send_diplomas: 發送出席證明書
|
88
|
-
conference_copies:
|
89
|
-
new:
|
90
|
-
copy: 複製
|
91
83
|
conference_publications:
|
92
84
|
create:
|
93
85
|
error: 發布此研討會時出現問題。
|
@@ -138,12 +130,12 @@ zh-TW:
|
|
138
130
|
exports:
|
139
131
|
registrations: 註冊
|
140
132
|
form:
|
133
|
+
images: 圖片
|
141
134
|
title: 基本資訊
|
142
135
|
index:
|
143
136
|
published: 已發佈
|
144
137
|
new:
|
145
138
|
create: 建立
|
146
|
-
title: 研討會
|
147
139
|
update:
|
148
140
|
error: 更新此研討會時發生問題。
|
149
141
|
success: 研討會更新成功。
|
@@ -191,7 +183,6 @@ zh-TW:
|
|
191
183
|
admin: 管理員
|
192
184
|
collaborator: 合作者
|
193
185
|
moderator: 版主
|
194
|
-
valuator: 評價者
|
195
186
|
media_link:
|
196
187
|
fields:
|
197
188
|
date: 日期
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
# This type represents a registration type
|
6
|
+
class ConferenceRegistrationTypeType < Decidim::Api::Types::BaseObject
|
7
|
+
implements Decidim::Core::TimestampsInterface
|
8
|
+
|
9
|
+
description "A conference registration type"
|
10
|
+
|
11
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description of this registration type.", null: true
|
12
|
+
field :id, GraphQL::Types::ID, "Internal ID of the registration type.", null: false
|
13
|
+
field :price, GraphQL::Types::Float, "The budget amount for this project", null: true
|
14
|
+
field :published_at, Decidim::Core::DateTimeType, "The time this conference was published", null: true
|
15
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title of this registration type.", null: false
|
16
|
+
field :weight, GraphQL::Types::Int, "The weight for this object", null: false
|
17
|
+
|
18
|
+
def self.authorized?(object, context)
|
19
|
+
chain = [
|
20
|
+
allowed_to?(:list, :registration_types, object, context),
|
21
|
+
object.visible?
|
22
|
+
].all?
|
23
|
+
|
24
|
+
super && chain
|
25
|
+
rescue Decidim::PermissionAction::PermissionNotSetError
|
26
|
+
false
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -14,6 +14,7 @@ module Decidim
|
|
14
14
|
field :id, GraphQL::Types::ID, "Internal ID of the speaker", null: false
|
15
15
|
field :personal_url, GraphQL::Types::String, "Personal URL of the speaker", null: true
|
16
16
|
field :position, Decidim::Core::TranslatedFieldType, "Position of the speaker in the conference", null: true
|
17
|
+
field :published_at, Decidim::Core::DateTimeType, "The time this speaker was published", null: true
|
17
18
|
field :short_bio, Decidim::Core::TranslatedFieldType, "Short biography of the speaker", null: true
|
18
19
|
field :twitter_handle, GraphQL::Types::String, "X handle", null: true
|
19
20
|
field :user, Decidim::Core::UserType, "Decidim user corresponding to this speaker", null: true
|
@@ -21,6 +22,17 @@ module Decidim
|
|
21
22
|
def avatar
|
22
23
|
object.attached_uploader(:avatar).url
|
23
24
|
end
|
25
|
+
|
26
|
+
def self.authorized?(object, context)
|
27
|
+
chain = [
|
28
|
+
allowed_to?(:list, :speakers, object, context),
|
29
|
+
object.published?
|
30
|
+
].all?
|
31
|
+
|
32
|
+
super && chain
|
33
|
+
rescue Decidim::PermissionAction::PermissionNotSetError
|
34
|
+
false
|
35
|
+
end
|
24
36
|
end
|
25
37
|
end
|
26
38
|
end
|
@@ -7,9 +7,13 @@ module Decidim
|
|
7
7
|
implements Decidim::Core::ParticipatorySpaceInterface
|
8
8
|
implements Decidim::Core::ScopableInterface
|
9
9
|
implements Decidim::Core::AttachableInterface
|
10
|
+
implements Decidim::Core::AttachableCollectionInterface
|
10
11
|
implements Decidim::Core::TaxonomizableInterface
|
11
12
|
implements Decidim::Core::TimestampsInterface
|
13
|
+
implements Decidim::Core::ReferableInterface
|
14
|
+
implements Decidim::Core::FollowableInterface
|
12
15
|
implements Decidim::Core::CategoriesContainerInterface
|
16
|
+
implements Decidim::Core::TraceableInterface
|
13
17
|
|
14
18
|
description "A conference"
|
15
19
|
|
@@ -17,17 +21,15 @@ module Decidim
|
|
17
21
|
field :banner_image, GraphQL::Types::String, "The banner image for this conference", null: true
|
18
22
|
field :description, Decidim::Core::TranslatedFieldType, "The description of this conference", null: true
|
19
23
|
field :end_date, Decidim::Core::DateType, "The date this conference ends", null: true
|
20
|
-
field :hashtag, GraphQL::Types::String, "The hashtag for this conference", null: true
|
21
24
|
field :hero_image, GraphQL::Types::String, "The hero image for this conference", null: true
|
22
|
-
field :id, GraphQL::Types::ID, "Internal ID for this conference", null: false
|
23
25
|
field :location, String, "The location of this conference", null: true
|
24
26
|
field :media_links, [Decidim::Conferences::ConferenceMediaLinkType, { null: true }], "List of media links in this conference", null: true
|
25
27
|
field :objectives, Decidim::Core::TranslatedFieldType, "The objectives of the conference", null: true
|
26
28
|
field :partners, [Decidim::Conferences::ConferencePartnerType, { null: true }], "List of partners in this conference", null: true
|
27
29
|
field :promoted, GraphQL::Types::Boolean, "If this conference is promoted (therefore in the homepage)", null: true
|
28
30
|
field :published_at, Decidim::Core::DateTimeType, "The time this conference was published", null: true
|
29
|
-
field :reference, GraphQL::Types::String, "Reference prefix for this conference", null: true
|
30
31
|
field :registration_terms, Decidim::Core::TranslatedFieldType, "The registration terms of this conference", null: true
|
32
|
+
field :registration_types, [Decidim::Conferences::ConferenceRegistrationTypeType, { null: true }], "List of all registration type of this conference", null: true
|
31
33
|
field :registrations_enabled, GraphQL::Types::Boolean, "If the registrations are enabled in this conference", null: true
|
32
34
|
field :short_description, Decidim::Core::TranslatedFieldType, "The short description of this conference", null: true
|
33
35
|
field :show_statistics, GraphQL::Types::Boolean, "If this conference shows the statistics", null: true
|
@@ -35,6 +37,12 @@ module Decidim
|
|
35
37
|
field :slug, GraphQL::Types::String, "The slug of this conference", null: true
|
36
38
|
field :speakers, [Decidim::Conferences::ConferenceSpeakerType, { null: true }], "List of speakers in this conference", null: true
|
37
39
|
field :start_date, Decidim::Core::DateType, "The date this conference starts", null: true
|
40
|
+
field :url, GraphQL::Types::String, "The URL of this conference", null: true
|
41
|
+
field :weight, GraphQL::Types::Int, "The weight for this object", null: false
|
42
|
+
|
43
|
+
def url
|
44
|
+
EngineRouter.main_proxy(object).conference_url(object)
|
45
|
+
end
|
38
46
|
|
39
47
|
def hero_image
|
40
48
|
object.attached_uploader(:hero_image).url
|
@@ -47,6 +55,10 @@ module Decidim
|
|
47
55
|
def speakers
|
48
56
|
object.speakers.published
|
49
57
|
end
|
58
|
+
|
59
|
+
def registration_types
|
60
|
+
object.registration_types.published
|
61
|
+
end
|
50
62
|
end
|
51
63
|
end
|
52
64
|
end
|
@@ -18,7 +18,7 @@ module Decidim
|
|
18
18
|
constraints(->(request) { Decidim::Admin::OrganizationDashboardConstraint.new(request).matches? }) do
|
19
19
|
resources :conferences, param: :slug, except: [:show, :destroy] do
|
20
20
|
resource :publish, controller: "conference_publications", only: [:create, :destroy]
|
21
|
-
resources :
|
21
|
+
resources :duplicates, controller: "conference_duplicates", only: [:new, :create]
|
22
22
|
resources :speakers, controller: "conference_speakers" do
|
23
23
|
member do
|
24
24
|
put :publish
|
@@ -6,5 +6,6 @@ module Decidim
|
|
6
6
|
autoload :ConferenceMediaLinkType, "decidim/api/conference_media_link_type"
|
7
7
|
autoload :ConferencePartnerType, "decidim/api/conference_partner_type"
|
8
8
|
autoload :ConferenceSpeakerType, "decidim/api/conference_speaker_type"
|
9
|
+
autoload :ConferenceRegistrationTypeType, "decidim/api/conference_registration_type_type"
|
9
10
|
end
|
10
11
|
end
|
@@ -62,7 +62,6 @@ module Decidim
|
|
62
62
|
|
63
63
|
Decidim.icons.register(name: "film-line", icon: "film-line", category: "system", description: "", engine: :conferences)
|
64
64
|
Decidim.icons.register(name: "ticket-line", icon: "ticket-line", category: "system", description: "", engine: :conferences)
|
65
|
-
Decidim.icons.register(name: "user-follow-line", icon: "user-follow-line", category: "system", description: "", engine: :conferences)
|
66
65
|
Decidim.icons.register(name: "link-m", icon: "link-m", category: "system", description: "", engine: :conferences)
|
67
66
|
end
|
68
67
|
|
@@ -72,7 +71,10 @@ module Decidim
|
|
72
71
|
end
|
73
72
|
|
74
73
|
initializer "decidim_conferences.stats" do
|
75
|
-
Decidim.stats.register :conferences_count,
|
74
|
+
Decidim.stats.register :conferences_count,
|
75
|
+
priority: StatsRegistry::HIGH_PRIORITY,
|
76
|
+
icon_name: "user-voice-line",
|
77
|
+
tooltip_key: "conferences_count_tooltip" do |organization, _start_at, _end_at|
|
76
78
|
Decidim::Conference.where(organization:).public_spaces.count
|
77
79
|
end
|
78
80
|
end
|
@@ -91,7 +93,7 @@ module Decidim
|
|
91
93
|
Decidim::Api::QueryType.include Decidim::Conferences::QueryExtensions
|
92
94
|
end
|
93
95
|
|
94
|
-
initializer "decidim_conferences.
|
96
|
+
initializer "decidim_conferences.shakapacker.assets_path" do
|
95
97
|
Decidim.register_assets_path File.expand_path("app/packs", root)
|
96
98
|
end
|
97
99
|
end
|
@@ -25,6 +25,20 @@ Decidim.register_participatory_space(:conferences) do |participatory_space|
|
|
25
25
|
resource.searchable = true
|
26
26
|
end
|
27
27
|
|
28
|
+
participatory_space.register_stat :followers_count,
|
29
|
+
priority: Decidim::StatsRegistry::MEDIUM_PRIORITY,
|
30
|
+
icon_name: "user-follow-line",
|
31
|
+
tooltip_key: "followers_count_tooltip" do
|
32
|
+
Decidim::Conferences::ConferencesStatsFollowersCount.for(participatory_space)
|
33
|
+
end
|
34
|
+
|
35
|
+
participatory_space.register_stat :participants_count,
|
36
|
+
priority: Decidim::StatsRegistry::MEDIUM_PRIORITY,
|
37
|
+
icon_name: "user-line",
|
38
|
+
tooltip_key: "participants_count_tooltip" do
|
39
|
+
Decidim::Conferences::ConferencesStatsParticipantsCount.for(participatory_space)
|
40
|
+
end
|
41
|
+
|
28
42
|
participatory_space.context(:public) do |context|
|
29
43
|
context.engine = Decidim::Conferences::Engine
|
30
44
|
context.layout = "layouts/decidim/conference"
|
@@ -8,28 +8,28 @@ module Decidim
|
|
8
8
|
def call
|
9
9
|
create_content_block!
|
10
10
|
|
11
|
-
|
11
|
+
number_of_records.times do |_n|
|
12
12
|
conference = create_conference!
|
13
13
|
|
14
14
|
create_conference_user_roles!(conference:)
|
15
15
|
|
16
16
|
create_attachments!(attached_to: conference)
|
17
17
|
|
18
|
-
|
18
|
+
number_of_records.times do
|
19
19
|
create_conference_speaker!(conference:)
|
20
20
|
end
|
21
21
|
|
22
22
|
Decidim::Conferences::Partner::TYPES.map do |type|
|
23
|
-
|
23
|
+
number_of_records.times do
|
24
24
|
create_conference_partner!(conference:, type:)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
|
28
|
+
number_of_records.times do
|
29
29
|
create_conference_media_link!(conference:)
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
number_of_records.times do
|
33
33
|
create_conference_registration_type!(conference:)
|
34
34
|
end
|
35
35
|
|
@@ -56,7 +56,6 @@ module Decidim
|
|
56
56
|
title: Decidim::Faker::Localized.sentence(word_count: 5),
|
57
57
|
slogan: Decidim::Faker::Localized.sentence(word_count: 2),
|
58
58
|
slug: Decidim::Faker::Internet.unique.slug(words: nil, glue: "-"),
|
59
|
-
hashtag: "##{::Faker::Lorem.word}",
|
60
59
|
short_description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
61
60
|
Decidim::Faker::Localized.sentence(word_count: 3)
|
62
61
|
end,
|
@@ -115,7 +115,7 @@ FactoryBot.define do
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
-
factory :
|
118
|
+
factory :conference_evaluator, parent: :user, class: "Decidim::User" do
|
119
119
|
transient do
|
120
120
|
skip_injection { false }
|
121
121
|
conference { create(:conference, skip_injection:) }
|
@@ -128,7 +128,7 @@ FactoryBot.define do
|
|
128
128
|
create(:conference_user_role,
|
129
129
|
user:,
|
130
130
|
conference: evaluator.conference,
|
131
|
-
role: :
|
131
|
+
role: :evaluator,
|
132
132
|
skip_injection: evaluator.skip_injection)
|
133
133
|
end
|
134
134
|
end
|