decidim-conferences 0.26.2 → 0.27.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +2 -2
  3. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb +1 -4
  4. data/app/commands/decidim/conferences/admin/confirm_conference_registration.rb +3 -3
  5. data/app/commands/decidim/conferences/admin/copy_conference.rb +1 -1
  6. data/app/commands/decidim/conferences/admin/create_conference.rb +1 -1
  7. data/app/commands/decidim/conferences/admin/create_conference_speaker.rb +15 -12
  8. data/app/commands/decidim/conferences/admin/create_media_link.rb +6 -6
  9. data/app/commands/decidim/conferences/admin/create_partner.rb +8 -8
  10. data/app/commands/decidim/conferences/admin/create_registration_type.rb +6 -6
  11. data/app/commands/decidim/conferences/admin/destroy_conference_admin.rb +1 -1
  12. data/app/commands/decidim/conferences/admin/destroy_conference_speaker.rb +1 -1
  13. data/app/commands/decidim/conferences/admin/destroy_media_link.rb +1 -1
  14. data/app/commands/decidim/conferences/admin/destroy_partner.rb +1 -1
  15. data/app/commands/decidim/conferences/admin/destroy_registration_type.rb +1 -1
  16. data/app/commands/decidim/conferences/admin/export_conference_registrations.rb +1 -1
  17. data/app/commands/decidim/conferences/admin/invite_user_to_join_conference.rb +9 -11
  18. data/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb +1 -1
  19. data/app/commands/decidim/conferences/admin/publish_conference.rb +1 -1
  20. data/app/commands/decidim/conferences/admin/publish_registration_type.rb +1 -1
  21. data/app/commands/decidim/conferences/admin/send_conference_diplomas.rb +1 -1
  22. data/app/commands/decidim/conferences/admin/unpublish_conference.rb +1 -1
  23. data/app/commands/decidim/conferences/admin/unpublish_registration_type.rb +1 -1
  24. data/app/commands/decidim/conferences/admin/update_conference.rb +1 -1
  25. data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +8 -8
  26. data/app/commands/decidim/conferences/admin/update_diploma.rb +3 -3
  27. data/app/commands/decidim/conferences/admin/update_media_link.rb +6 -6
  28. data/app/commands/decidim/conferences/admin/update_partner.rb +6 -6
  29. data/app/commands/decidim/conferences/admin/update_registration_type.rb +6 -6
  30. data/app/commands/decidim/conferences/decline_invitation.rb +1 -1
  31. data/app/commands/decidim/conferences/join_conference.rb +3 -3
  32. data/app/commands/decidim/conferences/leave_conference.rb +4 -4
  33. data/app/controllers/decidim/conferences/admin/reminders_controller.rb +14 -0
  34. data/app/controllers/decidim/conferences/conference_program_controller.rb +2 -2
  35. data/app/events/decidim/conferences/conference_registration_notification_event.rb +1 -1
  36. data/app/events/decidim/conferences/conference_role_assigned_event.rb +1 -1
  37. data/app/forms/decidim/conferences/admin/conference_registration_invite_form.rb +1 -1
  38. data/app/forms/decidim/conferences/admin/conference_speaker_form.rb +1 -1
  39. data/app/mailers/decidim/conferences/admin/send_conference_diploma_mailer.rb +2 -2
  40. data/app/models/decidim/conference.rb +2 -3
  41. data/app/models/decidim/conferences/conference_invite.rb +2 -2
  42. data/app/models/decidim/conferences/conference_registration.rb +2 -2
  43. data/app/presenters/decidim/conference_speaker_presenter.rb +3 -5
  44. data/app/presenters/decidim/conferences/conference_stats_presenter.rb +4 -1
  45. data/app/queries/decidim/conferences/admin/admin_users.rb +1 -1
  46. data/app/queries/decidim/conferences/admin/conference_invites.rb +1 -1
  47. data/app/queries/decidim/conferences/admin/conference_speakers.rb +1 -1
  48. data/app/queries/decidim/conferences/conference_program_meetings.rb +2 -2
  49. data/app/queries/decidim/conferences/conference_program_meetings_by_day.rb +3 -3
  50. data/app/queries/decidim/conferences/conferences_with_user_role.rb +1 -1
  51. data/app/queries/decidim/conferences/organization_conferences.rb +1 -1
  52. data/app/queries/decidim/conferences/organization_prioritized_conferences.rb +3 -3
  53. data/app/queries/decidim/conferences/organization_published_conferences.rb +3 -3
  54. data/app/queries/decidim/conferences/prioritized_conferences.rb +1 -1
  55. data/app/queries/decidim/conferences/promoted_conferences.rb +1 -1
  56. data/app/queries/decidim/conferences/published_conferences.rb +1 -1
  57. data/app/queries/decidim/conferences/visible_conferences.rb +1 -1
  58. data/app/serializers/decidim/conferences/{data_portability_conference_invite_serializer.rb → download_your_data_conference_invite_serializer.rb} +2 -2
  59. data/app/serializers/decidim/conferences/{data_portability_conference_registration_serializer.rb → download_your_data_conference_registration_serializer.rb} +2 -2
  60. data/app/views/decidim/conferences/admin/partners/index.html.erb +3 -1
  61. data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +1 -1
  62. data/app/views/layouts/decidim/_conference_hero.html.erb +1 -1
  63. data/app/views/layouts/decidim/_conferences_nav.html.erb +1 -1
  64. data/config/locales/ar.yml +1 -0
  65. data/config/locales/bg.yml +1 -0
  66. data/config/locales/ca.yml +1 -0
  67. data/config/locales/cs.yml +1 -0
  68. data/config/locales/de.yml +1 -0
  69. data/config/locales/el.yml +1 -0
  70. data/config/locales/en.yml +1 -1
  71. data/config/locales/es-MX.yml +1 -0
  72. data/config/locales/es-PY.yml +1 -0
  73. data/config/locales/es.yml +2 -1
  74. data/config/locales/eu.yml +1 -0
  75. data/config/locales/fi-plain.yml +1 -0
  76. data/config/locales/fi.yml +2 -1
  77. data/config/locales/fr-CA.yml +1 -0
  78. data/config/locales/fr.yml +3 -2
  79. data/config/locales/ga-IE.yml +1 -0
  80. data/config/locales/gl.yml +1 -0
  81. data/config/locales/hu.yml +1 -0
  82. data/config/locales/id-ID.yml +1 -0
  83. data/config/locales/it.yml +1 -0
  84. data/config/locales/ja.yml +1 -0
  85. data/config/locales/lb.yml +1 -0
  86. data/config/locales/lt.yml +624 -0
  87. data/config/locales/lv.yml +1 -0
  88. data/config/locales/nl.yml +2 -1
  89. data/config/locales/no.yml +1 -0
  90. data/config/locales/pl.yml +1 -0
  91. data/config/locales/pt-BR.yml +1 -0
  92. data/config/locales/pt.yml +1 -0
  93. data/config/locales/ro-RO.yml +1 -0
  94. data/config/locales/sk.yml +1 -0
  95. data/config/locales/sl.yml +1 -0
  96. data/config/locales/sr-CS.yml +1 -0
  97. data/config/locales/sv.yml +1 -0
  98. data/config/locales/tr-TR.yml +1 -0
  99. data/config/locales/zh-CN.yml +1 -0
  100. data/lib/decidim/conferences/admin_engine.rb +1 -0
  101. data/lib/decidim/conferences/participatory_space.rb +8 -8
  102. data/lib/decidim/conferences/test/factories.rb +1 -1
  103. data/lib/decidim/conferences/version.rb +1 -1
  104. metadata +17 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e81c5875c1af1a30928771f575b635bc717f99a9de8d1fd23be1665b6ec55c74
