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
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Conferences
5
- # This cell renders the button to join a conference.
6
- class JoinConferenceButtonCell < Decidim::ViewModel
7
- include Decidim::LayoutHelper
8
- include Decidim::SanitizeHelper
9
- include Decidim::Conferences::Engine.routes.url_helpers
10
-
11
- def show
12
- render
13
- end
14
-
15
- private
16
-
17
- delegate :current_user, to: :controller, prefix: false
18
-
19
- def allowed?
20
- options[:allowed]
21
- end
22
-
23
- def shows_remaining_slots?
24
- options[:show_remaining_slots] && model.available_slots.positive?
25
- end
26
-
27
- def button_classes
28
- return "button expanded button--sc" if big_button?
29
- "button card__button button--sc small"
30
- end
31
-
32
- def big_button?
33
- options[:big_button]
34
- end
35
-
36
- def i18n_join_text
37
- return I18n.t("join", scope: "decidim.conferences.conference.show") if model.has_available_slots?
38
- I18n.t("no_slots_available", scope: "decidim.conferences.conference.show")
39
- end
40
- end
41
- end
42
- end
@@ -1,11 +0,0 @@
1
- <section class="section">
2
- <div class="extra join-conference">
3
- <div class="">
4
- <%= cell "decidim/conferences/join_conference_button", current_participatory_space, big_button: true, show_remaining_slots: true, allowed: allowed_to?(:join, :conference, conference: current_participatory_space) %>
5
- <%= render partial: "decidim/shared/follow_button", locals: { followable: current_participatory_space } %>
6
- </div>
7
- </div>
8
- <%= resource_reference(current_participatory_space) %>
9
- <%= render partial: "decidim/shared/share_modal" %>
10
- <%= embed_modal_for conference_conference_widget_url(current_participatory_space, format: :js) %>
11
- </section>