decidim-conferences 0.31.7 → 0.31.9
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 +2 -0
- data/app/commands/decidim/conferences/admin/create_registration_type.rb +2 -0
- data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +2 -0
- data/app/commands/decidim/conferences/admin/update_registration_type.rb +2 -0
- 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 +8 -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 +1 -1
- data/app/controllers/decidim/conferences/conferences_controller.rb +8 -3
- data/app/permissions/decidim/conferences/permissions.rb +2 -28
- data/config/locales/de.yml +3 -2
- data/config/locales/eu.yml +50 -50
- data/config/locales/gl.yml +207 -17
- data/config/locales/sv.yml +14 -1
- data/db/migrate/20261002090000_add_user_id_index_to_decidim_conference_user_roles.rb +7 -0
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e7a9ec3ffcaeb218aa84f8168acec91ae56c0a0780be4bba4669e765d92c756
|
|
4
|
+
data.tar.gz: 19ec69f0c956691863ef7a604e7279584867bf43c3e93c5b0fd9ab1c64912549
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c1db1ff4f95478d1f2781f361e34554442da0c03c199d61f5202620776082d0e336d515967373e91d9b2f42a78aac7b2e553671b70ac122e564408b1846c047
|
|
7
|
+
data.tar.gz: 79d38bb1e5ee626d02734020575011ea2ec74a561940ea8bf4684f4fc2e55a7ac227fd5651dc6edf433064c33b55ad8531436302c8988122737478cb47351d07
|
|
@@ -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,9 @@ module Decidim
|
|
|
32
32
|
|
|
33
33
|
def conference_meetings
|
|
34
34
|
meeting_components = resource.conference.components.where(manifest_name: "meetings")
|
|
35
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the conference
|
|
35
36
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
37
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
36
38
|
end
|
|
37
39
|
|
|
38
40
|
def run_after_hooks
|
|
@@ -29,7 +29,9 @@ module Decidim
|
|
|
29
29
|
|
|
30
30
|
def conference_meetings
|
|
31
31
|
meeting_components = resource.conference.components.where(manifest_name: "meetings")
|
|
32
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the conference
|
|
32
33
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
34
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
def run_after_hooks
|
|
@@ -31,7 +31,9 @@ module Decidim
|
|
|
31
31
|
|
|
32
32
|
def conference_meetings
|
|
33
33
|
meeting_components = resource.conference.components.where(manifest_name: "meetings")
|
|
34
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the conference
|
|
34
35
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
36
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
35
37
|
end
|
|
36
38
|
|
|
37
39
|
def run_after_hooks
|
|
@@ -31,7 +31,9 @@ module Decidim
|
|
|
31
31
|
|
|
32
32
|
def conference_meetings(registration_type)
|
|
33
33
|
meeting_components = registration_type.conference.components.where(manifest_name: "meetings")
|
|
34
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the registration type's conference
|
|
34
35
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: @form.attributes[:conference_meeting_ids])
|
|
36
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
35
37
|
end
|
|
36
38
|
end
|
|
37
39
|
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
|
|
@@ -19,19 +19,24 @@ module Decidim
|
|
|
19
19
|
|
|
20
20
|
included do
|
|
21
21
|
include Decidim::Admin::ParticipatorySpaceAdminContext
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
helper_method :current_conference, :current_participatory_space
|
|
23
24
|
add_breadcrumb_item_from_menu :conference_admin_menu
|
|
24
25
|
|
|
25
26
|
participatory_space_admin_layout
|
|
26
27
|
|
|
28
|
+
def current_participatory_space
|
|
29
|
+
current_conference
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
protected
|
|
33
|
+
|
|
27
34
|
def current_conference
|
|
28
35
|
@current_conference ||= organization_conferences.find_by!(
|
|
29
36
|
slug: params[:conference_slug] || params[:slug]
|
|
30
37
|
)
|
|
31
38
|
end
|
|
32
39
|
|
|
33
|
-
alias_method :current_participatory_space, :current_conference
|
|
34
|
-
|
|
35
40
|
def organization_conferences
|
|
36
41
|
@organization_conferences ||= OrganizationConferences.new(current_organization).query
|
|
37
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,7 @@ module Decidim
|
|
|
29
29
|
def meetings
|
|
30
30
|
return unless meeting_component&.published? || !meeting_component.presence
|
|
31
31
|
|
|
32
|
-
@meetings ||= Decidim::Meetings::Meeting.where(component: meeting_component).visible_for(current_user).order(:start_time)
|
|
32
|
+
@meetings ||= Decidim::Meetings::Meeting.where(component: meeting_component).visible_for(current_user).order(:start_time) # rubocop:disable Decidim/OrganizationScopedFinder -- meeting_component is scoped to current_participatory_space
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
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/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
|
|
@@ -303,6 +303,7 @@ de:
|
|
|
303
303
|
destroy:
|
|
304
304
|
success: Der Registrierungstyp wurde erfolgreich von dieser Konferenz entfernt.
|
|
305
305
|
edit:
|
|
306
|
+
title: Anmeldeart aktualisieren
|
|
306
307
|
update: Aktualisieren
|
|
307
308
|
new:
|
|
308
309
|
create: Erstellen
|
|
@@ -552,7 +553,7 @@ de:
|
|
|
552
553
|
details: Einzelheiten
|
|
553
554
|
introduction: Einführung
|
|
554
555
|
objectives: Ziele
|
|
555
|
-
related_assemblies: Ähnliche
|
|
556
|
+
related_assemblies: Ähnliche Versammlungen
|
|
556
557
|
related_participatory_processes: Ähnliche Beteiligungsprozesse
|
|
557
558
|
download_your_data:
|
|
558
559
|
help:
|