4
- data.tar.gz: ab09f828b04bf7d3d004e76b0a69941f3d5f0ca1511fe95a229ef973f6ba70c3
3
+ metadata.gz: 29979928a0cb12542825bb861b06988ea576c515ae69a3c117c2f9b9302aeb68
4
+ data.tar.gz: c8695a0af17d5d7ad12ab5efd60e8f0b9c3a1ca45c2e10ad01be12554800bb5c
5
5
  SHA512:
6
- metadata.gz: 5a4c53dc5e261e6dd3018d1782022630906e60c62ab6b26293b9ea11d61b8ed8c1418bf5e9525bb1071e867d9b606fa500bd06fd32b57bb60f7cd00a56e6c5b8
7
- data.tar.gz: 69f61b21f6803f5b9e574c84786862f3710698b8f4c1fb646188aa967b00124e85a5609824628ea7f1d1ac914495c1d590e91a17aff9296d0158f6c76d8aa4c6
6
+ metadata.gz: c1d0807fc33bd9ecda19113bdd3afd12eed1e69e228e8ecffdd5c12e212af6284515776e66c6b8e68b8ffafddc81c1e48e2d22a0f133b788b64f49e9ce845a1e
7
+ data.tar.gz: 7cb999e5bd53a31c3ee05498102bded3d9fdf8f9942e23caac33cac555c7b1763b7b08a84394503aadb3b11c41ffcfd705ba78b9b2d7f6f437500ad060e2bf5f
@@ -1,4 +1,4 @@
1
- <section class="wrapper-home home-section">
1
+ <section id="highlighted_conferences" class="wrapper-home home-section">
2
2
  <div class="row" id="highlighted-conferences">
