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.
- 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 +127 -21
- 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 +128 -22
- data/config/locales/fi.yml +128 -22
- 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 +125 -20
- 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 +126 -20
- data/config/locales/tr-TR.yml +125 -22
- 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 +92 -23
- data/app/cells/decidim/conferences/join_conference_button_cell.rb +0 -42
- 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>
|