decidim-conferences 0.26.2 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +1 -1
  3. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb +4 -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 +8 -8
  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 +1 -1
  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/mailers/decidim/conferences/admin/send_conference_diploma_mailer.rb +2 -2
  39. data/app/models/decidim/conference.rb +2 -3
  40. data/app/models/decidim/conferences/conference_invite.rb +2 -2
  41. data/app/models/decidim/conferences/conference_registration.rb +2 -2
  42. data/app/presenters/decidim/conference_speaker_presenter.rb +3 -5
  43. data/app/presenters/decidim/conferences/conference_stats_presenter.rb +4 -1
  44. data/app/queries/decidim/conferences/admin/admin_users.rb +1 -1
  45. data/app/queries/decidim/conferences/admin/conference_invites.rb +1 -1
  46. data/app/queries/decidim/conferences/admin/conference_speakers.rb +1 -1
  47. data/app/queries/decidim/conferences/conference_program_meetings.rb +2 -2
  48. data/app/queries/decidim/conferences/conference_program_meetings_by_day.rb +3 -3
  49. data/app/queries/decidim/conferences/conferences_with_user_role.rb +1 -1
  50. data/app/queries/decidim/conferences/organization_conferences.rb +1 -1
  51. data/app/queries/decidim/conferences/organization_prioritized_conferences.rb +3 -3
  52. data/app/queries/decidim/conferences/organization_published_conferences.rb +2 -2
  53. data/app/queries/decidim/conferences/prioritized_conferences.rb +1 -1
  54. data/app/queries/decidim/conferences/promoted_conferences.rb +1 -1
  55. data/app/queries/decidim/conferences/published_conferences.rb +1 -1
  56. data/app/queries/decidim/conferences/visible_conferences.rb +1 -1
  57. data/app/serializers/decidim/conferences/{data_portability_conference_invite_serializer.rb → download_your_data_conference_invite_serializer.rb} +2 -2
  58. data/app/serializers/decidim/conferences/{data_portability_conference_registration_serializer.rb → download_your_data_conference_registration_serializer.rb} +2 -2
  59. data/app/views/decidim/conferences/admin/partners/index.html.erb +3 -1
  60. data/app/views/layouts/decidim/_conferences_nav.html.erb +1 -1
  61. data/config/locales/am-ET.yml +1 -0
  62. data/config/locales/ar.yml +1 -0
  63. data/config/locales/bg.yml +1 -0
  64. data/config/locales/ca.yml +1 -0
  65. data/config/locales/cs.yml +1 -0
  66. data/config/locales/da.yml +1 -0
  67. data/config/locales/de.yml +1 -0
  68. data/config/locales/el.yml +1 -0
  69. data/config/locales/en.yml +1 -1
  70. data/config/locales/eo.yml +1 -0
  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/et.yml +1 -0
  75. data/config/locales/eu.yml +1 -0
  76. data/config/locales/fi-plain.yml +1 -0
  77. data/config/locales/fi.yml +2 -1
  78. data/config/locales/fr-CA.yml +1 -0
  79. data/config/locales/fr.yml +2 -1
  80. data/config/locales/ga-IE.yml +1 -0
  81. data/config/locales/gl.yml +1 -0
  82. data/config/locales/hr.yml +1 -0
  83. data/config/locales/hu.yml +1 -0
  84. data/config/locales/id-ID.yml +1 -0
  85. data/config/locales/is-IS.yml +2 -1
  86. data/config/locales/it.yml +1 -0
  87. data/config/locales/ja.yml +1 -0
  88. data/config/locales/ko.yml +1 -0
  89. data/config/locales/lb.yml +1 -0
  90. data/config/locales/lt.yml +1 -0
  91. data/config/locales/lv.yml +1 -0
  92. data/config/locales/mt.yml +1 -0
  93. data/config/locales/nl.yml +2 -1
  94. data/config/locales/no.yml +1 -0
  95. data/config/locales/om-ET.yml +1 -0
  96. data/config/locales/pl.yml +1 -0
  97. data/config/locales/pt-BR.yml +2 -1
  98. data/config/locales/pt.yml +1 -0
  99. data/config/locales/ro-RO.yml +1 -0
  100. data/config/locales/ru.yml +1 -0
  101. data/config/locales/si-LK.yml +1 -0
  102. data/config/locales/sk.yml +1 -0
  103. data/config/locales/sl.yml +1 -0
  104. data/config/locales/so-SO.yml +1 -0
  105. data/config/locales/sr-CS.yml +1 -0
  106. data/config/locales/sv.yml +1 -0
  107. data/config/locales/sw-KE.yml +1 -0
  108. data/config/locales/ti-ER.yml +1 -0
  109. data/config/locales/tr-TR.yml +1 -0
  110. data/config/locales/uk.yml +1 -0
  111. data/config/locales/val-ES.yml +1 -0
  112. data/config/locales/vi.yml +1 -0
  113. data/config/locales/zh-CN.yml +1 -0
  114. data/config/locales/zh-TW.yml +1 -0
  115. data/lib/decidim/conferences/admin_engine.rb +1 -0
  116. data/lib/decidim/conferences/participatory_space.rb +8 -8
  117. data/lib/decidim/conferences/test/factories.rb +1 -1
  118. data/lib/decidim/conferences/version.rb +1 -1
  119. 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: 5258df72a4c5a6687ef76c3d1ab8083b6e031aa66063a3182614ea95127b510b