3
3
  <h3 class="section-heading"><%= t("active_conferences", scope: i18n_scope) %></h3>
4
4
  <div class="row collapse">
@@ -8,7 +8,7 @@
8
8
  <div class="column">
9
9
  <%= link_to decidim_conferences.conference_path(conference), class: "card card--conference card--mini" do %>
10
10
  <div aria-hidden="true" class="card__image-top"
11
- style="background-image:url(<%= conference.attached_uploader(:hero_image).path %>)"></div>
11
+ style="background-image:url('<%= conference.attached_uploader(:hero_image).path %>')"></div>
12
12
  <div class="card__content">
13
13
  <span class="card__title card__link"><%= translated_attribute conference.title %></span>
14
14
  </div>
@@ -6,10 +6,6 @@ module Decidim
6
6
  class HighlightedConferencesCell < Decidim::ViewModel
7
7
  delegate :current_user, to: :controller
8
8
 
9
- cache :show, expires_in: 10.minutes, if: :perform_caching? do
10
- cache_hash
11
- end
12
-
13
9
  def show
14
10
  render if highlighted_conferences.any?
15
11
  end
@@ -31,6 +27,7 @@ module Decidim
31
27
  def cache_hash
32
28
  hash = []
33
29
  hash.push(I18n.locale)
30
+ hash.push(highlighted_conferences.map(&:cache_key_with_version))
34
31
  hash.join(Decidim.cache_key_separator)
35
32
  end
36
33
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Conferences
5
5
  module Admin
6
6
  # This command is executed when the user joins a conference.
7
- class ConfirmConferenceRegistration < Rectify::Command
7
+ class ConfirmConferenceRegistration < Decidim::Command
8
8
  # Initializes a JoinConference Command.
9
9
  #
10
10
  # conference_registration - The registration to be confirmed
@@ -18,9 +18,9 @@ module Decidim
18
18
  #
19
19
  # Broadcasts :ok if successful, :invalid otherwise.
20
20
  def call
21
- @conference_registration.with_lock do
22
- return broadcast(:invalid) unless can_join_conference?
21
+ return broadcast(:invalid) unless can_join_conference?
23
22
 
23
+ @conference_registration.with_lock do
24
24
  confirm_registration
25
25
  send_email_confirmation
26
26
  send_notification_confirmation
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when copying a new participatory
7
7
  # conference in the system.
8
- class CopyConference < Rectify::Command
8
+ class CopyConference < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when creating a new
7
7
  # conference in the system.
