decidim-conferences 0.27.10 → 0.28.0.rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/conferences/conference_cell.rb +9 -4
- data/app/cells/decidim/conferences/conference_dropdown_metadata_cell.rb +19 -0
- data/app/cells/decidim/conferences/conference_g_cell.rb +23 -0
- data/app/cells/decidim/conferences/conference_metadata_cell.rb +21 -0
- data/app/cells/decidim/conferences/conference_s_cell.rb +13 -0
- data/app/cells/decidim/conferences/conference_speaker/show.erb +44 -58
- data/app/cells/decidim/conferences/conference_speaker_cell.rb +4 -14
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb +15 -14
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_settings_form/show.erb +3 -0
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_settings_form_cell.rb +19 -0
- data/app/cells/decidim/conferences/linked_participatory_spaces/show.erb +6 -8
- data/app/cells/decidim/conferences/linked_participatory_spaces_cell.rb +1 -10
- data/app/cells/decidim/conferences/media_link/show.erb +6 -8
- data/app/cells/decidim/conferences/partner/image.erb +3 -0
- data/app/cells/decidim/conferences/partner/show.erb +8 -8
- data/app/cells/decidim/conferences/partner/text.erb +1 -0
- data/app/cells/decidim/conferences/partner_cell.rb +4 -2
- data/app/cells/decidim/conferences/registration_type/join_conference.erb +15 -12
- data/app/cells/decidim/conferences/registration_type/registration_confirm.erb +12 -12
- data/app/cells/decidim/conferences/registration_type/show.erb +11 -14
- data/app/cells/decidim/conferences/registration_type_cell.rb +3 -3
- data/app/commands/decidim/conferences/admin/copy_conference.rb +1 -1
- data/app/commands/decidim/conferences/admin/create_conference.rb +2 -11
- data/app/commands/decidim/conferences/admin/create_conference_speaker.rb +2 -2
- data/app/commands/decidim/conferences/admin/create_media_link.rb +2 -2
- data/app/commands/decidim/conferences/admin/create_partner.rb +2 -2
- data/app/commands/decidim/conferences/admin/create_registration_type.rb +2 -2
- data/app/commands/decidim/conferences/admin/destroy_conference_speaker.rb +2 -2
- data/app/commands/decidim/conferences/admin/destroy_media_link.rb +1 -1
- data/app/commands/decidim/conferences/admin/destroy_partner.rb +3 -3
- data/app/commands/decidim/conferences/admin/destroy_registration_type.rb +1 -1
- data/app/commands/decidim/conferences/admin/invite_user_to_join_conference.rb +5 -5
- data/app/commands/decidim/conferences/admin/publish_conference.rb +9 -26
- data/app/commands/decidim/conferences/admin/send_conference_diplomas.rb +1 -1
- data/app/commands/decidim/conferences/admin/update_conference.rb +2 -11
- data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +1 -1
- data/app/commands/decidim/conferences/admin/update_media_link.rb +1 -1
- data/app/commands/decidim/conferences/admin/update_partner.rb +1 -1
- data/app/commands/decidim/conferences/admin/update_registration_type.rb +1 -1
- data/app/commands/decidim/conferences/decline_invitation.rb +1 -1
- data/app/commands/decidim/conferences/join_conference.rb +5 -5
- data/app/constraints/decidim/conferences/current_component.rb +2 -2
- data/app/constraints/decidim/conferences/current_conference.rb +2 -2
- data/app/controllers/concerns/decidim/conferences/admin/conference_context.rb +1 -1
- data/app/controllers/decidim/conferences/admin/concerns/conference_admin.rb +2 -2
- data/app/controllers/decidim/conferences/admin/conference_attachment_collections_controller.rb +6 -1
- data/app/controllers/decidim/conferences/admin/conference_attachments_controller.rb +5 -0
- data/app/controllers/decidim/conferences/admin/conference_invites_controller.rb +2 -1
- data/app/controllers/decidim/conferences/admin/conference_publications_controller.rb +10 -28
- data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/conference_user_roles_controller.rb +8 -90
- data/app/controllers/decidim/conferences/admin/conferences_controller.rb +2 -0
- data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/exports_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/imports_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/moderations/reports_controller.rb +1 -1
- data/app/controllers/decidim/conferences/admin/moderations_controller.rb +1 -1
- data/app/controllers/decidim/conferences/application_controller.rb +6 -0
- data/app/controllers/decidim/conferences/conference_registrations_controller.rb +3 -3
- data/app/controllers/decidim/conferences/conferences_controller.rb +9 -2
- data/app/events/decidim/conferences/conference_registration_notification_event.rb +3 -13
- data/app/events/decidim/conferences/conference_registrations_enabled_event.rb +1 -1
- data/app/events/decidim/conferences/conference_registrations_over_percentage_event.rb +1 -1
- data/app/events/decidim/conferences/conference_role_assigned_event.rb +6 -6
- data/app/forms/decidim/conferences/admin/conference_copy_form.rb +1 -1
- data/app/forms/decidim/conferences/admin/conference_form.rb +4 -15
- data/app/forms/decidim/conferences/admin/conference_user_role_form.rb +2 -17
- data/app/helpers/decidim/conferences/admin/conferences_helper.rb +0 -4
- data/app/helpers/decidim/conferences/conference_helper.rb +55 -0
- data/app/helpers/decidim/conferences/conference_program_helper.rb +1 -1
- data/app/helpers/decidim/conferences/media_attachments_helper.rb +0 -10
- data/app/helpers/decidim/conferences/partners_helper.rb +3 -1
- data/app/mailers/decidim/conferences/admin/invite_join_conference_mailer.rb +1 -1
- data/app/mailers/decidim/conferences/admin/send_conference_diploma_mailer.rb +1 -1
- data/app/mailers/decidim/conferences/conference_registration_mailer.rb +2 -2
- data/app/models/decidim/conference.rb +4 -4
- data/app/models/decidim/conference_user_role.rb +6 -34
- data/app/packs/entrypoints/decidim_conferences.js +5 -0
- data/app/packs/src/decidim/conferences/admin/conferences.js +6 -6
- data/app/packs/stylesheets/decidim/conferences/_conference.scss +102 -0
- data/app/packs/stylesheets/decidim/conferences/_media.scss +13 -0
- data/app/packs/stylesheets/decidim/conferences/_program.scss +43 -0
- data/app/packs/stylesheets/decidim/conferences/_registration.scss +39 -0
- data/app/packs/stylesheets/decidim/conferences/_speaker.scss +83 -0
- data/app/packs/stylesheets/decidim/conferences/conferences.scss +5 -3
- data/app/permissions/decidim/conferences/permissions.rb +2 -13
- data/app/presenters/decidim/conference_speaker_presenter.rb +1 -1
- data/app/presenters/decidim/conferences/admin_log/conference_invite_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/admin_log/conference_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/admin_log/conference_registration_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/admin_log/conference_speaker_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/admin_log/conference_user_role_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/admin_log/media_link_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/admin_log/partner_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/admin_log/registration_type_presenter.rb +2 -2
- data/app/presenters/decidim/conferences/conference_stats_presenter.rb +3 -28
- data/app/queries/decidim/conferences/admin/admin_users.rb +4 -4
- data/app/queries/decidim/conferences/conferences_with_user_role.rb +2 -2
- data/app/queries/decidim/conferences/organization_conferences.rb +1 -1
- data/app/queries/decidim/conferences/organization_published_conferences.rb +1 -1
- data/app/views/decidim/conferences/admin/conference_copies/_form.html.erb +22 -28
- data/app/views/decidim/conferences/admin/conference_copies/new.html.erb +16 -5
- data/app/views/decidim/conferences/admin/conference_invites/_form.html.erb +17 -19
- data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +69 -74
- data/app/views/decidim/conferences/admin/conference_invites/new.html.erb +21 -17
- data/app/views/decidim/conferences/admin/conference_registrations/index.html.erb +45 -45
- data/app/views/decidim/conferences/admin/conference_speakers/_form.html.erb +42 -46
- data/app/views/decidim/conferences/admin/conference_speakers/edit.html.erb +16 -6
- data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +52 -55
- data/app/views/decidim/conferences/admin/conference_speakers/new.html.erb +16 -6
- data/app/views/decidim/conferences/admin/conference_user_roles/_form.html.erb +14 -18
- data/app/views/decidim/conferences/admin/conference_user_roles/edit.html.erb +16 -6
- data/app/views/decidim/conferences/admin/conference_user_roles/index.html.erb +53 -56
- data/app/views/decidim/conferences/admin/conference_user_roles/new.html.erb +16 -6
- data/app/views/decidim/conferences/admin/conferences/_form.html.erb +88 -88
- data/app/views/decidim/conferences/admin/conferences/edit.html.erb +26 -12
- data/app/views/decidim/conferences/admin/conferences/index.html.erb +55 -64
- data/app/views/decidim/conferences/admin/conferences/new.html.erb +16 -8
- data/app/views/decidim/conferences/admin/diplomas/_form.html.erb +18 -24
- data/app/views/decidim/conferences/admin/diplomas/edit.html.erb +19 -5
- data/app/views/decidim/conferences/admin/media_links/_form.html.erb +15 -19
- data/app/views/decidim/conferences/admin/media_links/edit.html.erb +16 -6
- data/app/views/decidim/conferences/admin/media_links/index.html.erb +37 -40
- data/app/views/decidim/conferences/admin/media_links/new.html.erb +16 -6
- data/app/views/decidim/conferences/admin/partners/_form.html.erb +18 -22
- data/app/views/decidim/conferences/admin/partners/edit.html.erb +16 -6
- data/app/views/decidim/conferences/admin/partners/index.html.erb +45 -48
- data/app/views/decidim/conferences/admin/partners/new.html.erb +16 -6
- data/app/views/decidim/conferences/admin/registration_types/_form.html.erb +23 -23
- data/app/views/decidim/conferences/admin/registration_types/edit.html.erb +16 -6
- data/app/views/decidim/conferences/admin/registration_types/index.html.erb +52 -56
- data/app/views/decidim/conferences/admin/registration_types/new.html.erb +16 -6
- data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma_user.html.erb +2 -2
- data/app/views/decidim/conferences/conference_program/_program_item.html.erb +21 -24
- data/app/views/decidim/conferences/conference_program/_program_meeting.html.erb +29 -63
- data/app/views/decidim/conferences/conference_program/show.html.erb +27 -39
- data/app/views/decidim/conferences/conference_speakers/index.html.erb +12 -6
- data/app/views/decidim/conferences/conferences/_conference_hero.html.erb +33 -0
- data/app/views/decidim/conferences/conferences/_partners.html.erb +10 -13
- data/app/views/decidim/conferences/conferences/index.html.erb +17 -7
- data/app/views/decidim/conferences/conferences/show.html.erb +84 -50
- data/app/views/decidim/conferences/media/index.html.erb +33 -19
- data/app/views/decidim/conferences/registration_types/index.html.erb +25 -17
- data/app/views/layouts/decidim/admin/conference.html.erb +12 -14
- data/app/views/layouts/decidim/admin/conferences.html.erb +13 -8
- data/app/views/layouts/decidim/conference.html.erb +7 -17
- data/app/views/layouts/decidim/conferences/_conference_nav_item.html.erb +6 -0
- data/app/views/layouts/decidim/conferences/application.html.erb +6 -0
- data/config/assets.rb +1 -1
- data/config/initializers/wicked_pdf.rb +1 -1
- data/config/locales/ar.yml +3 -64
- data/config/locales/bg.yml +0 -612
- data/config/locales/ca.yml +35 -55
- data/config/locales/cs.yml +35 -53
- data/config/locales/de.yml +34 -54
- data/config/locales/el.yml +11 -51
- data/config/locales/en.yml +34 -54
- data/config/locales/es-MX.yml +32 -52
- data/config/locales/es-PY.yml +32 -52
- data/config/locales/es.yml +32 -52
- data/config/locales/eu.yml +33 -58
- data/config/locales/fi-plain.yml +32 -52
- data/config/locales/fi.yml +32 -52
- data/config/locales/fr-CA.yml +31 -51
- data/config/locales/fr.yml +31 -51
- data/config/locales/ga-IE.yml +0 -17
- data/config/locales/gl.yml +3 -62
- data/config/locales/hu.yml +15 -53
- data/config/locales/id-ID.yml +3 -57
- data/config/locales/it.yml +4 -62
- data/config/locales/ja.yml +33 -54
- data/config/locales/lb.yml +1 -55
- data/config/locales/lt.yml +14 -52
- data/config/locales/lv.yml +1 -61
- data/config/locales/nl.yml +3 -62
- data/config/locales/no.yml +1 -62
- data/config/locales/pl.yml +1 -81
- data/config/locales/pt-BR.yml +1 -72
- data/config/locales/pt.yml +2 -63
- data/config/locales/ro-RO.yml +13 -50
- data/config/locales/sk.yml +1 -61
- data/config/locales/sl.yml +0 -2
- data/config/locales/sr-CS.yml +0 -9
- data/config/locales/sv.yml +22 -77
- data/config/locales/tr-TR.yml +13 -62
- data/config/locales/zh-CN.yml +3 -60
- data/config/locales/zh-TW.yml +6 -47
- data/db/migrate/20221116084952_add_weight_to_conferences.rb +7 -0
- data/lib/decidim/conferences/admin_engine.rb +14 -138
- data/lib/decidim/conferences/content_blocks/registry_manager.rb +21 -0
- data/lib/decidim/conferences/engine.rb +17 -15
- data/lib/decidim/conferences/menu.rb +182 -0
- data/lib/decidim/conferences/participatory_space.rb +6 -200
- data/lib/decidim/conferences/query_extensions.rb +2 -2
- data/lib/decidim/conferences/seeds.rb +153 -0
- data/lib/decidim/conferences/test/factories.rb +37 -73
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +47 -51
- data/app/cells/decidim/conferences/conference_address/show.erb +0 -11
- data/app/cells/decidim/conferences/conference_address_cell.rb +0 -11
- data/app/cells/decidim/conferences/conference_m/footer.erb +0 -9
- data/app/cells/decidim/conferences/conference_m/tags.erb +0 -1
- data/app/cells/decidim/conferences/conference_m_cell.rb +0 -38
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +0 -30
- data/app/cells/decidim/conferences/photo/show.erb +0 -26
- data/app/cells/decidim/conferences/photo_cell.rb +0 -41
- data/app/cells/decidim/conferences/photos_list/show.erb +0 -8
- data/app/cells/decidim/conferences/photos_list_cell.rb +0 -18
- data/app/commands/decidim/conferences/admin/create_conference_admin.rb +0 -114
- data/app/commands/decidim/conferences/admin/destroy_conference_admin.rb +0 -58
- data/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb +0 -22
- data/app/commands/decidim/conferences/admin/unpublish_conference.rb +0 -39
- data/app/commands/decidim/conferences/admin/update_conference_admin.rb +0 -53
- data/app/controllers/decidim/conferences/conference_widgets_controller.rb +0 -33
- data/app/queries/decidim/conferences/admin/conference_invites.rb +0 -60
- data/app/views/decidim/conferences/_order_by_conferences.html.erb +0 -3
- data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +0 -27
- data/app/views/decidim/conferences/media/_attachments.html.erb +0 -6
- data/app/views/decidim/conferences/shared/_conference_user_login.html.erb +0 -14
- data/app/views/layouts/decidim/_conference_hero.html.erb +0 -42
- data/app/views/layouts/decidim/_conferences_nav.html.erb +0 -46
- data/config/locales/he-IL.yml +0 -1
- data/db/seeds/Exampledocument.pdf +0 -0
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/db/seeds/homepage_image.jpg +0 -0
- data/db/seeds/logo.png +0 -0
- data/decidim-conferences.gemspec +0 -33
@@ -1,30 +0,0 @@
|
|
1
|
-
<section id="highlighted_conferences" class="wrapper-home home-section">
|
2
|
-
<div class="row" id="highlighted-conferences">
|
3
|
-
<h3 class="section-heading"><%= t("active_conferences", scope: i18n_scope) %></h3>
|
4
|
-
<div class="row collapse">
|
5
|
-
<div class="row small-up-1 smallmedium-up-2 mediumlarge-up-3
|
6
|
-
large-up-4 card-grid">
|
7
|
-
<% highlighted_conferences.each do |conference| %>
|
8
|
-
<div class="column">
|
9
|
-
<%= link_to decidim_conferences.conference_path(conference), class: "card card--conference card--mini" do %>
|
10
|
-
<div aria-hidden="true" class="card__image-top"
|
11
|
-
style="background-image:url('<%= conference.attached_uploader(:hero_image).path %>')"></div>
|
12
|
-
<div class="card__content">
|
13
|
-
<span class="card__title card__link"><%= decidim_escape_translated conference.title %></span>
|
14
|
-
</div>
|
15
|
-
<% end %>
|
16
|
-
</div>
|
17
|
-
<% end %>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<div class="row" id="see-all-conferences">
|
22
|
-
<div class="columns small-centered small-12
|
23
|
-
smallmedium-8 medium-6 large-4">
|
24
|
-
<%= link_to t("see_all_conferences", scope: i18n_scope),
|
25
|
-
decidim_conferences.conferences_path,
|
26
|
-
class: "button expanded hollow button--sc home-section__cta",
|
27
|
-
title: t("conferences_button_title", scope: i18n_scope) %>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</section>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<div class="column">
|
2
|
-
<div class="card" data-open="media-picture-<%= index %>">
|
3
|
-
<div class="picture__content">
|
4
|
-
<%= image_thumb %>
|
5
|
-
<strong class="card__title"><%= title %></strong>
|
6
|
-
<div class="text-small">
|
7
|
-
<%= short_description %>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
<div id="media-picture-<%= index %>" class="reveal picture__modal" data-reveal>
|
12
|
-
<div class="reveal__header">
|
13
|
-
<h3 class="reveal__title"><%= t("conferences.photo.show.photo", scope: "decidim") %></h3>
|
14
|
-
</div>
|
15
|
-
<%= image_big %>
|
16
|
-
<h5>
|
17
|
-
<strong><%= title %></strong>
|
18
|
-
</h5>
|
19
|
-
<div class="text-small">
|
20
|
-
<%= decidim_sanitize_editor description %>
|
21
|
-
</div>
|
22
|
-
<button class="close-button" data-close aria-label="<%= t("conferences.photo.show.close_modal", scope: "decidim") %>" type="button">
|
23
|
-
<span aria-hidden="true">×</span>
|
24
|
-
</button>
|
25
|
-
</div>
|
26
|
-
</div>
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
# This cell renders the media link card for an instance of a MediaLink
|
6
|
-
class PhotoCell < Decidim::ViewModel
|
7
|
-
include Decidim::ApplicationHelper
|
8
|
-
include Decidim::SanitizeHelper
|
9
|
-
|
10
|
-
def show
|
11
|
-
render
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def index
|
17
|
-
@options[:index]
|
18
|
-
end
|
19
|
-
|
20
|
-
def image_thumb
|
21
|
-
image_tag model.thumbnail_url, alt: t("alt", scope: "decidim.conferences.photo.image.attributes")
|
22
|
-
end
|
23
|
-
|
24
|
-
def image_big
|
25
|
-
image_tag model.big_url, alt: t("alt", scope: "decidim.conferences.photo.image.attributes")
|
26
|
-
end
|
27
|
-
|
28
|
-
def title
|
29
|
-
decidim_escape_translated model.title
|
30
|
-
end
|
31
|
-
|
32
|
-
def short_description
|
33
|
-
decidim_sanitize_editor html_truncate(description, length: 100, separator: "...")
|
34
|
-
end
|
35
|
-
|
36
|
-
def description
|
37
|
-
translated_attribute(model.description)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<div class="section images">
|
2
|
-
<h3 class="section-heading"><%= t("conferences.photos_list.show.related_photos", scope: "decidim") %></h3>
|
3
|
-
<div class="row small-up-1 smallmedium-up-2 card-grid">
|
4
|
-
<% model.each_with_index do |photo, index| %>
|
5
|
-
<%= cell "decidim/conferences/photo", photo, index: index %>
|
6
|
-
<% end %>
|
7
|
-
</div>
|
8
|
-
</div>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
# This cell renders the photos list
|
6
|
-
class PhotosListCell < Decidim::ViewModel
|
7
|
-
include Cell::ViewModel::Partial
|
8
|
-
include Decidim::ApplicationHelper
|
9
|
-
include Decidim::SanitizeHelper
|
10
|
-
|
11
|
-
def show
|
12
|
-
return unless model.any?
|
13
|
-
|
14
|
-
render
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,114 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
module Admin
|
6
|
-
# A command with all the business logic when creating a new conference
|
7
|
-
# admin in the system.
|
8
|
-
class CreateConferenceAdmin < NotifyRoleAssignedToConference
|
9
|
-
# Public: Initializes the command.
|
10
|
-
#
|
11
|
-
# form - A form object with the params.
|
12
|
-
# conference - The Conference that will hold the
|
13
|
-
# user role
|
14
|
-
def initialize(form, current_user, conference)
|
15
|
-
@form = form
|
16
|
-
@current_user = current_user
|
17
|
-
@conference = conference
|
18
|
-
end
|
19
|
-
|
20
|
-
# Executes the command. Broadcasts these events:
|
21
|
-
#
|
22
|
-
# - :ok when everything is valid.
|
23
|
-
# - :invalid if the form wasn't valid and we couldn't proceed.
|
24
|
-
#
|
25
|
-
# Returns nothing.
|
26
|
-
def call
|
27
|
-
return broadcast(:invalid) if form.invalid?
|
28
|
-
|
29
|
-
ActiveRecord::Base.transaction do
|
30
|
-
@user ||= existing_user || new_user
|
31
|
-
create_role
|
32
|
-
add_admin_as_follower
|
33
|
-
end
|
34
|
-
|
35
|
-
broadcast(:ok)
|
36
|
-
rescue ActiveRecord::RecordInvalid
|
37
|
-
form.errors.add(:email, :taken)
|
38
|
-
broadcast(:invalid)
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
attr_reader :form, :conference, :current_user, :user
|
44
|
-
|
45
|
-
def create_role
|
46
|
-
Decidim.traceability.perform_action!(
|
47
|
-
:create,
|
48
|
-
Decidim::ConferenceUserRole,
|
49
|
-
current_user,
|
50
|
-
resource: {
|
51
|
-
title: user.name
|
52
|
-
}
|
53
|
-
) do
|
54
|
-
Decidim::ConferenceUserRole.find_or_create_by!(
|
55
|
-
role: form.role.to_sym,
|
56
|
-
user: user,
|
57
|
-
conference: @conference
|
58
|
-
)
|
59
|
-
end
|
60
|
-
send_notification user
|
61
|
-
end
|
62
|
-
|
63
|
-
def existing_user
|
64
|
-
return @existing_user if defined?(@existing_user)
|
65
|
-
|
66
|
-
@existing_user = User.find_by(
|
67
|
-
email: form.email,
|
68
|
-
organization: conference.organization
|
69
|
-
)
|
70
|
-
|
71
|
-
InviteUserAgain.call(@existing_user, invitation_instructions) if @existing_user&.invitation_pending?
|
72
|
-
|
73
|
-
@existing_user
|
74
|
-
end
|
75
|
-
|
76
|
-
def new_user
|
77
|
-
@new_user ||= InviteUser.call(user_form) do
|
78
|
-
on(:ok) do |user|
|
79
|
-
return user
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
def user_form
|
85
|
-
OpenStruct.new(name: form.name,
|
86
|
-
email: form.email.downcase,
|
87
|
-
organization: conference.organization,
|
88
|
-
admin: false,
|
89
|
-
invited_by: current_user,
|
90
|
-
invitation_instructions: invitation_instructions)
|
91
|
-
end
|
92
|
-
|
93
|
-
def invitation_instructions
|
94
|
-
return "invite_admin" if form.role == "admin"
|
95
|
-
|
96
|
-
"invite_collaborator"
|
97
|
-
end
|
98
|
-
|
99
|
-
def add_admin_as_follower
|
100
|
-
return if user.follows?(conference)
|
101
|
-
|
102
|
-
form = Decidim::FollowForm
|
103
|
-
.from_params(followable_gid: conference.to_signed_global_id.to_s)
|
104
|
-
.with_context(
|
105
|
-
current_organization: conference.organization,
|
106
|
-
current_user: user
|
107
|
-
)
|
108
|
-
|
109
|
-
Decidim::CreateFollow.new(form, user).call
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
module Admin
|
6
|
-
# A command with all the business logic when destroying an conference
|
7
|
-
# admin in the system.
|
8
|
-
class DestroyConferenceAdmin < Decidim::Command
|
9
|
-
# Public: Initializes the command.
|
10
|
-
#
|
11
|
-
# role - the ConferenceUserRole to destroy
|
12
|
-
# current_user - the user performing this action
|
13
|
-
def initialize(role, current_user)
|
14
|
-
@role = role
|
15
|
-
@current_user = current_user
|
16
|
-
end
|
17
|
-
|
18
|
-
# Executes the command. Broadcasts these events:
|
19
|
-
#
|
20
|
-
# - :ok when everything is valid.
|
21
|
-
# - :invalid if the form wasn't valid and we couldn't proceed.
|
22
|
-
#
|
23
|
-
# Returns nothing.
|
24
|
-
def call
|
25
|
-
destroy_role!
|
26
|
-
dispatch_system_event
|
27
|
-
broadcast(:ok)
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
attr_reader :role, :current_user
|
33
|
-
|
34
|
-
def dispatch_system_event
|
35
|
-
ActiveSupport::Notifications.publish("decidim.system.participatory_space.admin.destroyed", role.class.name, role.id)
|
36
|
-
end
|
37
|
-
|
38
|
-
def destroy_role!
|
39
|
-
extra_info = {
|
40
|
-
resource: {
|
41
|
-
title: role.user.name
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
Decidim.traceability.perform_action!(
|
46
|
-
"delete",
|
47
|
-
role,
|
48
|
-
current_user,
|
49
|
-
extra_info
|
50
|
-
) do
|
51
|
-
role.destroy!
|
52
|
-
role
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
module Admin
|
6
|
-
# A command to notify users when a role is assigned for a Conference
|
7
|
-
class NotifyRoleAssignedToConference < Decidim::Command
|
8
|
-
def send_notification(user)
|
9
|
-
Decidim::EventsManager.publish(
|
10
|
-
event: "decidim.events.conferences.role_assigned",
|
11
|
-
event_class: Decidim::Conferences::ConferenceRoleAssignedEvent,
|
12
|
-
resource: form.current_participatory_space,
|
13
|
-
affected_users: [user],
|
14
|
-
extra: {
|
15
|
-
role: form.role
|
16
|
-
}
|
17
|
-
)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
module Admin
|
6
|
-
# A command that sets an conference as unpublished.
|
7
|
-
class UnpublishConference < Decidim::Command
|
8
|
-
# Public: Initializes the command.
|
9
|
-
#
|
10
|
-
# conference - A Conference that will be published
|
11
|
-
# current_user - the user performing the action
|
12
|
-
def initialize(conference, current_user)
|
13
|
-
@conference = conference
|
14
|
-
@current_user = current_user
|
15
|
-
end
|
16
|
-
|
17
|
-
# Executes the command. Broadcasts these events:
|
18
|
-
#
|
19
|
-
# - :ok when everything is valid.
|
20
|
-
# - :invalid if the data wasn't valid and we couldn't proceed.
|
21
|
-
#
|
22
|
-
# Returns nothing.
|
23
|
-
def call
|
24
|
-
return broadcast(:invalid) if conference.nil? || !conference.published?
|
25
|
-
|
26
|
-
Decidim.traceability.perform_action!("unpublish", conference, current_user) do
|
27
|
-
conference.unpublish!
|
28
|
-
end
|
29
|
-
|
30
|
-
broadcast(:ok)
|
31
|
-
end
|
32
|
-
|
33
|
-
private
|
34
|
-
|
35
|
-
attr_reader :conference, :current_user
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
module Admin
|
6
|
-
# A command with all the business logic when updated a participatory
|
7
|
-
# process admin in the system.
|
8
|
-
class UpdateConferenceAdmin < NotifyRoleAssignedToConference
|
9
|
-
# Public: Initializes the command.
|
10
|
-
#
|
11
|
-
# form - A form object with the params.
|
12
|
-
# user_role - The ConferenceUSerRole to update
|
13
|
-
def initialize(form, user_role)
|
14
|
-
@form = form
|
15
|
-
@user_role = user_role
|
16
|
-
end
|
17
|
-
|
18
|
-
# Executes the command. Broadcasts these events:
|
19
|
-
#
|
20
|
-
# - :ok when everything is valid.
|
21
|
-
# - :invalid if the form wasn't valid and we couldn't proceed.
|
22
|
-
#
|
23
|
-
# Returns nothing.
|
24
|
-
def call
|
25
|
-
return broadcast(:invalid) if form.invalid?
|
26
|
-
return broadcast(:invalid) unless user_role
|
27
|
-
|
28
|
-
update_role!
|
29
|
-
broadcast(:ok)
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
attr_reader :form, :user_role
|
35
|
-
|
36
|
-
def update_role!
|
37
|
-
log_info = {
|
38
|
-
resource: {
|
39
|
-
title: user_role.user.name
|
40
|
-
}
|
41
|
-
}
|
42
|
-
Decidim.traceability.update!(
|
43
|
-
user_role,
|
44
|
-
form.current_user,
|
45
|
-
{ role: form.role },
|
46
|
-
log_info
|
47
|
-
)
|
48
|
-
send_notification user_role.user
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
class ConferenceWidgetsController < Decidim::WidgetsController
|
6
|
-
helper Decidim::SanitizeHelper
|
7
|
-
|
8
|
-
def show
|
9
|
-
enforce_permission_to :embed, :conference, conference: model if model
|
10
|
-
|
11
|
-
super
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def model
|
17
|
-
@model ||= Conference.where(organization: current_organization).published.find_by(slug: params[:conference_slug])
|
18
|
-
end
|
19
|
-
|
20
|
-
def current_participatory_space
|
21
|
-
model
|
22
|
-
end
|
23
|
-
|
24
|
-
def iframe_url
|
25
|
-
@iframe_url ||= conference_conference_widget_url(model)
|
26
|
-
end
|
27
|
-
|
28
|
-
def permission_class_chain
|
29
|
-
::Decidim.permissions_registry.chain_for(::Decidim::Conferences::ApplicationController)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Conferences
|
5
|
-
module Admin
|
6
|
-
# A class used to find the ConferenceInvites by their status status.
|
7
|
-
class ConferenceInvites < Decidim::Query
|
8
|
-
# Syntactic sugar to initialize the class and return the queried objects.
|
9
|
-
#
|
10
|
-
# conference_invites - the initial Invites relation that needs to be filtered.
|
11
|
-
# query - query to filter conference_invites
|
12
|
-
# status - invite status to be used as a filter
|
13
|
-
def self.for(conference_invites, query = nil, status = nil)
|
14
|
-
new(conference_invites, query, status).query
|
15
|
-
end
|
16
|
-
|
17
|
-
# Initializes the class.
|
18
|
-
#
|
19
|
-
# conference_invites - the initial Invites relation that need to be filtered
|
20
|
-
# query - query to filter conference_invites
|
21
|
-
# status - invite status to be used as a filter
|
22
|
-
def initialize(conference_invites, query = nil, status = nil)
|
23
|
-
@conference_invites = conference_invites
|
24
|
-
@query = query
|
25
|
-
@status = status
|
26
|
-
end
|
27
|
-
|
28
|
-
# List the conference_invites by the different filters.
|
29
|
-
def query
|
30
|
-
@conference_invites = filter_by_search(@conference_invites)
|
31
|
-
@conference_invites = filter_by_status(@conference_invites)
|
32
|
-
@conference_invites
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def filter_by_search(conference_invites)
|
38
|
-
return conference_invites if @query.blank?
|
39
|
-
|
40
|
-
conference_invites.joins(:user).where(
|
41
|
-
User.arel_table[:name].lower.matches("%#{@query}%").or(User.arel_table[:email].lower.matches("%#{@query}%"))
|
42
|
-
)
|
43
|
-
end
|
44
|
-
|
45
|
-
def filter_by_status(conference_invites)
|
46
|
-
case @status
|
47
|
-
when "accepted"
|
48
|
-
conference_invites.where.not(accepted_at: nil)
|
49
|
-
when "rejected"
|
50
|
-
conference_invites.where.not(rejected_at: nil)
|
51
|
-
when "sent"
|
52
|
-
conference_invites.where.not(sent_at: nil).where(accepted_at: nil, rejected_at: nil)
|
53
|
-
else
|
54
|
-
conference_invites
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
<div class="card card--full card--process">
|
2
|
-
<div class="row collapse card--process__row">
|
3
|
-
<div class="columns mediumlarge-8 large-6 card--process__column">
|
4
|
-
<div class="card__content">
|
5
|
-
<%= link_to conference_path(promoted_conference), class: "card__link" do %>
|
6
|
-
<h2 class="card__title"><%= translated_attribute promoted_conference.title %></h2>
|
7
|
-
<% end %>
|
8
|
-
<%= decidim_sanitize_editor html_truncate(translated_attribute(promoted_conference.short_description), length: 630, separator: "...") %>
|
9
|
-
<%= link_to conference_path(promoted_conference), class: "button small hollow card__button" do %>
|
10
|
-
<%= t("conferences.promoted_conference.more_info", scope: "layouts.decidim") %>
|
11
|
-
<% end %>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
<div class="columns mediumlarge-8 large-6 card--process__column">
|
15
|
-
<div class="card--full__image"
|
16
|
-
style="background-image:url('<%= promoted_conference.attached_uploader(:hero_image).path %>')">
|
17
|
-
<div class="card__content row collapse">
|
18
|
-
<div class="large-6 large-offset-6 columns">
|
19
|
-
<%= link_to conference_path(promoted_conference), class: "button expanded button--sc" do %>
|
20
|
-
<%= t(promoted_conference.cta_button_text_key, scope: "layouts.decidim.conferences.promoted_conference") %>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
</div>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<div class="row" data-equalizer>
|
2
|
-
<div class="column medium-6">
|
3
|
-
<div class="card p-m" data-equalizer-watch>
|
4
|
-
<p><%= t(".already_account") %></p>
|
5
|
-
<%= link_to t(".sign_in"), decidim.new_user_session_path, class: "" %>
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
<div class="column medium-6">
|
9
|
-
<div class="card p-m" data-equalizer-watch>
|
10
|
-
<p><%= t(".new_user") %></p>
|
11
|
-
<%= link_to t(".sign_up"), decidim.new_user_registration_path, class: "" %>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
</div>
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<section class="extended hero"
|
2
|
-
style="background-image:url('<%= current_participatory_space.attached_uploader(:banner_image).path %>');">
|
3
|
-
<div class="hero__container">
|
4
|
-
<div class="row">
|
5
|
-
<div class="columns large-10 text-left">
|
6
|
-
<h1 class="text-highlight hero-heading mb-none">
|
7
|
-
<%= translated_attribute(current_participatory_space.title) %>
|
8
|
-
</h1>
|
9
|
-
<h2 class="text-highlight">
|
10
|
-
<% if current_participatory_space.hashtag.present? %>
|
11
|
-
<span class="process-header__hashtag card__link">
|
12
|
-
<%= link_to "##{current_participatory_space.hashtag}", twitter_hashtag_url(current_participatory_space.hashtag), target: "_blank" %>
|
13
|
-
</span>
|
14
|
-
<% end %>
|
15
|
-
<%= translated_attribute(current_participatory_space.slogan) %>
|
16
|
-
</h2>
|
17
|
-
</div>
|
18
|
-
</div>
|
19
|
-
<div class="row">
|
20
|
-
<div class="row column medium-8 text-left mt-m">
|
21
|
-
<div class="column medium-6">
|
22
|
-
<div class="conference--date button hollow light expanded">
|
23
|
-
<%= participatory_space_helpers.render_date(current_participatory_space) %>
|
24
|
-
<%= current_participatory_space.location %>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<% if current_participatory_space.registrations_enabled? %>
|
28
|
-
<div class="column medium-3 end">
|
29
|
-
<%= link_to t(".register"), decidim_conferences.conference_registration_types_path(current_participatory_space), class:"button button--sc light expanded" %>
|
30
|
-
</div>
|
31
|
-
<% end %>
|
32
|
-
<% current_participatory_space.components.where(manifest_name: "meetings").each do |component_meeting| %>
|
33
|
-
<% if component_meeting.published? || component_meeting == self.try(:current_component) %>
|
34
|
-
<div class="column medium-3 end">
|
35
|
-
<%= link_to translated_attribute(component_meeting.name), decidim_conferences.conference_conference_program_path(current_participatory_space, id: component_meeting.id), class:"button button--sc light hollow expanded" %>
|
36
|
-
</div>
|
37
|
-
<% end %>
|
38
|
-
<% end %>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
</section>
|
@@ -1,46 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
components = current_participatory_space.components.published.where.not(manifest_name: "meetings")
|
3
|
-
meeting_components = current_participatory_space.components.published.where(manifest_name: "meetings")
|
4
|
-
%>
|
5
|
-
|
6
|
-
<%=
|
7
|
-
extended_navigation_bar(([
|
8
|
-
{
|
9
|
-
name: t(".conference_menu_item"),
|
10
|
-
url: decidim_conferences.conference_path(current_participatory_space),
|
11
|
-
active: is_active_link?(decidim_conferences.conference_path(current_participatory_space), :exclusive)
|
12
|
-
},
|
13
|
-
current_participatory_space.speakers.any? ? {
|
14
|
-
name: t(".conference_speaker_menu_item"),
|
15
|
-
url: decidim_conferences.conference_conference_speakers_path(current_participatory_space),
|
16
|
-
active: is_active_link?(decidim_conferences.conference_conference_speakers_path(current_participatory_space), :inclusive)
|
17
|
-
} : nil
|
18
|
-
] + meeting_components.map do |component|
|
19
|
-
Decidim::Meetings::Meeting.visible_for(current_user).any? ? {
|
20
|
-
name: translated_attribute(component.name),
|
21
|
-
url: decidim_conferences.conference_conference_program_path(current_participatory_space, id: component.id),
|
22
|
-
active: is_active_link?(decidim_conferences.conference_conference_program_path(current_participatory_space, id: component.id), :inclusive)
|
23
|
-
} : nil
|
24
|
-
end + [
|
25
|
-
current_participatory_space.partners.any? ? {
|
26
|
-
name: t(".conference_partners_menu_item"),
|
27
|
-
url: decidim_conferences.conference_path(current_participatory_space, anchor: "conference-partners"),
|
28
|
-
} : nil,
|
29
|
-
meeting_components.any? ? {
|
30
|
-
name: t(".venues"),
|
31
|
-
url: decidim_conferences.conference_path(current_participatory_space, anchor: "venues")
|
32
|
-
} : nil,
|
33
|
-
] + components.map do |component|
|
34
|
-
{
|
35
|
-
name: translated_attribute(component.name),
|
36
|
-
url: main_component_path(component),
|
37
|
-
active: is_active_link?(main_component_path(component), :inclusive)
|
38
|
-
}
|
39
|
-
end + [
|
40
|
-
current_participatory_space.attachments.any? || current_participatory_space.media_links.any? ? {
|
41
|
-
name: t(".media"),
|
42
|
-
url: decidim_conferences.conference_media_path(current_participatory_space),
|
43
|
-
active: is_active_link?(decidim_conferences.conference_media_path(current_participatory_space), :inclusive)
|
44
|
-
} : nil
|
45
|
-
]).compact)
|
46
|
-
%>
|
data/config/locales/he-IL.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
he:
|
Binary file
|
data/db/seeds/city.jpeg
DELETED
Binary file
|
data/db/seeds/city2.jpeg
DELETED
Binary file
|
data/db/seeds/homepage_image.jpg
DELETED
Binary file
|
data/db/seeds/logo.png
DELETED
Binary file
|