4
+ data.tar.gz: 32d40203166f672c3e29165aa814faf2d1c311e22014fea3ad4873153042af6f
5
5
  SHA512:
6
- metadata.gz: 5a4c53dc5e261e6dd3018d1782022630906e60c62ab6b26293b9ea11d61b8ed8c1418bf5e9525bb1071e867d9b606fa500bd06fd32b57bb60f7cd00a56e6c5b8
7
- data.tar.gz: 69f61b21f6803f5b9e574c84786862f3710698b8f4c1fb646188aa967b00124e85a5609824628ea7f1d1ac914495c1d590e91a17aff9296d0158f6c76d8aa4c6
6
+ metadata.gz: ffd7e95539f0068f5cef41b91849b45ecb55900f5b590d9339d4dc68824f7f623555914f053eb697f68d4ddf3f41e0b2b8851e1c7077d04b8aa5cb960325183f
7
+ data.tar.gz: 6f3e0cace82753ab90c13041e86ec9bdacbb9278792cc615c46cdfb608a0d074dc19d31c4749d560d5a866ff913e95d0668035bca427b968c6f7162f7b39d3ab
@@ -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">
@@ -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
@@ -33,6 +29,10 @@ module Decidim
33
29
  hash.push(I18n.locale)
34
30
  hash.join(Decidim.cache_key_separator)
35
31
  end
32
+
33
+ def cache_expiry_time
34
+ 10.minutes
35
+ end
36
36
  end
37
37
  end
38
38
  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.
@@ -54,13 +54,13 @@ module Decidim
54
54
 
55
55
  def conference_speaker_with_attributes
56
56
  attrs = form.attributes.slice(
57
- :full_name,
58
- :twitter_handle,
59
- :personal_url,
60
- :position,
61
- :affiliation,
62
- :short_bio
63
- ).merge(
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
@@ -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
@@ -28,7 +28,7 @@ module Decidim
28
28
  def meetings
29
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
@@ -35,8 +35,8 @@ module Decidim
35
35
  def add_diploma_attachment
36
36
  diploma = WickedPdf.new.pdf_from_string(
37
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"),
38
+ template: "decidim/conferences/admin/send_conference_diploma_mailer/diploma_user",
39
+ layout: "decidim/diploma"),
40
40
  orientation: "Landscape"
41
41
  )
42
42
 
@@ -19,6 +19,7 @@ module Decidim
19
19
  include Decidim::Searchable
20
20
  include Decidim::HasUploadValidations
21
21
  include Decidim::TranslatableResource
22
+ include Decidim::FilterableResource
22
23
 
23
24
  translatable_fields :title, :slogan, :short_description, :description, :objectives, :registration_terms
24
25
 
@@ -140,8 +141,6 @@ module Decidim
140
141
  end
141
142
 
142
143
  # Allow ransacker to search for a key in a hstore column (`title`.`en`)
143
- ransacker :title do |parent|
144
- Arel::Nodes::InfixOperation.new("->>", parent.table[:title], Arel::Nodes.build_quoted(I18n.locale.to_s))
145
- end
144
+ ransacker_i18n :title
146
145
  end
147
146
  end