decidim-conferences 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/admin/decidim_conferences_manifest.js +1 -0
  3. data/app/assets/images/decidim/conferences/conference.svg +2 -5
  4. data/app/cells/decidim/conferences/linked_participatory_spaces_cell.rb +3 -0
  5. data/app/cells/decidim/conferences/{join_conference_button/show.erb → registration_type/join_conference.erb} +6 -7
  6. data/app/cells/decidim/conferences/{join_conference_button → registration_type}/registration_confirm.erb +2 -2
  7. data/app/cells/decidim/conferences/registration_type/show.erb +16 -0
  8. data/app/cells/decidim/conferences/registration_type_cell.rb +51 -0
  9. data/app/commands/decidim/conferences/admin/confirm_conference_registration.rb +75 -0
  10. data/app/commands/decidim/conferences/admin/create_conference.rb +1 -1
  11. data/app/commands/decidim/conferences/admin/create_registration_type.rb +77 -0
  12. data/app/commands/decidim/conferences/admin/destroy_registration_type.rb +56 -0
  13. data/app/commands/decidim/conferences/admin/invite_user_to_join_conference.rb +3 -2
  14. data/app/commands/decidim/conferences/admin/publish_registration_type.rb +36 -0
  15. data/app/commands/decidim/conferences/admin/send_conference_diplomas.rb +48 -0
  16. data/app/commands/decidim/conferences/admin/unpublish_registration_type.rb +36 -0
  17. data/app/commands/decidim/conferences/admin/update_conference.rb +2 -2
  18. data/app/commands/decidim/conferences/admin/update_diploma.rb +47 -0
  19. data/app/commands/decidim/conferences/admin/update_partner.rb +1 -1
  20. data/app/commands/decidim/conferences/admin/update_registration_type.rb +74 -0
  21. data/app/commands/decidim/conferences/join_conference.rb +21 -9
  22. data/app/commands/decidim/conferences/leave_conference.rb +5 -3
  23. data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +21 -0
  24. data/app/controllers/decidim/conferences/admin/conferences_controller.rb +0 -9
  25. data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +62 -0
  26. data/app/controllers/decidim/conferences/admin/registration_type_publications_controller.rb +53 -0
  27. data/app/controllers/decidim/conferences/admin/registration_types_controller.rb +84 -0
  28. data/app/controllers/decidim/conferences/application_controller.rb +2 -0
  29. data/app/controllers/decidim/conferences/conference_registrations_controller.rb +6 -2
  30. data/app/controllers/decidim/conferences/conferences_controller.rb +4 -0
  31. data/app/controllers/decidim/conferences/registration_types_controller.rb +39 -0
  32. data/app/events/decidim/conferences/conference_registration_notification_event.rb +21 -0
  33. data/app/forms/decidim/conferences/admin/conference_form.rb +5 -2
  34. data/app/forms/decidim/conferences/admin/conference_registration_invite_form.rb +15 -0
  35. data/app/forms/decidim/conferences/admin/diploma_form.rb +24 -0
  36. data/app/forms/decidim/conferences/admin/registration_type_form.rb +44 -0
  37. data/app/helpers/decidim/conferences/conference_helper.rb +15 -0
  38. data/app/jobs/decidim/conferences/admin/send_conference_diploma_job.rb +20 -0
  39. data/app/jobs/decidim/conferences/upcoming_conference_notification_job.rb +1 -1
  40. data/app/mailers/decidim/conferences/admin/invite_join_conference_mailer.rb +2 -1
  41. data/app/mailers/decidim/conferences/admin/send_conference_diploma_mailer.rb +48 -0
  42. data/app/mailers/decidim/conferences/conference_registration_mailer.rb +16 -1
  43. data/app/models/decidim/conference.rb +12 -0
  44. data/app/models/decidim/conference_meeting.rb +2 -0
  45. data/app/models/decidim/conferences/conference_invite.rb +1 -0
  46. data/app/models/decidim/conferences/conference_meeting_registration_type.rb +10 -0
  47. data/app/models/decidim/conferences/conference_registration.rb +11 -0
  48. data/app/models/decidim/conferences/registration_type.rb +25 -0
  49. data/app/permissions/decidim/conferences/permissions.rb +19 -12
  50. data/app/presenters/decidim/conference_speaker_presenter.rb +4 -0
  51. data/app/presenters/decidim/conferences/admin_log/conference_registration_presenter.rb +43 -0
  52. data/app/presenters/decidim/conferences/admin_log/conferences_presenter.rb +4 -2
  53. data/app/presenters/decidim/conferences/admin_log/partner_presenter.rb +1 -1
  54. data/app/presenters/decidim/conferences/admin_log/registration_type_presenter.rb +45 -0
  55. data/app/serializers/decidim/conferences/conference_registration_serializer.rb +4 -0
  56. data/app/serializers/decidim/conferences/data_portability_conference_invite_serializer.rb +4 -0
  57. data/app/serializers/decidim/conferences/data_portability_conference_registration_serializer.rb +4 -0
  58. data/app/uploaders/decidim/conferences/diploma_uploader.rb +12 -0
  59. data/app/views/decidim/conferences/admin/conference_invites/_form.html.erb +8 -0
  60. data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +4 -0
  61. data/app/views/decidim/conferences/admin/conference_registrations/index.html.erb +16 -0
  62. data/app/views/decidim/conferences/admin/conferences/edit.html.erb +0 -4
  63. data/app/views/decidim/conferences/admin/diplomas/_form.html.erb +31 -0
  64. data/app/views/decidim/conferences/admin/diplomas/edit.html.erb +7 -0
  65. data/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb +2 -2
  66. data/app/views/decidim/conferences/admin/registration_types/_form.html.erb +30 -0
  67. data/app/views/decidim/conferences/admin/registration_types/edit.html.erb +7 -0
  68. data/app/views/decidim/conferences/admin/registration_types/index.html.erb +65 -0
  69. data/app/views/decidim/conferences/admin/registration_types/new.html.erb +7 -0
  70. data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma.html.erb +1 -0
  71. data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma_user.html.erb +24 -0
  72. data/app/views/decidim/conferences/conference_program/_program_meeting.html.erb +1 -2
  73. data/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +9 -1
  74. data/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +11 -0
  75. data/app/views/decidim/conferences/conferences/index.html.erb +2 -2
  76. data/app/views/decidim/conferences/conferences/show.html.erb +10 -24
  77. data/app/views/decidim/conferences/registration_types/index.html.erb +30 -0
  78. data/app/views/decidim/conferences/shared/_conference_user_login.html.erb +14 -0
  79. data/app/views/layouts/decidim/_conference_hero.html.erb +5 -3
  80. data/app/views/layouts/decidim/_conferences_nav.html.erb +45 -89
  81. data/app/views/layouts/decidim/admin/conference.html.erb +26 -8
  82. data/app/views/layouts/decidim/diploma.html.erb +11 -0
  83. data/config/initializers/wicked_pdf.rb +23 -0
  84. data/config/locales/ca.yml +125 -19
  85. data/config/locales/de.yml +127 -21
  86. data/config/locales/en.yml +127 -21
  87. data/config/locales/es-PY.yml +125 -19
  88. data/config/locales/es.yml +125 -19
  89. data/config/locales/eu.yml +127 -21
  90. data/config/locales/fi-pl.yml +128 -22
  91. data/config/locales/fi.yml +128 -22
  92. data/config/locales/fr.yml +127 -21
  93. data/config/locales/gl.yml +126 -20
  94. data/config/locales/hu.yml +127 -21
  95. data/config/locales/id-ID.yml +125 -20
  96. data/config/locales/it.yml +127 -21
  97. data/config/locales/nl.yml +126 -20
  98. data/config/locales/pl.yml +127 -24
  99. data/config/locales/pt-BR.yml +125 -19
  100. data/config/locales/pt.yml +126 -20
  101. data/config/locales/sv.yml +126 -20
  102. data/config/locales/tr-TR.yml +125 -22
  103. data/db/migrate/20181023142325_add_conference_registration_types.rb +21 -0
  104. data/db/migrate/20181030090202_add_reference_registration_type_to_conference_registration.rb +9 -0
  105. data/db/migrate/20181030153614_add_registration_type_to_conference_invite.rb +8 -0
  106. data/db/migrate/20181106092826_add_diploma_fields_to_conference.rb +11 -0
  107. data/db/migrate/20181123124424_make_price_optional_conference_registration_type.rb +7 -0
  108. data/lib/decidim/conferences/admin_engine.rb +16 -2
  109. data/lib/decidim/conferences/engine.rb +8 -4
  110. data/lib/decidim/conferences/participatory_space.rb +11 -0
  111. data/lib/decidim/conferences/test/factories.rb +36 -0
  112. data/lib/decidim/conferences/version.rb +1 -1
  113. metadata +92 -23
  114. data/app/cells/decidim/conferences/join_conference_button_cell.rb +0 -42
  115. data/app/views/decidim/conferences/conferences/_conferences_sidebar.html.erb +0 -11
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ module Admin
6
+ # A custom mailer for sending the diploma of the conference to
7
+ # a registered user who attends to the conference.
8
+ class SendConferenceDiplomaMailer < Decidim::ApplicationMailer
9
+ include Decidim::TranslationsHelper
10
+ include Decidim::SanitizeHelper
11
+
12
+ helper Decidim::ResourceHelper
13
+ helper Decidim::TranslationsHelper
14
+
15
+ # Send an email to an user with the diploma of conference attendance attached.
16
+ #
17
+ # user - The user being invited
18
+ # conference - The conference being joined.
19
+ def diploma(conference, user)
20
+ with_user(user) do
21
+ @user = user
22
+ @conference = conference
23
+ @organization = @conference.organization
24
+ @locator = Decidim::ResourceLocatorPresenter.new(@conference)
25
+
26
+ add_diploma_attachment
27
+
28
+ subject = I18n.t("diploma.subject", scope: "decidim.conferences.mailer.send_conference_diploma_mailer")
29
+ mail(to: user.email, subject: subject)
30
+ end
31
+ end
32
+
33
+ private
34
+
35
+ def add_diploma_attachment
36
+ diploma = WickedPdf.new.pdf_from_string(
37
+ render_to_string(pdf: "conference-diploma",
38
+ template: "decidim/conferences/admin/send_conference_diploma_mailer/diploma_user.html.erb",
39
+ layout: "decidim/diploma.html.erb"),
40
+ orientation: "Landscape"
41
+ )
42
+
43
+ attachments["conference-#{@user.nickname.parameterize}-diploma.pdf"] = diploma
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -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 confirmation(user, conference)
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. They cannot destroy their conference either.
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)
@@ -29,6 +29,10 @@ module Decidim
29
29
  user ? true : false
30
30
  end
31
31
 
32
+ def has_tooltip?
33
+ false
34
+ end
35
+
32
36
  private
33
37
 
34
38
  def user
@@ -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
@@ -21,7 +21,7 @@ module Decidim
21
21
  partner_type: :string,
22
22
  link: :string,
23
23
  weight: :integer,
24
- log: :string
24
+ logo: :string
25
25
  }
26
26
  end
27
27
 
@@ -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
@@ -10,6 +10,10 @@ module Decidim
10
10
  user: {
11
11
  name: resource.user.name,
12
12
  email: resource.user.email
13
+ },
14
+ registration_type: {
15
+ title: resource.registration_type.title,
16
+ price: resource.registration_type.price
13
17
  }
14
18
  }
15
19
  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,