decidim-conferences 0.15.1 → 0.16.0
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/assets/config/admin/decidim_conferences_manifest.js +1 -0
- data/app/assets/images/decidim/conferences/conference.svg +2 -5
- data/app/cells/decidim/conferences/linked_participatory_spaces_cell.rb +3 -0
- data/app/cells/decidim/conferences/{join_conference_button/show.erb → registration_type/join_conference.erb} +6 -7
- data/app/cells/decidim/conferences/{join_conference_button → registration_type}/registration_confirm.erb +2 -2
- data/app/cells/decidim/conferences/registration_type/show.erb +16 -0
- data/app/cells/decidim/conferences/registration_type_cell.rb +51 -0
- data/app/commands/decidim/conferences/admin/confirm_conference_registration.rb +75 -0
- data/app/commands/decidim/conferences/admin/create_conference.rb +1 -1
- data/app/commands/decidim/conferences/admin/create_registration_type.rb +77 -0
- data/app/commands/decidim/conferences/admin/destroy_registration_type.rb +56 -0
- data/app/commands/decidim/conferences/admin/invite_user_to_join_conference.rb +3 -2
- data/app/commands/decidim/conferences/admin/publish_registration_type.rb +36 -0
- data/app/commands/decidim/conferences/admin/send_conference_diplomas.rb +48 -0
- data/app/commands/decidim/conferences/admin/unpublish_registration_type.rb +36 -0
- data/app/commands/decidim/conferences/admin/update_conference.rb +2 -2
- data/app/commands/decidim/conferences/admin/update_diploma.rb +47 -0
- data/app/commands/decidim/conferences/admin/update_partner.rb +1 -1
- data/app/commands/decidim/conferences/admin/update_registration_type.rb +74 -0
- data/app/commands/decidim/conferences/join_conference.rb +21 -9
- data/app/commands/decidim/conferences/leave_conference.rb +5 -3
- data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +21 -0
- data/app/controllers/decidim/conferences/admin/conferences_controller.rb +0 -9
- data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +62 -0
- data/app/controllers/decidim/conferences/admin/registration_type_publications_controller.rb +53 -0
- data/app/controllers/decidim/conferences/admin/registration_types_controller.rb +84 -0
- data/app/controllers/decidim/conferences/application_controller.rb +2 -0
- data/app/controllers/decidim/conferences/conference_registrations_controller.rb +6 -2
- data/app/controllers/decidim/conferences/conferences_controller.rb +4 -0
- data/app/controllers/decidim/conferences/registration_types_controller.rb +39 -0
- data/app/events/decidim/conferences/conference_registration_notification_event.rb +21 -0
- data/app/forms/decidim/conferences/admin/conference_form.rb +5 -2
- data/app/forms/decidim/conferences/admin/conference_registration_invite_form.rb +15 -0
- data/app/forms/decidim/conferences/admin/diploma_form.rb +24 -0
- data/app/forms/decidim/conferences/admin/registration_type_form.rb +44 -0
- data/app/helpers/decidim/conferences/conference_helper.rb +15 -0
- data/app/jobs/decidim/conferences/admin/send_conference_diploma_job.rb +20 -0
- data/app/jobs/decidim/conferences/upcoming_conference_notification_job.rb +1 -1
- data/app/mailers/decidim/conferences/admin/invite_join_conference_mailer.rb +2 -1
- data/app/mailers/decidim/conferences/admin/send_conference_diploma_mailer.rb +48 -0
- data/app/mailers/decidim/conferences/conference_registration_mailer.rb +16 -1
- data/app/models/decidim/conference.rb +12 -0
- data/app/models/decidim/conference_meeting.rb +2 -0
- data/app/models/decidim/conferences/conference_invite.rb +1 -0
- data/app/models/decidim/conferences/conference_meeting_registration_type.rb +10 -0
- data/app/models/decidim/conferences/conference_registration.rb +11 -0
- data/app/models/decidim/conferences/registration_type.rb +25 -0
- data/app/permissions/decidim/conferences/permissions.rb +19 -12
- data/app/presenters/decidim/conference_speaker_presenter.rb +4 -0
- data/app/presenters/decidim/conferences/admin_log/conference_registration_presenter.rb +43 -0
- data/app/presenters/decidim/conferences/admin_log/conferences_presenter.rb +4 -2
- data/app/presenters/decidim/conferences/admin_log/partner_presenter.rb +1 -1
- data/app/presenters/decidim/conferences/admin_log/registration_type_presenter.rb +45 -0
- data/app/serializers/decidim/conferences/conference_registration_serializer.rb +4 -0
- data/app/serializers/decidim/conferences/data_portability_conference_invite_serializer.rb +4 -0
- data/app/serializers/decidim/conferences/data_portability_conference_registration_serializer.rb +4 -0
- data/app/uploaders/decidim/conferences/diploma_uploader.rb +12 -0
- data/app/views/decidim/conferences/admin/conference_invites/_form.html.erb +8 -0
- data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +4 -0
- data/app/views/decidim/conferences/admin/conference_registrations/index.html.erb +16 -0
- data/app/views/decidim/conferences/admin/conferences/edit.html.erb +0 -4
- data/app/views/decidim/conferences/admin/diplomas/_form.html.erb +31 -0
- data/app/views/decidim/conferences/admin/diplomas/edit.html.erb +7 -0
- data/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb +2 -2
- data/app/views/decidim/conferences/admin/registration_types/_form.html.erb +30 -0
- data/app/views/decidim/conferences/admin/registration_types/edit.html.erb +7 -0
- data/app/views/decidim/conferences/admin/registration_types/index.html.erb +65 -0
- data/app/views/decidim/conferences/admin/registration_types/new.html.erb +7 -0
- data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma.html.erb +1 -0
- data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma_user.html.erb +24 -0
- data/app/views/decidim/conferences/conference_program/_program_meeting.html.erb +1 -2
- data/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +9 -1
- data/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +11 -0
- data/app/views/decidim/conferences/conferences/index.html.erb +2 -2
- data/app/views/decidim/conferences/conferences/show.html.erb +10 -24
- data/app/views/decidim/conferences/registration_types/index.html.erb +30 -0
- data/app/views/decidim/conferences/shared/_conference_user_login.html.erb +14 -0
- data/app/views/layouts/decidim/_conference_hero.html.erb +5 -3
- data/app/views/layouts/decidim/_conferences_nav.html.erb +45 -89
- data/app/views/layouts/decidim/admin/conference.html.erb +26 -8
- data/app/views/layouts/decidim/diploma.html.erb +11 -0
- data/config/initializers/wicked_pdf.rb +23 -0
- data/config/locales/ca.yml +125 -19
- data/config/locales/de.yml +127 -21
- data/config/locales/en.yml +126 -23
- data/config/locales/es-PY.yml +125 -19
- data/config/locales/es.yml +125 -19
- data/config/locales/eu.yml +127 -21
- data/config/locales/fi-pl.yml +570 -0
- data/config/locales/fi.yml +145 -39
- data/config/locales/fr.yml +127 -21
- data/config/locales/gl.yml +126 -20
- data/config/locales/hu.yml +127 -21
- data/config/locales/id-ID.yml +563 -0
- data/config/locales/it.yml +127 -21
- data/config/locales/nl.yml +126 -20
- data/config/locales/pl.yml +127 -24
- data/config/locales/pt-BR.yml +125 -19
- data/config/locales/pt.yml +126 -20
- data/config/locales/sv.yml +164 -58
- data/config/locales/tr-TR.yml +567 -0
- data/db/migrate/20181023142325_add_conference_registration_types.rb +21 -0
- data/db/migrate/20181030090202_add_reference_registration_type_to_conference_registration.rb +9 -0
- data/db/migrate/20181030153614_add_registration_type_to_conference_invite.rb +8 -0
- data/db/migrate/20181106092826_add_diploma_fields_to_conference.rb +11 -0
- data/db/migrate/20181123124424_make_price_optional_conference_registration_type.rb +7 -0
- data/lib/decidim/conferences/admin_engine.rb +16 -2
- data/lib/decidim/conferences/engine.rb +8 -4
- data/lib/decidim/conferences/participatory_space.rb +11 -0
- data/lib/decidim/conferences/test/factories.rb +36 -0
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +94 -22
- data/app/cells/decidim/conferences/join_conference_button_cell.rb +0 -42
- data/app/views/decidim/conferences/conferences/_conferences_sidebar.html.erb +0 -11
@@ -10,13 +10,28 @@ module Decidim
|
|
10
10
|
|
11
11
|
helper Decidim::ResourceHelper
|
12
12
|
helper Decidim::TranslationsHelper
|
13
|
+
helper Decidim::ApplicationHelper
|
13
14
|
|
14
|
-
def
|
15
|
+
def pending_validation(user, conference, registration_type)
|
15
16
|
with_user(user) do
|
16
17
|
@user = user
|
17
18
|
@conference = conference
|
18
19
|
@organization = @conference.organization
|
19
20
|
@locator = Decidim::ResourceLocatorPresenter.new(@conference)
|
21
|
+
@registration_type = registration_type
|
22
|
+
|
23
|
+
subject = I18n.t("pending_validation.subject", scope: "decidim.conferences.mailer.conference_registration_mailer")
|
24
|
+
mail(to: user.email, subject: subject)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def confirmation(user, conference, registration_type)
|
29
|
+
with_user(user) do
|
30
|
+
@user = user
|
31
|
+
@conference = conference
|
32
|
+
@organization = @conference.organization
|
33
|
+
@locator = Decidim::ResourceLocatorPresenter.new(@conference)
|
34
|
+
@registration_type = registration_type
|
20
35
|
|
21
36
|
add_calendar_attachment
|
22
37
|
|
@@ -48,12 +48,15 @@ module Decidim
|
|
48
48
|
has_many :components, as: :participatory_space, dependent: :destroy
|
49
49
|
|
50
50
|
has_many :media_links, class_name: "Decidim::Conferences::MediaLink", foreign_key: "decidim_conference_id", dependent: :destroy
|
51
|
+
has_many :registration_types, class_name: "Decidim::Conferences::RegistrationType", foreign_key: "decidim_conference_id", dependent: :destroy
|
51
52
|
|
52
53
|
validates :slug, uniqueness: { scope: :organization }
|
53
54
|
validates :slug, presence: true, format: { with: Decidim::Conference.slug_format }
|
54
55
|
|
55
56
|
mount_uploader :hero_image, Decidim::HeroImageUploader
|
56
57
|
mount_uploader :banner_image, Decidim::HomepageImageUploader
|
58
|
+
mount_uploader :main_logo, Decidim::Conferences::DiplomaUploader
|
59
|
+
mount_uploader :signature, Decidim::Conferences::DiplomaUploader
|
57
60
|
|
58
61
|
# Scope to return only the promoted conferences.
|
59
62
|
#
|
@@ -78,6 +81,10 @@ module Decidim
|
|
78
81
|
conference_registrations.where(user: user).any?
|
79
82
|
end
|
80
83
|
|
84
|
+
def has_registration_for_user_and_registration_type?(user, registration_type)
|
85
|
+
conference_registrations.where(user: user, registration_type: registration_type).any?
|
86
|
+
end
|
87
|
+
|
81
88
|
def has_available_slots?
|
82
89
|
return true if available_slots.zero?
|
83
90
|
available_slots > conference_registrations.count
|
@@ -86,5 +93,10 @@ module Decidim
|
|
86
93
|
def remaining_slots
|
87
94
|
available_slots - conference_registrations.count
|
88
95
|
end
|
96
|
+
|
97
|
+
def diploma_sent?
|
98
|
+
return false if diploma_sent_at.nil?
|
99
|
+
true
|
100
|
+
end
|
89
101
|
end
|
90
102
|
end
|
@@ -5,5 +5,7 @@ module Decidim
|
|
5
5
|
class ConferenceMeeting < Decidim::Meetings::Meeting
|
6
6
|
has_many :conference_speaker_conference_meetings, dependent: :destroy
|
7
7
|
has_many :conference_speakers, through: :conference_speaker_conference_meetings, foreign_key: "conference_meeting_id", class_name: "Decidim::ConferenceSpeaker"
|
8
|
+
has_many :conference_meeting_registration_types, dependent: :destroy
|
9
|
+
has_many :registration_types, through: :conference_meeting_registration_types, foreign_key: "registration_type_id", class_name: "Decidim::Conferences::RegistrationType"
|
8
10
|
end
|
9
11
|
end
|
@@ -10,6 +10,7 @@ module Decidim
|
|
10
10
|
|
11
11
|
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
|
12
12
|
belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::User"
|
13
|
+
belongs_to :registration_type, foreign_key: "decidim_conference_registration_type_id", class_name: "Decidim::Conferences::RegistrationType"
|
13
14
|
|
14
15
|
validates :user, uniqueness: { scope: :conference }
|
15
16
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
class ConferenceMeetingRegistrationType < ApplicationRecord
|
6
|
+
belongs_to :conference_meeting, foreign_key: "conference_meeting_id", class_name: "Decidim::ConferenceMeeting"
|
7
|
+
belongs_to :registration_type, foreign_key: "registration_type_id", class_name: "Decidim::Conferences::RegistrationType"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -8,9 +8,12 @@ module Decidim
|
|
8
8
|
|
9
9
|
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
|
10
10
|
belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::User"
|
11
|
+
belongs_to :registration_type, foreign_key: "decidim_conference_registration_type_id", class_name: "Decidim::Conferences::RegistrationType"
|
11
12
|
|
12
13
|
validates :user, uniqueness: { scope: :conference }
|
13
14
|
|
15
|
+
scope :confirmed, -> { where.not(confirmed_at: nil) }
|
16
|
+
|
14
17
|
def self.user_collection(user)
|
15
18
|
where(decidim_user_id: user.id)
|
16
19
|
end
|
@@ -18,6 +21,14 @@ module Decidim
|
|
18
21
|
def self.export_serializer
|
19
22
|
Decidim::Conferences::DataPortabilityConferenceRegistrationSerializer
|
20
23
|
end
|
24
|
+
|
25
|
+
def confirmed?
|
26
|
+
confirmed_at.present?
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.log_presenter_class_for(_log)
|
30
|
+
Decidim::Conferences::AdminLog::ConferenceRegistrationPresenter
|
31
|
+
end
|
21
32
|
end
|
22
33
|
end
|
23
34
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
# It represents a registration type of the conference
|
6
|
+
class RegistrationType < ApplicationRecord
|
7
|
+
include Decidim::Publicable
|
8
|
+
include Decidim::Traceable
|
9
|
+
include Decidim::Loggable
|
10
|
+
|
11
|
+
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
|
12
|
+
has_many :conference_meeting_registration_types, dependent: :destroy
|
13
|
+
has_many :conference_meetings, through: :conference_meeting_registration_types, foreign_key: "registration_type_id", class_name: "Decidim::ConferenceMeeting"
|
14
|
+
has_many :conference_registrations, foreign_key: "decidim_conference_registration_type_id", class_name: "Decidim::Conferences::ConferenceRegistration", dependent: :destroy
|
15
|
+
|
16
|
+
default_scope { order(weight: :asc) }
|
17
|
+
|
18
|
+
alias participatory_space conference
|
19
|
+
|
20
|
+
def self.log_presenter_class_for(_log)
|
21
|
+
Decidim::Conferences::AdminLog::RegistrationTypePresenter
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -19,6 +19,7 @@ module Decidim
|
|
19
19
|
public_list_speakers_action?
|
20
20
|
public_list_program_action?
|
21
21
|
public_list_media_links_action?
|
22
|
+
public_list_registration_types_action?
|
22
23
|
public_report_content_action?
|
23
24
|
|
24
25
|
can_join_conference?
|
@@ -39,8 +40,8 @@ module Decidim
|
|
39
40
|
user_can_read_current_conference?
|
40
41
|
user_can_read_conference_registrations?
|
41
42
|
user_can_export_conference_registrations?
|
43
|
+
user_can_confirm_conference_registration?
|
42
44
|
user_can_create_conference?
|
43
|
-
user_can_destroy_conference?
|
44
45
|
|
45
46
|
# org admins and space admins can do everything in the admin section
|
46
47
|
org_admin_action?
|
@@ -146,6 +147,13 @@ module Decidim
|
|
146
147
|
allow!
|
147
148
|
end
|
148
149
|
|
150
|
+
def public_list_registration_types_action?
|
151
|
+
return unless permission_action.action == :list &&
|
152
|
+
permission_action.subject == :registration_types
|
153
|
+
|
154
|
+
allow!
|
155
|
+
end
|
156
|
+
|
149
157
|
def public_report_content_action?
|
150
158
|
return unless permission_action.action == :create &&
|
151
159
|
permission_action.subject == :moderation
|
@@ -188,14 +196,6 @@ module Decidim
|
|
188
196
|
toggle_allow(user.admin?)
|
189
197
|
end
|
190
198
|
|
191
|
-
# Only organization admins can destroy a conference
|
192
|
-
def user_can_destroy_conference?
|
193
|
-
return unless permission_action.action == :destroy &&
|
194
|
-
permission_action.subject == :conference
|
195
|
-
|
196
|
-
toggle_allow(user.admin?)
|
197
|
-
end
|
198
|
-
|
199
199
|
# Only organization admins can read a conference registrations
|
200
200
|
def user_can_read_conference_registrations?
|
201
201
|
return unless permission_action.action == :read_conference_registrations &&
|
@@ -212,6 +212,13 @@ module Decidim
|
|
212
212
|
toggle_allow(user.admin?)
|
213
213
|
end
|
214
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
|
+
|
215
222
|
# Everyone can read the conference list
|
216
223
|
def user_can_read_conference_list?
|
217
224
|
return unless read_conference_list_permission_action?
|
@@ -241,14 +248,12 @@ module Decidim
|
|
241
248
|
|
242
249
|
# Process admins can eprform everything *inside* that conference. They cannot
|
243
250
|
# create a conference or perform actions on conference groups or other
|
244
|
-
# conferences.
|
251
|
+
# conferences.
|
245
252
|
def conference_admin_action?
|
246
253
|
return unless can_manage_conference?(role: :admin)
|
247
254
|
return if user.admin?
|
248
255
|
return disallow! if permission_action.action == :create &&
|
249
256
|
permission_action.subject == :conference
|
250
|
-
return disallow! if permission_action.action == :destroy &&
|
251
|
-
permission_action.subject == :conference
|
252
257
|
|
253
258
|
is_allowed = [
|
254
259
|
:attachment,
|
@@ -262,6 +267,7 @@ module Decidim
|
|
262
267
|
:conference_speaker,
|
263
268
|
:partner,
|
264
269
|
:media_link,
|
270
|
+
:registration_type,
|
265
271
|
:conference_invite
|
266
272
|
].include?(permission_action.subject)
|
267
273
|
allow! if is_allowed
|
@@ -283,6 +289,7 @@ module Decidim
|
|
283
289
|
:media_link,
|
284
290
|
:conference_invite,
|
285
291
|
:partner,
|
292
|
+
:registration_type,
|
286
293
|
:read_conference_registrations,
|
287
294
|
:export_conference_registrations
|
288
295
|
].include?(permission_action.subject)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
module AdminLog
|
6
|
+
# This class holds the logic to present a `Decidim::Conferences::ConferenceRegistration`
|
7
|
+
# for the `AdminLog` log.
|
8
|
+
#
|
9
|
+
# Usage should be automatic and you shouldn't need to call this class
|
10
|
+
# directly, but here's an example:
|
11
|
+
#
|
12
|
+
# action_log = Decidim::ActionLog.last
|
13
|
+
# view_helpers # => this comes from the views
|
14
|
+
# ConferenceRegistrationPresenter.new(action_log, view_helpers).present
|
15
|
+
class ConferenceRegistrationPresenter < Decidim::Log::BasePresenter
|
16
|
+
private
|
17
|
+
|
18
|
+
def diff_fields_mapping
|
19
|
+
{
|
20
|
+
confirmed_at: :date
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def i18n_labels_scope
|
25
|
+
"activemodel.attributes.conferences.conference_registration"
|
26
|
+
end
|
27
|
+
|
28
|
+
def action_string
|
29
|
+
case action
|
30
|
+
when "confirm"
|
31
|
+
"decidim.admin_log.conferences.conference_registration.#{action}"
|
32
|
+
else
|
33
|
+
super
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def has_diff?
|
38
|
+
action == "delete" || super
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -29,7 +29,9 @@ module Decidim
|
|
29
29
|
subtitle: :i18n,
|
30
30
|
title: :i18n,
|
31
31
|
start_date: :date,
|
32
|
-
end_date: :date
|
32
|
+
end_date: :date,
|
33
|
+
sign_date: :date,
|
34
|
+
signature_name: :string
|
33
35
|
}
|
34
36
|
end
|
35
37
|
|
@@ -39,7 +41,7 @@ module Decidim
|
|
39
41
|
|
40
42
|
def action_string
|
41
43
|
case action
|
42
|
-
when "create", "publish", "unpublish", "update"
|
44
|
+
when "create", "publish", "unpublish", "update", "update_diploma"
|
43
45
|
"decidim.admin_log.conference.#{action}"
|
44
46
|
else
|
45
47
|
super
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
module AdminLog
|
6
|
+
# This class holds the logic to present a `Decidim::Conferences::RegistrationType`
|
7
|
+
# for the `AdminLog` log.
|
8
|
+
#
|
9
|
+
# Usage should be automatic and you shouldn't need to call this class
|
10
|
+
# directly, but here's an example:
|
11
|
+
#
|
12
|
+
# action_log = Decidim::ActionLog.last
|
13
|
+
# view_helpers # => this comes from the views
|
14
|
+
# RegistrationTypePresenter.new(action_log, view_helpers).present
|
15
|
+
class RegistrationTypePresenter < Decidim::Log::BasePresenter
|
16
|
+
private
|
17
|
+
|
18
|
+
def diff_fields_mapping
|
19
|
+
{
|
20
|
+
title: :i18n,
|
21
|
+
description: :i18n,
|
22
|
+
price: :integer
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def i18n_labels_scope
|
27
|
+
"activemodel.attributes.conferences.registration_type"
|
28
|
+
end
|
29
|
+
|
30
|
+
def action_string
|
31
|
+
case action
|
32
|
+
when "create", "delete", "update"
|
33
|
+
"decidim.admin_log.conferences.registration_type.#{action}"
|
34
|
+
else
|
35
|
+
super
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def has_diff?
|
40
|
+
action == "delete" || super
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -14,6 +14,10 @@ module Decidim
|
|
14
14
|
name: resource.user.name,
|
15
15
|
email: resource.user.email
|
16
16
|
},
|
17
|
+
registration_type: {
|
18
|
+
title: resource.registration_type.title,
|
19
|
+
price: resource.registration_type.price
|
20
|
+
},
|
17
21
|
conference: {
|
18
22
|
title: resource.conference.title,
|
19
23
|
reference: resource.conference.reference,
|
data/app/serializers/decidim/conferences/data_portability_conference_registration_serializer.rb
CHANGED
@@ -11,6 +11,10 @@ module Decidim
|
|
11
11
|
name: resource.user.name,
|
12
12
|
email: resource.user.email
|
13
13
|
},
|
14
|
+
registration_type: {
|
15
|
+
title: resource.registration_type.title,
|
16
|
+
price: resource.registration_type.price
|
17
|
+
},
|
14
18
|
conference: {
|
15
19
|
title: resource.conference.title,
|
16
20
|
reference: resource.conference.reference,
|
@@ -25,6 +25,14 @@
|
|
25
25
|
end %>
|
26
26
|
</div>
|
27
27
|
</div>
|
28
|
+
<div class="grid-x grid-margin-x">
|
29
|
+
<div class="auto cell">
|
30
|
+
<%= form.select :registration_type_id,
|
31
|
+
options_for_select(@form.registration_types_for_select),
|
32
|
+
{ include_blank: false },
|
33
|
+
{ multiple: false, class: "chosen-select" } %>
|
34
|
+
</div>
|
35
|
+
</div>
|
28
36
|
</div>
|
29
37
|
|
30
38
|
<%= javascript_include_tag "decidim/conferences/admin/conference_invite_form" %>
|
@@ -53,6 +53,7 @@
|
|
53
53
|
<th><%= t("models.conference_invite.fields.email", scope: "decidim.conferences") %></th>
|
54
54
|
<th><%= t("models.conference_invite.fields.sent_at", scope: "decidim.conferences") %></th>
|
55
55
|
<th><%= t("models.conference_invite.fields.status", scope: "decidim.conferences") %></th>
|
56
|
+
<th><%= t("models.conference_invite.fields.registration_type", scope: "decidim.conferences") %></th>
|
56
57
|
</tr>
|
57
58
|
</thead>
|
58
59
|
<tbody>
|
@@ -73,6 +74,9 @@
|
|
73
74
|
<td class="<%= presenter.status_html_class %>">
|
74
75
|
<%= presenter.status %>
|
75
76
|
</td>
|
77
|
+
<td>
|
78
|
+
<%= translated_attribute(invite.registration_type.title) %>
|
79
|
+
</td>
|
76
80
|
</tr>
|
77
81
|
<% end %>
|
78
82
|
</tbody>
|