decidim-conferences 0.32.1 → 0.32.3
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/registration_type/registration_confirm.erb +12 -10
- data/app/commands/decidim/conferences/admin/create_conference_speaker.rb +1 -1
- data/app/commands/decidim/conferences/admin/create_registration_type.rb +1 -1
- data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +1 -1
- data/app/commands/decidim/conferences/admin/update_registration_type.rb +1 -1
- data/app/commands/decidim/conferences/join_conference.rb +3 -1
- data/app/commands/decidim/conferences/leave_conference.rb +6 -2
- data/app/controllers/decidim/conferences/admin/component_share_tokens_controller.rb +2 -0
- data/app/controllers/decidim/conferences/admin/concerns/conference_admin.rb +7 -3
- data/app/controllers/decidim/conferences/admin/conference_attachment_collections_controller.rb +2 -0
- data/app/controllers/decidim/conferences/admin/conference_attachments_controller.rb +2 -0
- data/app/controllers/decidim/conferences/admin/conference_share_tokens_controller.rb +2 -0
- data/app/controllers/decidim/conferences/admin/conference_user_roles_controller.rb +2 -0
- data/app/controllers/decidim/conferences/conference_program_controller.rb +2 -0
- data/app/controllers/decidim/conferences/conferences_controller.rb +8 -3
- data/app/permissions/decidim/conferences/permissions.rb +2 -28
- data/config/locales/ca.yml +1 -1
- data/config/locales/de.yml +8 -2
- data/config/locales/eu.yml +49 -49
- data/config/locales/gl.yml +232 -17
- data/config/locales/sv.yml +43 -1
- data/db/migrate/20261002090000_add_user_id_index_to_decidim_conference_user_roles.rb +7 -0
- data/decidim-conferences.gemspec +1 -1
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 281284c6f2493decf5b3570bad2d9e2085601641e0d6176665a03b3202b2b814
|
|
4
|
+
data.tar.gz: f4be1614b0df92c27ea63c5789c8d68fa0630895aab179df5c30a1e10939ca07
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cce8989ebce3afc42671c4da19af0caeb333834d6906f56cbfdd415fd907bd7b409d7eb19e481f69e93ef27b30345e55d6ea20623f87395c8383b9cd78717e0b
|
|
7
|
+
data.tar.gz: 42a8fe4d080b52715fdaed177f2cb4da19e4b42b27fa4d5b511c8f3e18218e617a5d1634db86fdc37a46688ebc8a64c03ae835f4a3d28b9d6585fd478b186434
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<%= decidim_modal id: "conference-registration-confirm-#{model.id}", class: "conference__registration-modal" do %>
|
|
2
|
-
<div
|
|
3
|
-
<%= icon "ticket-line"
|
|
4
|
-
<
|
|
5
|
-
</div>
|
|
2
|
+
<div data-dialog-container>
|
|
3
|
+
<%= icon "ticket-line" %>
|
|
4
|
+
<h2 id="dialog-title-conference-registration-confirm-<%= model.id %>" tabindex="-1" data-dialog-title><%= I18n.t("registration", scope: "decidim.conferences.conference.show") %></h2>
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
<div class="meeting-list__modal-input">
|
|
7
|
+
<div id="dialog-desc-conference-registration-confirm-<%= model.id %>" class="text-gray-2 text-xl mt-9 prose">
|
|
8
|
+
<%= decidim_sanitize_editor translated_attribute(conference.registration_terms) %>
|
|
9
|
+
</div>
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
<div class="flex justify-between mt-16">
|
|
12
|
+
<button class="button button__lg button__transparent-secondary" data-dialog-close="<%= model.id %>"><%= t("cancel", scope: "decidim.conferences.conference.registration_confirm") %></button>
|
|
13
|
+
<%= button_to t("confirm", scope: "decidim.conferences.conference.registration_confirm"), conference_registration_type_conference_registration_path(conference, model), class: "button button__lg button__secondary" %>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
14
16
|
</div>
|
|
15
17
|
<% end %>
|
|
@@ -32,7 +32,7 @@ module Decidim
|
|
|
32
32
|
|
|
33
33
|
def conference_meetings
|
|
34
34
|
meeting_components = resource.conference.components.where(manifest_name: "meetings")
|
|
35
|
-
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
35
|
+
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids) # rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the conference
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def run_after_hooks
|
|
@@ -29,7 +29,7 @@ module Decidim
|
|
|
29
29
|
|
|
30
30
|
def conference_meetings
|
|
31
31
|
meeting_components = resource.conference.components.where(manifest_name: "meetings")
|
|
32
|
-
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
32
|
+
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids) # rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the conference
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def run_after_hooks
|
|
@@ -31,7 +31,7 @@ module Decidim
|
|
|
31
31
|
|
|
32
32
|
def conference_meetings
|
|
33
33
|
meeting_components = resource.conference.components.where(manifest_name: "meetings")
|
|
34
|
-
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
34
|
+
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids) # rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the conference
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def run_after_hooks
|
|
@@ -31,7 +31,7 @@ module Decidim
|
|
|
31
31
|
|
|
32
32
|
def conference_meetings(registration_type)
|
|
33
33
|
meeting_components = registration_type.conference.components.where(manifest_name: "meetings")
|
|
34
|
-
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: @form.attributes[:conference_meeting_ids])
|
|
34
|
+
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: @form.attributes[:conference_meeting_ids]) # rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the registration type's conference
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -47,8 +47,10 @@ module Decidim
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def create_meetings_registrations
|
|
50
|
-
published_meeting_components =
|
|
50
|
+
published_meeting_components = conference.components.where(manifest_name: "meetings").published
|
|
51
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- components are scoped to the conference above
|
|
51
52
|
meetings = Decidim::Meetings::Meeting.where(component: published_meeting_components).where(id: @registration_type.conference_meetings.pluck(:id))
|
|
53
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
52
54
|
|
|
53
55
|
meetings.each do |meeting|
|
|
54
56
|
Decidim::Meetings::Registration.create!(meeting:, user:)
|
|
@@ -33,7 +33,7 @@ module Decidim
|
|
|
33
33
|
private
|
|
34
34
|
|
|
35
35
|
def registration
|
|
36
|
-
@registration ||=
|
|
36
|
+
@registration ||= @conference.conference_registrations.find_by(user: @user, registration_type: @registration_type)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def destroy_registration
|
|
@@ -41,10 +41,14 @@ module Decidim
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def meetings_registrations
|
|
44
|
-
published_meeting_components =
|
|
44
|
+
published_meeting_components = @conference.components.where(manifest_name: "meetings").published
|
|
45
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- components are scoped to the conference above
|
|
45
46
|
meetings = Decidim::Meetings::Meeting.where(component: published_meeting_components).where(id: @registration_type.conference_meetings.pluck(:id))
|
|
47
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
46
48
|
|
|
49
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting and user are scoped to the current conference registration
|
|
47
50
|
@meetings_registrations ||= Decidim::Meetings::Registration.where(meeting: meetings, user: @user)
|
|
51
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
48
52
|
end
|
|
49
53
|
|
|
50
54
|
def destroy_meeting_registration
|
|
@@ -20,19 +20,23 @@ module Decidim
|
|
|
20
20
|
included do
|
|
21
21
|
include Decidim::Admin::ParticipatorySpaceAdminContext
|
|
22
22
|
|
|
23
|
-
helper_method :current_conference
|
|
23
|
+
helper_method :current_conference, :current_participatory_space
|
|
24
24
|
add_breadcrumb_item_from_menu :conference_admin_menu
|
|
25
25
|
|
|
26
26
|
participatory_space_admin_layout
|
|
27
27
|
|
|
28
|
+
def current_participatory_space
|
|
29
|
+
current_conference
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
protected
|
|
33
|
+
|
|
28
34
|
def current_conference
|
|
29
35
|
@current_conference ||= organization_conferences.find_by!(
|
|
30
36
|
slug: params[:conference_slug] || params[:slug]
|
|
31
37
|
)
|
|
32
38
|
end
|
|
33
39
|
|
|
34
|
-
alias_method :current_participatory_space, :current_conference
|
|
35
|
-
|
|
36
40
|
def organization_conferences
|
|
37
41
|
@organization_conferences ||= OrganizationConferences.new(current_organization).query
|
|
38
42
|
end
|
|
@@ -8,6 +8,8 @@ module Decidim
|
|
|
8
8
|
class ConferenceUserRolesController < Decidim::Admin::ParticipatorySpace::UserRoleController
|
|
9
9
|
include Concerns::ConferenceAdmin
|
|
10
10
|
|
|
11
|
+
protected
|
|
12
|
+
|
|
11
13
|
def authorization_scope = :conference_user_role
|
|
12
14
|
|
|
13
15
|
def resource_form = form(ConferenceUserRoleForm)
|
|
@@ -29,7 +29,9 @@ module Decidim
|
|
|
29
29
|
def meetings
|
|
30
30
|
return unless meeting_component&.published? || !meeting_component.presence
|
|
31
31
|
|
|
32
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting_component is scoped to current_participatory_space
|
|
32
33
|
@meetings ||= Decidim::Meetings::Meeting.where(component: meeting_component).visible_for(current_user).order(:start_time)
|
|
34
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
def meeting_days
|
|
@@ -19,6 +19,8 @@ module Decidim
|
|
|
19
19
|
|
|
20
20
|
helper_method :collection, :promoted_conferences, :conferences, :stats
|
|
21
21
|
|
|
22
|
+
before_action :authenticate_user!, only: :user_diploma
|
|
23
|
+
|
|
22
24
|
def index
|
|
23
25
|
raise ActionController::RoutingError, "Not Found" if published_conferences.none?
|
|
24
26
|
|
|
@@ -30,16 +32,19 @@ module Decidim
|
|
|
30
32
|
end
|
|
31
33
|
|
|
32
34
|
def user_diploma
|
|
35
|
+
enforce_permission_to :read, :conference, conference: current_participatory_space
|
|
36
|
+
|
|
33
37
|
render layout: "decidim/diploma"
|
|
34
38
|
end
|
|
35
39
|
|
|
36
40
|
private
|
|
37
41
|
|
|
38
42
|
def current_participatory_space
|
|
39
|
-
|
|
43
|
+
slug = params[:slug] || params[:conference_slug]
|
|
44
|
+
return unless slug
|
|
40
45
|
|
|
41
|
-
@current_participatory_space ||= OrganizationConferences.new(current_organization).query.where(slug:
|
|
42
|
-
OrganizationConferences.new(current_organization).query.where(id:
|
|
46
|
+
@current_participatory_space ||= OrganizationConferences.new(current_organization).query.where(slug:).or(
|
|
47
|
+
OrganizationConferences.new(current_organization).query.where(id: slug)
|
|
43
48
|
).first!
|
|
44
49
|
end
|
|
45
50
|
|
|
@@ -38,9 +38,6 @@ module Decidim
|
|
|
38
38
|
|
|
39
39
|
user_can_read_conference_list?
|
|
40
40
|
user_can_read_current_conference?
|
|
41
|
-
user_can_read_conference_registrations?
|
|
42
|
-
user_can_export_conference_registrations?
|
|
43
|
-
user_can_confirm_conference_registration?
|
|
44
41
|
user_can_create_conference?
|
|
45
42
|
user_can_upload_images_in_conference?
|
|
46
43
|
|
|
@@ -196,29 +193,6 @@ module Decidim
|
|
|
196
193
|
toggle_allow(user.admin?)
|
|
197
194
|
end
|
|
198
195
|
|
|
199
|
-
# Only organization admins can read a conference registrations
|
|
200
|
-
def user_can_read_conference_registrations?
|
|
201
|
-
return unless permission_action.action == :read_conference_registrations &&
|
|
202
|
-
permission_action.subject == :conference
|
|
203
|
-
|
|
204
|
-
toggle_allow(user.admin?)
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
# Only organization admins can export a conference registrations
|
|
208
|
-
def user_can_export_conference_registrations?
|
|
209
|
-
return unless permission_action.action == :export_conference_registrations &&
|
|
210
|
-
permission_action.subject == :conference
|
|
211
|
-
|
|
212
|
-
toggle_allow(user.admin?)
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
def user_can_confirm_conference_registration?
|
|
216
|
-
return unless permission_action.action == :confirm &&
|
|
217
|
-
permission_action.subject == :conference_registration
|
|
218
|
-
|
|
219
|
-
toggle_allow(user.admin?)
|
|
220
|
-
end
|
|
221
|
-
|
|
222
196
|
# Everyone can read the conference list
|
|
223
197
|
def user_can_read_conference_list?
|
|
224
198
|
return unless read_conference_list_permission_action?
|
|
@@ -278,6 +252,7 @@ module Decidim
|
|
|
278
252
|
:media_link,
|
|
279
253
|
:registration_type,
|
|
280
254
|
:conference_invite,
|
|
255
|
+
:conference_registration,
|
|
281
256
|
:share_token
|
|
282
257
|
].include?(permission_action.subject)
|
|
283
258
|
allow! if is_allowed
|
|
@@ -297,10 +272,9 @@ module Decidim
|
|
|
297
272
|
:conference_speaker,
|
|
298
273
|
:media_link,
|
|
299
274
|
:conference_invite,
|
|
275
|
+
:conference_registration,
|
|
300
276
|
:partner,
|
|
301
277
|
:registration_type,
|
|
302
|
-
:read_conference_registrations,
|
|
303
|
-
:export_conference_registrations,
|
|
304
278
|
:share_token
|
|
305
279
|
].include?(permission_action.subject)
|
|
306
280
|
allow! if is_allowed
|
data/config/locales/ca.yml
CHANGED
data/config/locales/de.yml
CHANGED
|
@@ -3,7 +3,7 @@ de:
|
|
|
3
3
|
activemodel:
|
|
4
4
|
attributes:
|
|
5
5
|
conference:
|
|
6
|
-
assemblies_ids: Ähnliche
|
|
6
|
+
assemblies_ids: Ähnliche Versammlungen
|
|
7
7
|
available_slots: Verfügbare Plätze
|
|
8
8
|
banner_image: Banner-Bild
|
|
9
9
|
decidim_scope_id: Umfang
|
|
@@ -430,10 +430,14 @@ de:
|
|
|
430
430
|
new:
|
|
431
431
|
title: Neuer Partner
|
|
432
432
|
registration_types:
|
|
433
|
+
edit:
|
|
434
|
+
title: Anmeldeart aktualisieren
|
|
433
435
|
form:
|
|
434
436
|
select_conference_meetings: Konferenzveranstaltungen auswählen
|
|
435
437
|
index:
|
|
436
438
|
title: Registrierungsarten
|
|
439
|
+
new:
|
|
440
|
+
title: Neue Anmeldeart
|
|
437
441
|
send_conference_diploma_mailer:
|
|
438
442
|
diploma:
|
|
439
443
|
diploma_html: Die Teilnahmebestätigung für die Konferenz <a href="%{url}">%{title}</a> finden Sie in den Anhängen.
|
|
@@ -443,6 +447,7 @@ de:
|
|
|
443
447
|
certificate_of_attendance_description: Hiermit wird bestätigt, dass <strong>%{user}</strong> an den <strong>%{title}</strong> teilgenommen hat, die am <strong>%{location}</strong> am <strong>%{start} - %{end}</strong>abgehalten wurden
|
|
444
448
|
send_diploma:
|
|
445
449
|
error: Beim Senden der Teilnahmebestätigung der Konferenz ist ein Problem aufgetreten.
|
|
450
|
+
success: Teilnahmebescheinigungen für die Konferenz erfolgreich versendet.
|
|
446
451
|
conference:
|
|
447
452
|
registration_confirm:
|
|
448
453
|
cancel: Abbrechen
|
|
@@ -561,7 +566,7 @@ de:
|
|
|
561
566
|
details: Einzelheiten
|
|
562
567
|
introduction: Einführung
|
|
563
568
|
objectives: Ziele
|
|
564
|
-
related_assemblies: Ähnliche
|
|
569
|
+
related_assemblies: Ähnliche Versammlungen
|
|
565
570
|
related_participatory_processes: Ähnliche Beteiligungsprozesse
|
|
566
571
|
download_your_data:
|
|
567
572
|
help:
|
|
@@ -632,6 +637,7 @@ de:
|
|
|
632
637
|
open_data:
|
|
633
638
|
help:
|
|
634
639
|
conferences:
|
|
640
|
+
component_settings: Komponenteneinstellungen des Konferenzbereichs
|
|
635
641
|
created_at: Erstellungsdatum dieses Bereichs
|
|
636
642
|
decidim_scope_id: Das Thema der Konferenz
|
|
637
643
|
description: Eine lange Beschreibung der Konferenz
|