8
- class CreateConference < Rectify::Command
8
+ class CreateConference < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when creating a new conference
7
7
  # speaker in the system.
8
- class CreateConferenceSpeaker < Rectify::Command
8
+ class CreateConferenceSpeaker < Decidim::Command
9
9
  include ::Decidim::AttachmentAttributesMethods
10
10
 
11
11
  # Public: Initializes the command.
@@ -52,24 +52,27 @@ module Decidim
52
52
 
53
53
  attr_reader :form, :conference, :current_user
54
54
 
55
- def conference_speaker_with_attributes
56
- attrs = form.attributes.slice(
57
- :full_name,
58
- :twitter_handle,
59
- :personal_url,
60
- :position,
61
- :affiliation,
62
- :short_bio
63
- ).merge(
55
+ def conference_speaker_attributes
56
+ @conference_speaker_attributes ||= form.attributes.slice(
57
+ "full_name",
58
+ "twitter_handle",
59
+ "personal_url",
60
+ "position",
61
+ "affiliation",
62
+ "short_bio"
63
+ ).symbolize_keys.merge(
64
64
  decidim_conference_id: conference.id,
65
65
  conference: conference,
66
66
  user: form.user
67
67
  ).merge(
68
68
  attachment_attributes(:avatar)
69
69
  )
70
+ end
71
+
72
+ def conference_speaker_with_attributes
70
73
  conference_speaker = conference.speakers.build
71
74
  conference_speaker.conference = conference
72
- conference_speaker.assign_attributes(attrs)
75
+ conference_speaker.assign_attributes(conference_speaker_attributes)
73
76
  conference_speaker
74
77
  end
75
78
 
@@ -86,7 +89,7 @@ module Decidim
86
89
  @conference_speaker = Decidim.traceability.create!(
87
90
  Decidim::ConferenceSpeaker,
88
91
  current_user,
89
- conference_speaker_with_attributes.attributes,
92
+ conference_speaker_attributes,
90
93
  log_info
91
94
  )
92
95
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when creating a new
7
7
  # media link for conference in the system.
8
- class CreateMediaLink < Rectify::Command
8
+ class CreateMediaLink < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -50,11 +50,11 @@ module Decidim
50
50
  Decidim::Conferences::MediaLink,
51
51
  current_user,
52
52
  form.attributes.slice(
53
- :title,
54
- :link,
55
- :weight,
56
- :date
57
- ).merge(
53
+ "title",
54
+ "link",
55
+ "weight",
56
+ "date"
57
+ ).symbolize_keys.merge(
58
58
  conference: conference
59
59
  ),
60
60
  log_info
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when creating a new partner
7
7
  # in the system.
8
- class CreatePartner < Rectify::Command
8
+ class CreatePartner < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -72,13 +72,13 @@ module Decidim
72
72
  def attributes
73
73
  { conference: conference }.merge(
74
74
  form.attributes.slice(
75
- :name,
76
- :weight,
77
- :link,
78
- :partner_type,
79
- :logo,
80
- :remove_avatar
81
- )
75
+ "name",
76
+ "weight",
77
+ "link",
78
+ "partner_type",
79
+ "logo",
80
+ "remove_avatar"
81
+ ).symbolize_keys
82
82
  )
83
83
  end
84
84
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when creating a new registration type
7
7
  # in the system.
8
- class CreateRegistrationType < Rectify::Command
8
+ class CreateRegistrationType < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -52,11 +52,11 @@ module Decidim
52
52
  Decidim::Conferences::RegistrationType,
53
53
  form.current_user,
54
54
  form.attributes.slice(
55
- :title,
56
- :description,
57
- :price,
58
- :weight
59
- ).merge(
55
+ "title",
56
+ "description",
57
+ "price",
58
+ "weight"
59
+ ).symbolize_keys.merge(
60
60
  conference: conference
61
61
  ),
62
62
  log_info
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when destroying an conference
7
7
  # admin in the system.
