decidim-conferences 0.31.9 → 0.32.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/README.md +7 -12
- data/app/cells/decidim/conferences/conference_speaker_cell.rb +1 -0
- data/app/cells/decidim/conferences/registration_type/registration_confirm.erb +10 -12
- data/app/cells/decidim/conferences/registration_type_cell.rb +1 -1
- data/app/commands/decidim/conferences/admin/create_conference_speaker.rb +0 -2
- data/app/commands/decidim/conferences/admin/create_registration_type.rb +0 -2
- data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +0 -2
- data/app/commands/decidim/conferences/admin/update_registration_type.rb +0 -2
- data/app/commands/decidim/conferences/join_conference.rb +1 -3
- data/app/commands/decidim/conferences/leave_conference.rb +2 -6
- data/app/controllers/decidim/conferences/admin/component_share_tokens_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/concerns/conference_admin.rb +3 -7
- data/app/controllers/decidim/conferences/admin/conference_attachment_collections_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conference_attachments_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conference_duplicates_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/conference_invites_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/conference_share_tokens_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +4 -4
- data/app/controllers/decidim/conferences/admin/conference_user_roles_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conferences_controller.rb +2 -2
- 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_type_publications_controller.rb +2 -2
- data/app/controllers/decidim/conferences/admin/registration_types_controller.rb +2 -2
- data/app/controllers/decidim/conferences/conference_program_controller.rb +1 -1
- data/app/controllers/decidim/conferences/conference_registrations_controller.rb +1 -1
- data/app/controllers/decidim/conferences/conferences_controller.rb +3 -8
- data/app/forms/decidim/conferences/admin/conference_duplicate_form.rb +1 -1
- data/app/forms/decidim/conferences/admin/conference_form.rb +1 -1
- data/app/forms/decidim/conferences/admin/conference_registration_invite_form.rb +1 -0
- data/app/helpers/decidim/conferences/conference_helper.rb +2 -2
- data/app/permissions/decidim/conferences/permissions.rb +28 -2
- data/app/queries/decidim/conferences/admin/admin_users.rb +1 -1
- data/app/views/decidim/conferences/admin/conference_duplicates/new.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conference_invites/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +3 -3
- data/app/views/decidim/conferences/admin/conference_invites/new.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conference_registrations/index.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conference_speakers/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_speakers/edit.html.erb +3 -2
- data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conference_speakers/new.html.erb +3 -2
- data/app/views/decidim/conferences/admin/conference_user_roles/edit.html.erb +3 -2
- data/app/views/decidim/conferences/admin/conference_user_roles/index.html.erb +3 -2
- data/app/views/decidim/conferences/admin/conference_user_roles/new.html.erb +3 -2
- data/app/views/decidim/conferences/admin/conferences/_actions.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conferences/edit.html.erb +3 -2
- data/app/views/decidim/conferences/admin/conferences/index.html.erb +2 -1
- data/app/views/decidim/conferences/admin/conferences/manage_trash.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conferences/new.html.erb +3 -2
- data/app/views/decidim/conferences/admin/diplomas/edit.html.erb +3 -2
- data/app/views/decidim/conferences/admin/media_links/edit.html.erb +3 -2
- data/app/views/decidim/conferences/admin/media_links/index.html.erb +3 -2
- data/app/views/decidim/conferences/admin/media_links/new.html.erb +3 -2
- data/app/views/decidim/conferences/admin/partners/edit.html.erb +3 -2
- data/app/views/decidim/conferences/admin/partners/index.html.erb +1 -0
- data/app/views/decidim/conferences/admin/partners/new.html.erb +3 -2
- data/app/views/decidim/conferences/admin/registration_types/edit.html.erb +3 -2
- data/app/views/decidim/conferences/admin/registration_types/index.html.erb +1 -0
- data/app/views/decidim/conferences/admin/registration_types/new.html.erb +3 -2
- data/app/views/decidim/conferences/conference_program/show.html.erb +1 -1
- data/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +1 -1
- data/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +1 -1
- data/app/views/decidim/conferences/conference_speakers/index.html.erb +1 -1
- data/app/views/decidim/conferences/conferences/show.html.erb +1 -1
- data/app/views/decidim/conferences/media/index.html.erb +1 -1
- data/app/views/decidim/conferences/registration_types/index.html.erb +1 -1
- data/config/locales/ar.yml +0 -13
- data/config/locales/bg.yml +0 -15
- data/config/locales/bs-BA.yml +0 -1
- data/config/locales/ca-IT.yml +42 -29
- data/config/locales/ca.yml +42 -29
- data/config/locales/cs.yml +40 -29
- data/config/locales/de.yml +38 -31
- data/config/locales/el.yml +0 -11
- data/config/locales/en.yml +42 -28
- data/config/locales/es-MX.yml +42 -29
- data/config/locales/es-PY.yml +42 -29
- data/config/locales/es.yml +42 -29
- data/config/locales/eu.yml +110 -97
- data/config/locales/fi-plain.yml +42 -29
- data/config/locales/fi.yml +42 -29
- data/config/locales/fr-CA.yml +20 -27
- data/config/locales/fr.yml +20 -27
- data/config/locales/ga-IE.yml +0 -3
- data/config/locales/gl.yml +17 -218
- data/config/locales/hu.yml +0 -15
- data/config/locales/id-ID.yml +0 -11
- data/config/locales/it.yml +0 -11
- data/config/locales/ja.yml +42 -29
- data/config/locales/kaa.yml +0 -1
- data/config/locales/lb.yml +0 -11
- data/config/locales/lt.yml +0 -11
- data/config/locales/lv.yml +0 -11
- data/config/locales/nl.yml +0 -11
- data/config/locales/no.yml +0 -11
- data/config/locales/pl.yml +0 -15
- data/config/locales/pt-BR.yml +9 -20
- data/config/locales/pt.yml +0 -11
- data/config/locales/ro-RO.yml +0 -14
- data/config/locales/sk.yml +4 -254
- data/config/locales/sl.yml +0 -1
- data/config/locales/sr-CS.yml +0 -1
- data/config/locales/sv.yml +3 -32
- data/config/locales/tr-TR.yml +0 -15
- data/config/locales/zh-CN.yml +0 -11
- data/config/locales/zh-TW.yml +0 -11
- data/db/migrate/20251112114826_remove_legacy_images_from_conferences_module.rb +13 -0
- data/decidim-conferences.gemspec +7 -8
- data/lib/decidim/api/conference_registration_type_type.rb +0 -2
- data/lib/decidim/api/conference_speaker_type.rb +0 -2
- data/lib/decidim/conferences/admin_engine.rb +7 -1
- data/lib/decidim/conferences/engine.rb +34 -26
- data/lib/decidim/conferences/menu.rb +1 -1
- data/lib/decidim/conferences/participatory_space.rb +0 -2
- data/lib/decidim/conferences/test/factories.rb +0 -4
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +13 -17
- data/app/cells/decidim/conferences/conference_dropdown_metadata_cell.rb +0 -19
- data/db/migrate/20261002090000_add_user_id_index_to_decidim_conference_user_roles.rb +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 032ccb9ae8c8b784b7ec3a3faa9e7c18081712ed69041873e7cb5f9f501f84bb
|
|
4
|
+
data.tar.gz: dac695203abae7fd796e42baf1d6738adf71439d6f100ded98d267aee05132b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27cf3904169c15dfe27689dfc430e77d4fcd17ca7ccbebcbb97a5d01d7f533d00f09d4a1052450cbc86f18678e6f3b5f2569a0da395cdf2f83774435ee4ff25a
|
|
7
|
+
data.tar.gz: dfe76f56495a8d16031dca0eb380889956e80b14a7323cc12271e864bd84c8f9995ee2499ee8260560c3a28045b291751334021cf3566d6445b961b8ee6f676c
|
data/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# decidim-conferences
|
|
2
2
|
|
|
3
|
-
Conferences are the permanent Decidim's participatory space.
|
|
4
|
-
"active" so unlike participatory processes, they have no steps or phases.
|
|
3
|
+
Conferences are the permanent Decidim's participatory space.
|
|
5
4
|
|
|
6
5
|
A conference can get different components (such as blogs or proposals) attached.
|
|
7
6
|
It can also have attachments, be associated to custom categories or scopes, and
|
|
@@ -15,19 +14,15 @@ This module provides:
|
|
|
15
14
|
|
|
16
15
|
* Public views for conference via a high level section in the main menu.
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Add this line to your application's Gemfile:
|
|
17
|
+
You can see the documentation of this feature at the [Decidim Documentation](https://docs.decidim.org/en/develop/admin/spaces/conferences).
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
gem 'decidim-conferences'
|
|
24
|
-
```
|
|
19
|
+
## Installation
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
To install this module, run in your console:
|
|
27
22
|
|
|
28
23
|
```bash
|
|
29
|
-
bundle
|
|
30
|
-
bundle exec rails
|
|
24
|
+
bundle add decidim-conferences
|
|
25
|
+
bundle exec rails decidim:upgrade
|
|
31
26
|
bundle exec rails db:migrate
|
|
32
27
|
```
|
|
33
28
|
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
<%= decidim_modal id: "conference-registration-confirm-#{model.id}", class: "conference__registration-modal" do %>
|
|
2
|
-
<div
|
|
3
|
-
<%= icon "ticket-line" %>
|
|
4
|
-
<
|
|
2
|
+
<div class="flex items-center gap-2">
|
|
3
|
+
<%= icon "ticket-line", class: "w-6 h-6 text-gray fill-current flex-none" %>
|
|
4
|
+
<div class="font-semibold text-black text-2xl" id="dialog-title-conference-registration-confirm-<%= model.id %>"><%= I18n.t("registration", scope: "decidim.conferences.conference.show") %></div>
|
|
5
|
+
</div>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</div>
|
|
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
|
-
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
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" %>
|
|
16
14
|
</div>
|
|
17
15
|
<% end %>
|
|
@@ -32,9 +32,7 @@ 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
|
|
36
35
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
37
|
-
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
38
36
|
end
|
|
39
37
|
|
|
40
38
|
def run_after_hooks
|
|
@@ -29,9 +29,7 @@ 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
|
|
33
32
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
34
|
-
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
35
33
|
end
|
|
36
34
|
|
|
37
35
|
def run_after_hooks
|
|
@@ -31,9 +31,7 @@ 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
|
|
35
34
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: form.conference_meeting_ids)
|
|
36
|
-
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
37
35
|
end
|
|
38
36
|
|
|
39
37
|
def run_after_hooks
|
|
@@ -31,9 +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
|
-
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting components are scoped to the registration type's conference
|
|
35
34
|
Decidim::ConferenceMeeting.where(component: meeting_components).where(id: @form.attributes[:conference_meeting_ids])
|
|
36
|
-
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
37
35
|
end
|
|
38
36
|
end
|
|
39
37
|
end
|
|
@@ -47,10 +47,8 @@ module Decidim
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def create_meetings_registrations
|
|
50
|
-
published_meeting_components = conference.
|
|
51
|
-
# rubocop:disable Decidim/OrganizationScopedFinder -- components are scoped to the conference above
|
|
50
|
+
published_meeting_components = Decidim::Component.where(participatory_space: conference).where(manifest_name: "meetings").published
|
|
52
51
|
meetings = Decidim::Meetings::Meeting.where(component: published_meeting_components).where(id: @registration_type.conference_meetings.pluck(:id))
|
|
53
|
-
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
54
52
|
|
|
55
53
|
meetings.each do |meeting|
|
|
56
54
|
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 ||= Decidim::Conferences::ConferenceRegistration.find_by(conference: @conference, user: @user, registration_type: @registration_type)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def destroy_registration
|
|
@@ -41,14 +41,10 @@ module Decidim
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def meetings_registrations
|
|
44
|
-
published_meeting_components = @conference.
|
|
45
|
-
# rubocop:disable Decidim/OrganizationScopedFinder -- components are scoped to the conference above
|
|
44
|
+
published_meeting_components = Decidim::Component.where(participatory_space: @conference).where(manifest_name: "meetings").published
|
|
46
45
|
meetings = Decidim::Meetings::Meeting.where(component: published_meeting_components).where(id: @registration_type.conference_meetings.pluck(:id))
|
|
47
|
-
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
48
46
|
|
|
49
|
-
# rubocop:disable Decidim/OrganizationScopedFinder -- meeting and user are scoped to the current conference registration
|
|
50
47
|
@meetings_registrations ||= Decidim::Meetings::Registration.where(meeting: meetings, user: @user)
|
|
51
|
-
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
52
48
|
end
|
|
53
49
|
|
|
54
50
|
def destroy_meeting_registration
|
|
@@ -20,23 +20,19 @@ module Decidim
|
|
|
20
20
|
included do
|
|
21
21
|
include Decidim::Admin::ParticipatorySpaceAdminContext
|
|
22
22
|
|
|
23
|
-
helper_method :current_conference
|
|
23
|
+
helper_method :current_conference
|
|
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
|
-
|
|
34
28
|
def current_conference
|
|
35
29
|
@current_conference ||= organization_conferences.find_by!(
|
|
36
30
|
slug: params[:conference_slug] || params[:slug]
|
|
37
31
|
)
|
|
38
32
|
end
|
|
39
33
|
|
|
34
|
+
alias_method :current_participatory_space, :current_conference
|
|
35
|
+
|
|
40
36
|
def organization_conferences
|
|
41
37
|
@organization_conferences ||= OrganizationConferences.new(current_organization).query
|
|
42
38
|
end
|
|
@@ -43,7 +43,7 @@ module Decidim
|
|
|
43
43
|
flash[:alert] = I18n.t("conference_registration.confirm.error", scope: "decidim.admin")
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
redirect_back_or_to(conference_conference_registrations_path)
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -36,7 +36,7 @@ module Decidim
|
|
|
36
36
|
|
|
37
37
|
on(:invalid) do
|
|
38
38
|
flash[:alert] = I18n.t("conference_speakers.create.error", scope: "decidim.admin")
|
|
39
|
-
render :new, status: :
|
|
39
|
+
render :new, status: :unprocessable_content
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
end
|
|
@@ -58,7 +58,7 @@ module Decidim
|
|
|
58
58
|
|
|
59
59
|
on(:invalid) do
|
|
60
60
|
flash.now[:alert] = I18n.t("conference_speakers.update.error", scope: "decidim.admin")
|
|
61
|
-
render :edit, status: :
|
|
61
|
+
render :edit, status: :unprocessable_content
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
end
|
|
@@ -85,7 +85,7 @@ module Decidim
|
|
|
85
85
|
|
|
86
86
|
on(:invalid) do
|
|
87
87
|
flash.now[:alert] = I18n.t("conference_speakers.publish.invalid", scope: "decidim.admin")
|
|
88
|
-
render action: "index", status: :
|
|
88
|
+
render action: "index", status: :unprocessable_content
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
end
|
|
@@ -101,7 +101,7 @@ module Decidim
|
|
|
101
101
|
|
|
102
102
|
on(:invalid) do
|
|
103
103
|
flash.now[:alert] = I18n.t("conference_speakers.unpublish.invalid", scope: "decidim.admin")
|
|
104
|
-
render action: "index", status: :
|
|
104
|
+
render action: "index", status: :unprocessable_content
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
end
|
|
@@ -8,8 +8,6 @@ module Decidim
|
|
|
8
8
|
class ConferenceUserRolesController < Decidim::Admin::ParticipatorySpace::UserRoleController
|
|
9
9
|
include Concerns::ConferenceAdmin
|
|
10
10
|
|
|
11
|
-
protected
|
|
12
|
-
|
|
13
11
|
def authorization_scope = :conference_user_role
|
|
14
12
|
|
|
15
13
|
def resource_form = form(ConferenceUserRoleForm)
|
|
@@ -35,7 +35,7 @@ module Decidim
|
|
|
35
35
|
|
|
36
36
|
on(:invalid) do
|
|
37
37
|
flash.now[:alert] = I18n.t("conferences.create.error", scope: "decidim.admin")
|
|
38
|
-
render :new, status: :
|
|
38
|
+
render :new, status: :unprocessable_content
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -61,7 +61,7 @@ module Decidim
|
|
|
61
61
|
|
|
62
62
|
on(:invalid) do
|
|
63
63
|
flash.now[:alert] = I18n.t("conferences.update.error", scope: "decidim.admin")
|
|
64
|
-
render :edit, layout: "decidim/admin/conference", status: :
|
|
64
|
+
render :edit, layout: "decidim/admin/conference", status: :unprocessable_content
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
end
|
|
@@ -31,7 +31,7 @@ module Decidim
|
|
|
31
31
|
|
|
32
32
|
on(:invalid) do
|
|
33
33
|
flash[:alert] = I18n.t("media_links.create.error", scope: "decidim.admin")
|
|
34
|
-
render :new, status: :
|
|
34
|
+
render :new, status: :unprocessable_content
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -55,7 +55,7 @@ module Decidim
|
|
|
55
55
|
|
|
56
56
|
on(:invalid) do
|
|
57
57
|
flash.now[:alert] = I18n.t("media_links.update.error", scope: "decidim.admin")
|
|
58
|
-
render :edit, status: :
|
|
58
|
+
render :edit, status: :unprocessable_content
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -32,7 +32,7 @@ module Decidim
|
|
|
32
32
|
|
|
33
33
|
on(:invalid) do
|
|
34
34
|
flash[:alert] = I18n.t("partners.create.error", scope: "decidim.admin")
|
|
35
|
-
render :new, status: :
|
|
35
|
+
render :new, status: :unprocessable_content
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
end
|
|
@@ -56,7 +56,7 @@ module Decidim
|
|
|
56
56
|
|
|
57
57
|
on(:invalid) do
|
|
58
58
|
flash.now[:alert] = I18n.t("partners.update.error", scope: "decidim.admin")
|
|
59
|
-
render :edit, status: :
|
|
59
|
+
render :edit, status: :unprocessable_content
|
|
60
60
|
end
|
|
61
61
|
end
|
|
62
62
|
end
|
|
@@ -21,7 +21,7 @@ module Decidim
|
|
|
21
21
|
flash[:alert] = I18n.t("registration_type_publications.create.error", scope: "decidim.admin")
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
redirect_back_or_to(conference_registration_types_path(current_conference))
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -38,7 +38,7 @@ module Decidim
|
|
|
38
38
|
flash[:alert] = I18n.t("registration_type_publications.destroy.error", scope: "decidim.admin")
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
redirect_back_or_to(conference_registration_types_path(current_conference))
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
@@ -35,7 +35,7 @@ module Decidim
|
|
|
35
35
|
|
|
36
36
|
on(:invalid) do
|
|
37
37
|
flash.now[:alert] = I18n.t("registration_types.create.error", scope: "decidim.admin")
|
|
38
|
-
render :new, status: :
|
|
38
|
+
render :new, status: :unprocessable_content
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -59,7 +59,7 @@ module Decidim
|
|
|
59
59
|
|
|
60
60
|
on(:invalid) do
|
|
61
61
|
flash.now[:alert] = I18n.t("registration_types.update.error", scope: "decidim.admin")
|
|
62
|
-
render :edit, status: :
|
|
62
|
+
render :edit, status: :unprocessable_content
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
end
|
|
@@ -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)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def meeting_days
|
|
@@ -83,7 +83,7 @@ module Decidim
|
|
|
83
83
|
return redirect_to(conference_path(conference)) if referer =~ /invitation_token/
|
|
84
84
|
return redirect_to(conference_path(conference)) if referer =~ %r{users/sign_in}
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
redirect_back_or_to(conference_path(conference))
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
end
|
|
@@ -19,8 +19,6 @@ module Decidim
|
|
|
19
19
|
|
|
20
20
|
helper_method :collection, :promoted_conferences, :conferences, :stats
|
|
21
21
|
|
|
22
|
-
before_action :authenticate_user!, only: :user_diploma
|
|
23
|
-
|
|
24
22
|
def index
|
|
25
23
|
raise ActionController::RoutingError, "Not Found" if published_conferences.none?
|
|
26
24
|
|
|
@@ -32,19 +30,16 @@ module Decidim
|
|
|
32
30
|
end
|
|
33
31
|
|
|
34
32
|
def user_diploma
|
|
35
|
-
enforce_permission_to :read, :conference, conference: current_participatory_space
|
|
36
|
-
|
|
37
33
|
render layout: "decidim/diploma"
|
|
38
34
|
end
|
|
39
35
|
|
|
40
36
|
private
|
|
41
37
|
|
|
42
38
|
def current_participatory_space
|
|
43
|
-
|
|
44
|
-
return unless slug
|
|
39
|
+
return unless params[:slug]
|
|
45
40
|
|
|
46
|
-
@current_participatory_space ||= OrganizationConferences.new(current_organization).query.where(slug:).or(
|
|
47
|
-
OrganizationConferences.new(current_organization).query.where(id: slug)
|
|
41
|
+
@current_participatory_space ||= OrganizationConferences.new(current_organization).query.where(slug: params[:slug]).or(
|
|
42
|
+
OrganizationConferences.new(current_organization).query.where(id: params[:slug])
|
|
48
43
|
).first!
|
|
49
44
|
end
|
|
50
45
|
|
|
@@ -23,7 +23,7 @@ module Decidim
|
|
|
23
23
|
private
|
|
24
24
|
|
|
25
25
|
def slug_uniqueness
|
|
26
|
-
return unless OrganizationConferences.new(current_organization).query.
|
|
26
|
+
return unless OrganizationConferences.new(current_organization).query.where(slug:).where.not(id:).any?
|
|
27
27
|
|
|
28
28
|
errors.add(:slug, :taken)
|
|
29
29
|
end
|
|
@@ -90,7 +90,7 @@ module Decidim
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def slug_uniqueness
|
|
93
|
-
return unless OrganizationConferences.new(current_organization).query.where(slug:).
|
|
93
|
+
return unless OrganizationConferences.new(current_organization).query.where(slug:).where.not(id: context[:conference_id]).any?
|
|
94
94
|
|
|
95
95
|
errors.add(:slug, :taken)
|
|
96
96
|
end
|
|
@@ -42,7 +42,7 @@ module Decidim
|
|
|
42
42
|
next unless Decidim::Meetings::Meeting.where(component:).published.not_hidden.visible_for(current_user).exists?
|
|
43
43
|
|
|
44
44
|
items << {
|
|
45
|
-
name:
|
|
45
|
+
name: decidim_escape_translated(component.name),
|
|
46
46
|
url: decidim_conferences.conference_conference_program_path(participatory_space, id: component.id)
|
|
47
47
|
}
|
|
48
48
|
end
|
|
@@ -63,7 +63,7 @@ module Decidim
|
|
|
63
63
|
|
|
64
64
|
other_components.each do |component|
|
|
65
65
|
items << {
|
|
66
|
-
name:
|
|
66
|
+
name: decidim_escape_translated(component.name),
|
|
67
67
|
url: main_component_path(component)
|
|
68
68
|
}
|
|
69
69
|
end
|
|
@@ -38,6 +38,9 @@ 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?
|
|
41
44
|
user_can_create_conference?
|
|
42
45
|
user_can_upload_images_in_conference?
|
|
43
46
|
|
|
@@ -193,6 +196,29 @@ module Decidim
|
|
|
193
196
|
toggle_allow(user.admin?)
|
|
194
197
|
end
|
|
195
198
|
|
|
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
|
+
|
|
196
222
|
# Everyone can read the conference list
|
|
197
223
|
def user_can_read_conference_list?
|
|
198
224
|
return unless read_conference_list_permission_action?
|
|
@@ -252,7 +278,6 @@ module Decidim
|
|
|
252
278
|
:media_link,
|
|
253
279
|
:registration_type,
|
|
254
280
|
:conference_invite,
|
|
255
|
-
:conference_registration,
|
|
256
281
|
:share_token
|
|
257
282
|
].include?(permission_action.subject)
|
|
258
283
|
allow! if is_allowed
|
|
@@ -272,9 +297,10 @@ module Decidim
|
|
|
272
297
|
:conference_speaker,
|
|
273
298
|
:media_link,
|
|
274
299
|
:conference_invite,
|
|
275
|
-
:conference_registration,
|
|
276
300
|
:partner,
|
|
277
301
|
:registration_type,
|
|
302
|
+
:read_conference_registrations,
|
|
303
|
+
:export_conference_registrations,
|
|
278
304
|
:share_token
|
|
279
305
|
].include?(permission_action.subject)
|
|
280
306
|
allow! if is_allowed
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<% add_decidim_page_title(t("
|
|
1
|
+
<% add_decidim_page_title(t(".title")) %>
|
|
2
2
|
|
|
3
3
|
<div class="item_show__header">
|
|
4
4
|
<h1 class="item_show__header-title">
|
|
5
|
-
<%= t("
|
|
5
|
+
<%= t(".title") %>
|
|
6
6
|
</h1>
|
|
7
7
|
</div>
|
|
8
8
|
<div class="item__edit item__edit-1col">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<div class="row column cell attendee-fields--user-picker">
|
|
22
|
-
<% prompt_options = { placeholder: t(".select_user") } %>
|
|
22
|
+
<% prompt_options = { url: decidim_admin.users_organization_url, placeholder: t(".select_user") } %>
|
|
23
23
|
<%= form.autocomplete_select(:user_id, form.object.user.presence, { multiple: false, class: "autocomplete-field--results-inline" }, prompt_options) do |user|
|
|
24
24
|
{ value: user.id, label: "#{user.name} (@#{user.nickname})" }
|
|
25
25
|
end %>
|