8
- class DestroyConferenceAdmin < Rectify::Command
8
+ class DestroyConferenceAdmin < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # role - the ConferenceUserRole to destroy
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when destroying an conference
7
7
  # speaker in the system.
8
- class DestroyConferenceSpeaker < Rectify::Command
8
+ class DestroyConferenceSpeaker < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # conference_speaker - the ConferenceSpeaker to destroy
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when destroying a media link
7
7
  # in the system.
8
- class DestroyMediaLink < Rectify::Command
8
+ class DestroyMediaLink < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # media_link - the MediaLink to destroy
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when destroying an conference
7
7
  # partner in the system.
8
- class DestroyPartner < Rectify::Command
8
+ class DestroyPartner < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # conference_partner - the Partner to destroy
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when destroying a conference
7
7
  # registration type in the system.
8
- class DestroyRegistrationType < Rectify::Command
8
+ class DestroyRegistrationType < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # registration_type - the Partner to destroy
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user exports the registrations of
7
7
  # a Conference from the admin panel.
8
- class ExportConferenceRegistrations < Rectify::Command
8
+ class ExportConferenceRegistrations < Decidim::Command
9
9
  # conference - The current instance of the page to be closed.
10
10
  # format - a string representing the export format
11
11
  # current_user - the user performing the action
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic to invite users to join a conference.
7
7
  #
8
- class InviteUserToJoinConference < Rectify::Command
8
+ class InviteUserToJoinConference < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -86,16 +86,14 @@ module Decidim
86
86
  end
87
87
 
88
88
  def user
89
- @user ||= begin
90
- if form.existing_user
91
- form.user
92
- else
93
- Decidim::User.find_or_initialize_by(
94
- organization: form.current_organization,
95
- email: form.email.downcase
96
- )
97
- end
98
- end
89
+ @user ||= if form.existing_user
90
+ form.user
91
+ else
92
+ Decidim::User.find_or_initialize_by(
93
+ organization: form.current_organization,
94
+ email: form.email.downcase
95
+ )
96
+ end
99
97
  end
100
98
 
101
99
  def invite_user_to_sign_up
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Conferences
5
5
  module Admin
6
6
  # A command to notify users when a role is assigned for a Conference
7
- class NotifyRoleAssignedToConference < Rectify::Command
7
+ class NotifyRoleAssignedToConference < Decidim::Command
8
8
  def send_notification(user)
9
9
  Decidim::EventsManager.publish(
10
10
  event: "decidim.events.conferences.role_assigned",
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Conferences
5
5
  module Admin
6
6
  # A command that sets an conference as published.
7
- class PublishConference < Rectify::Command
7
+ class PublishConference < Decidim::Command
8
8
  # Public: Initializes the command.
9
9
  #
10
10
  # conference - A Conference that will be published
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Conferences
5
5
  module Admin
6
6
  # This command gets called when a registration_type is published from the admin panel.
7
- class PublishRegistrationType < Rectify::Command
7
+ class PublishRegistrationType < Decidim::Command
8
8
  # Public: Initializes the command.
9
9
  #
10
10
  # registration_type - The registration_type to publish.
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic to send diplomas to registered conference users.
7
7
  #
8
- class SendConferenceDiplomas < Rectify::Command
8
+ class SendConferenceDiplomas < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # conference - The conference which the user is invited to.
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Conferences
5
5
  module Admin
6
6
  # A command that sets an conference as unpublished.
7
- class UnpublishConference < Rectify::Command
7
+ class UnpublishConference < Decidim::Command
8
8
  # Public: Initializes the command.
9
9
  #
10
10
  # conference - A Conference that will be published
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Conferences
5
5
  module Admin
6
6
  # This command gets called when a registration type is unpublished from the admin panel.
7
- class UnpublishRegistrationType < Rectify::Command
7
+ class UnpublishRegistrationType < Decidim::Command
8
8
  # Public: Initializes the command.
9
9
  #
10
10
  # registration_type - The registration_type to unpublish.
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when creating a new participatory
7
7
  # conference in the system.
8
- class UpdateConference < Rectify::Command
8
+ class UpdateConference < Decidim::Command
9
9
  include ::Decidim::AttachmentAttributesMethods
10
10
 
11
11
  # Public: Initializes the command.
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when updating a conference
7
7
  # speaker in the system.
8
- class UpdateConferenceSpeaker < Rectify::Command
8
+ class UpdateConferenceSpeaker < Decidim::Command
9
9
  include ::Decidim::AttachmentAttributesMethods
10
10
 
11
11
  # Public: Initializes the command.
@@ -55,13 +55,13 @@ module Decidim
55
55
 
56
56
  def attributes
57
57
  form.attributes.slice(
58
- :full_name,
59
- :twitter_handle,
60
- :personal_url,
61
- :position,
62
- :affiliation,
63
- :short_bio
64
- ).merge(
58
+ "full_name",
59
+ "twitter_handle",
60
+ "personal_url",
61
+ "position",
62
+ "affiliation",
63
+ "short_bio"
64
+ ).symbolize_keys.merge(
65
65
  user: form.user
66
66
  ).merge(
67
67
  attachment_attributes(:avatar)
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Conferences
5
5
  module Admin
6
6
  # This command is executed when the user updates the conference diploma configuration.
7
- class UpdateDiploma < Rectify::Command
7
+ class UpdateDiploma < Decidim::Command
8
8
  # Initializes a UpdateDiploma Command.
9
9
  #
10
10
  # form - The form from which to get the data.
@@ -18,9 +18,9 @@ module Decidim
18
18
  #
19
19
  # Broadcasts :ok if successful, :invalid otherwise.
20
20
  def call
21
- @conference.with_lock do
22
- return broadcast(:invalid) if form.invalid?
21
+ return broadcast(:invalid) if form.invalid?
23
22
 
23
+ @conference.with_lock do
24
24
  update_conference_diploma
25
25
  Decidim.traceability.perform_action!(:update_diploma, @conference, form.current_user) do
26
26
  @conference
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when updating a conference
7
7
  # speaker in the system.
8
- class UpdateMediaLink < Rectify::Command
8
+ class UpdateMediaLink < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -50,11 +50,11 @@ module Decidim
50
50
  media_link,
51
51
  form.current_user,
52
52
  form.attributes.slice(
53
- :title,
54
- :link,
55
- :weight,
56
- :date
57
- ),
53
+ "title",
54
+ "link",
55
+ "weight",
56
+ "date"
57
+ ).symbolize_keys,
58
58
  log_info
59
59
  )
60
60
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when updating a conference
7
7
  # partner in the system.
8
- class UpdatePartner < Rectify::Command
8
+ class UpdatePartner < Decidim::Command
9
9
  include ::Decidim::AttachmentAttributesMethods
10
10
 
11
11
  # Public: Initializes the command.
@@ -51,11 +51,11 @@ module Decidim
51
51
 
52
52
  def attributes
53
53
  form.attributes.slice(
54
- :name,
55
- :weight,
56
- :partner_type,
57
- :link
58
- ).merge(
54
+ "name",
55
+ "weight",
56
+ "partner_type",
57
+ "link"
58
+ ).symbolize_keys.merge(
59
59
  attachment_attributes(:logo)
60
60
  )
61
61
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when updating a conference
7
7
  # registration type in the system.
8
- class UpdateRegistrationType < Rectify::Command
8
+ class UpdateRegistrationType < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -51,11 +51,11 @@ module Decidim
51
51
  registration_type,
52
52
  form.current_user,
53
53
  form.attributes.slice(
54
- :title,
55
- :description,
56
- :price,
57
- :weight
58
- ),
54
+ "title",
55
+ "description",
56
+ "price",
57
+ "weight"
58
+ ).symbolize_keys,
59
59
  log_info
60
60
  )
61
61
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Conferences
5
5
  # This command is executed when the user declines an invite to the conference.
6
- class DeclineInvitation < Rectify::Command
6
+ class DeclineInvitation < Decidim::Command
7
7
  # Initializes a DeclineInvitation Command.
8
8
  #
9
9
  # conference - The current instance of the conference where user has been invited.
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Conferences
5
5
  # This command is executed when the user joins a conference.
6
- class JoinConference < Rectify::Command
6
+ class JoinConference < Decidim::Command
7
7
  # Initializes a JoinConference Command.
8
8
  #
9
9
  # conference - The current instance of the conference to be joined.
@@ -20,9 +20,9 @@ module Decidim
20
20
  #
21
21
  # Broadcasts :ok if successful, :invalid otherwise.
22
22
  def call
23
- conference.with_lock do
24
- return broadcast(:invalid) unless can_join_conference?
23
+ return broadcast(:invalid) unless can_join_conference?
25
24
 
25
+ conference.with_lock do
26
26
  create_registration
27
27
  create_meetings_registrations
28
28
  accept_invitation
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Conferences
5
5
  # This command is executed when the user leaves a conference.
6
- class LeaveConference < Rectify::Command
6
+ class LeaveConference < Decidim::Command
7
7
  # Initializes a LeaveConference Command.
8
8
  #
9
9
  # conference - The current instance of the conference to be left.
@@ -20,10 +20,10 @@ module Decidim
20
20
  #
21
21
  # Broadcasts :ok if successful, :invalid otherwise.
22
22
  def call
23
- @conference.with_lock do
24
- return broadcast(:invalid) unless registration
25
- return broadcast(:invalid) unless meetings_registrations
23
+ return broadcast(:invalid) unless registration
24
+ return broadcast(:invalid) unless meetings_registrations
26
25
 
26
+ @conference.with_lock do
27
27
  destroy_registration
28
28
  destroy_meeting_registration
29
29
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ module Admin
6
+ # This controller allows to send reminders.
7
+ # It is targeted for customizations for reminder things that lives under
8
+ # a conference.
9
+ class RemindersController < Decidim::Admin::RemindersController
10
+ include Concerns::ConferenceAdmin
11
+ end
12
+ end
13
+ end
14
+ end
@@ -26,9 +26,9 @@ module Decidim
26
26
  end
27
27
 
28
28
  def meetings
29
- return unless meeting_component.published? || !meeting_component.presence
29
+ return unless meeting_component&.published? || !meeting_component.presence
30
30
 
31
- @meetings ||= Decidim::Meetings::Meeting.where(component: meeting_component).visible_meeting_for(current_user).order(:start_time)
31
+ @meetings ||= Decidim::Meetings::Meeting.where(component: meeting_component).visible_for(current_user).order(:start_time)
32
32
  end
33
33
 
34
34
  def meeting_days
@@ -6,7 +6,7 @@ module Decidim
6
6
  include Decidim::Events::NotificationEvent
7
7
 
8
8
  def notification_title
9
- I18n.t("notification_title", i18n_options).html_safe
9
+ I18n.t("notification_title", **i18n_options).html_safe
10
10
  end
11
11
 
12
12
  def i18n_options
@@ -7,7 +7,7 @@ module Decidim
7
7
  include Decidim::Events::AuthorEvent
8
8
 
9
9
  def notification_title
10
- I18n.t("notification_title", i18n_options).html_safe
10
+ I18n.t("notification_title", **i18n_options).html_safe
11
11
  end
12
12
 
13
13
  def i18n_role
@@ -14,7 +14,7 @@ module Decidim
14
14
  attribute :existing_user, Boolean, default: false
15
15
 
16
16
  validates :name, presence: true, unless: proc { |object| object.existing_user }
17
- validates :email, presence: true, 'valid_email_2/email': { disposable: true }, unless: proc { |object| object.existing_user }
17
+ validates :email, presence: true, "valid_email_2/email": { disposable: true }, unless: proc { |object| object.existing_user }
18
18
  validates :user, presence: true, if: proc { |object| object.existing_user }
19
19
 
20
20
  def user