decidim-conferences 0.27.4 → 0.28.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/conferences/conference_cell.rb +9 -4
  3. data/app/cells/decidim/conferences/conference_dropdown_metadata_cell.rb +19 -0
  4. data/app/cells/decidim/conferences/conference_g_cell.rb +23 -0
  5. data/app/cells/decidim/conferences/conference_metadata_cell.rb +21 -0
  6. data/app/cells/decidim/conferences/conference_s_cell.rb +13 -0
  7. data/app/cells/decidim/conferences/conference_speaker/show.erb +44 -58
  8. data/app/cells/decidim/conferences/conference_speaker_cell.rb +3 -13
  9. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb +15 -14
  10. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_settings_form/show.erb +3 -0
  11. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_settings_form_cell.rb +19 -0
  12. data/app/cells/decidim/conferences/linked_participatory_spaces/show.erb +6 -8
  13. data/app/cells/decidim/conferences/linked_participatory_spaces_cell.rb +1 -10
  14. data/app/cells/decidim/conferences/media_link/show.erb +6 -8
  15. data/app/cells/decidim/conferences/partner/image.erb +3 -0
  16. data/app/cells/decidim/conferences/partner/show.erb +8 -8
  17. data/app/cells/decidim/conferences/partner/text.erb +1 -0
  18. data/app/cells/decidim/conferences/partner_cell.rb +4 -2
  19. data/app/cells/decidim/conferences/registration_type/join_conference.erb +15 -12
  20. data/app/cells/decidim/conferences/registration_type/registration_confirm.erb +12 -12
  21. data/app/cells/decidim/conferences/registration_type/show.erb +11 -14
  22. data/app/cells/decidim/conferences/registration_type_cell.rb +3 -3
  23. data/app/commands/decidim/conferences/admin/copy_conference.rb +1 -1
  24. data/app/commands/decidim/conferences/admin/create_conference.rb +2 -11
  25. data/app/commands/decidim/conferences/admin/create_conference_speaker.rb +2 -2
  26. data/app/commands/decidim/conferences/admin/create_media_link.rb +2 -2
  27. data/app/commands/decidim/conferences/admin/create_partner.rb +2 -2
  28. data/app/commands/decidim/conferences/admin/create_registration_type.rb +2 -2
  29. data/app/commands/decidim/conferences/admin/destroy_conference_speaker.rb +2 -2
  30. data/app/commands/decidim/conferences/admin/destroy_media_link.rb +1 -1
  31. data/app/commands/decidim/conferences/admin/destroy_partner.rb +3 -3
  32. data/app/commands/decidim/conferences/admin/destroy_registration_type.rb +1 -1
  33. data/app/commands/decidim/conferences/admin/invite_user_to_join_conference.rb +5 -5
  34. data/app/commands/decidim/conferences/admin/publish_conference.rb +9 -26
  35. data/app/commands/decidim/conferences/admin/send_conference_diplomas.rb +1 -1
  36. data/app/commands/decidim/conferences/admin/update_conference.rb +2 -11
  37. data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +1 -1
  38. data/app/commands/decidim/conferences/admin/update_media_link.rb +1 -1
  39. data/app/commands/decidim/conferences/admin/update_partner.rb +1 -1
  40. data/app/commands/decidim/conferences/admin/update_registration_type.rb +1 -1
  41. data/app/commands/decidim/conferences/decline_invitation.rb +1 -1
  42. data/app/commands/decidim/conferences/join_conference.rb +5 -5
  43. data/app/constraints/decidim/conferences/current_component.rb +2 -2
  44. data/app/constraints/decidim/conferences/current_conference.rb +2 -2
  45. data/app/controllers/concerns/decidim/conferences/admin/conference_context.rb +1 -1
  46. data/app/controllers/decidim/conferences/admin/concerns/conference_admin.rb +2 -2
  47. data/app/controllers/decidim/conferences/admin/conference_attachment_collections_controller.rb +6 -1
  48. data/app/controllers/decidim/conferences/admin/conference_attachments_controller.rb +5 -0
  49. data/app/controllers/decidim/conferences/admin/conference_invites_controller.rb +2 -1
  50. data/app/controllers/decidim/conferences/admin/conference_publications_controller.rb +10 -28
  51. data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +1 -1
  52. data/app/controllers/decidim/conferences/admin/conference_user_roles_controller.rb +8 -90
  53. data/app/controllers/decidim/conferences/admin/conferences_controller.rb +2 -0
  54. data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +1 -1
  55. data/app/controllers/decidim/conferences/admin/exports_controller.rb +1 -1
  56. data/app/controllers/decidim/conferences/admin/imports_controller.rb +1 -1
  57. data/app/controllers/decidim/conferences/admin/moderations/reports_controller.rb +1 -1
  58. data/app/controllers/decidim/conferences/admin/moderations_controller.rb +1 -1
  59. data/app/controllers/decidim/conferences/application_controller.rb +6 -0
  60. data/app/controllers/decidim/conferences/conference_registrations_controller.rb +3 -3
  61. data/app/controllers/decidim/conferences/conferences_controller.rb +10 -3
  62. data/app/events/decidim/conferences/conference_registration_notification_event.rb +3 -3
  63. data/app/events/decidim/conferences/conference_registrations_enabled_event.rb +1 -1
  64. data/app/events/decidim/conferences/conference_registrations_over_percentage_event.rb +1 -1
  65. data/app/events/decidim/conferences/conference_role_assigned_event.rb +6 -6
  66. data/app/forms/decidim/conferences/admin/conference_copy_form.rb +1 -1
  67. data/app/forms/decidim/conferences/admin/conference_form.rb +4 -15
  68. data/app/forms/decidim/conferences/admin/conference_user_role_form.rb +2 -17
  69. data/app/helpers/decidim/conferences/admin/conferences_helper.rb +0 -4
  70. data/app/helpers/decidim/conferences/conference_helper.rb +55 -0
  71. data/app/helpers/decidim/conferences/conference_program_helper.rb +1 -1
  72. data/app/helpers/decidim/conferences/media_attachments_helper.rb +0 -10
  73. data/app/helpers/decidim/conferences/partners_helper.rb +3 -1
  74. data/app/mailers/decidim/conferences/admin/invite_join_conference_mailer.rb +1 -1
  75. data/app/mailers/decidim/conferences/admin/send_conference_diploma_mailer.rb +1 -1
  76. data/app/mailers/decidim/conferences/conference_registration_mailer.rb +2 -2
  77. data/app/models/decidim/conference.rb +4 -4
  78. data/app/models/decidim/conference_user_role.rb +6 -34
  79. data/app/packs/entrypoints/decidim_conferences.js +5 -0
  80. data/app/packs/src/decidim/conferences/admin/conferences.js +6 -6
  81. data/app/packs/stylesheets/decidim/conferences/_conference.scss +102 -0
  82. data/app/packs/stylesheets/decidim/conferences/_media.scss +13 -0
  83. data/app/packs/stylesheets/decidim/conferences/_program.scss +43 -0
  84. data/app/packs/stylesheets/decidim/conferences/_registration.scss +39 -0
  85. data/app/packs/stylesheets/decidim/conferences/_speaker.scss +83 -0
  86. data/app/packs/stylesheets/decidim/conferences/conferences.scss +5 -3
  87. data/app/permissions/decidim/conferences/permissions.rb +2 -2
  88. data/app/presenters/decidim/conference_speaker_presenter.rb +1 -1
  89. data/app/presenters/decidim/conferences/admin_log/conference_invite_presenter.rb +2 -2
  90. data/app/presenters/decidim/conferences/admin_log/conference_presenter.rb +2 -2
  91. data/app/presenters/decidim/conferences/admin_log/conference_registration_presenter.rb +2 -2
  92. data/app/presenters/decidim/conferences/admin_log/conference_speaker_presenter.rb +2 -2
  93. data/app/presenters/decidim/conferences/admin_log/conference_user_role_presenter.rb +2 -2
  94. data/app/presenters/decidim/conferences/admin_log/media_link_presenter.rb +2 -2
  95. data/app/presenters/decidim/conferences/admin_log/partner_presenter.rb +2 -2
  96. data/app/presenters/decidim/conferences/admin_log/registration_type_presenter.rb +2 -2
  97. data/app/presenters/decidim/conferences/conference_stats_presenter.rb +3 -28
  98. data/app/queries/decidim/conferences/admin/admin_users.rb +4 -4
  99. data/app/queries/decidim/conferences/conferences_with_user_role.rb +2 -2
  100. data/app/queries/decidim/conferences/organization_conferences.rb +1 -1
  101. data/app/queries/decidim/conferences/organization_published_conferences.rb +1 -1
  102. data/app/views/decidim/conferences/admin/conference_copies/_form.html.erb +22 -28
  103. data/app/views/decidim/conferences/admin/conference_copies/new.html.erb +16 -5
  104. data/app/views/decidim/conferences/admin/conference_invites/_form.html.erb +17 -19
  105. data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +69 -74
  106. data/app/views/decidim/conferences/admin/conference_invites/new.html.erb +21 -17
  107. data/app/views/decidim/conferences/admin/conference_registrations/index.html.erb +45 -45
  108. data/app/views/decidim/conferences/admin/conference_speakers/_form.html.erb +42 -46
  109. data/app/views/decidim/conferences/admin/conference_speakers/edit.html.erb +16 -6
  110. data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +52 -55
  111. data/app/views/decidim/conferences/admin/conference_speakers/new.html.erb +16 -6
  112. data/app/views/decidim/conferences/admin/conference_user_roles/_form.html.erb +14 -18
  113. data/app/views/decidim/conferences/admin/conference_user_roles/edit.html.erb +16 -6
  114. data/app/views/decidim/conferences/admin/conference_user_roles/index.html.erb +53 -56
  115. data/app/views/decidim/conferences/admin/conference_user_roles/new.html.erb +16 -6
  116. data/app/views/decidim/conferences/admin/conferences/_form.html.erb +88 -88
  117. data/app/views/decidim/conferences/admin/conferences/edit.html.erb +26 -12
  118. data/app/views/decidim/conferences/admin/conferences/index.html.erb +55 -64
  119. data/app/views/decidim/conferences/admin/conferences/new.html.erb +16 -8
  120. data/app/views/decidim/conferences/admin/diplomas/_form.html.erb +18 -24
  121. data/app/views/decidim/conferences/admin/diplomas/edit.html.erb +19 -5
  122. data/app/views/decidim/conferences/admin/media_links/_form.html.erb +15 -19
  123. data/app/views/decidim/conferences/admin/media_links/edit.html.erb +16 -6
  124. data/app/views/decidim/conferences/admin/media_links/index.html.erb +37 -40
  125. data/app/views/decidim/conferences/admin/media_links/new.html.erb +16 -6
  126. data/app/views/decidim/conferences/admin/partners/_form.html.erb +18 -22
  127. data/app/views/decidim/conferences/admin/partners/edit.html.erb +16 -6
  128. data/app/views/decidim/conferences/admin/partners/index.html.erb +45 -48
  129. data/app/views/decidim/conferences/admin/partners/new.html.erb +16 -6
  130. data/app/views/decidim/conferences/admin/registration_types/_form.html.erb +23 -23
  131. data/app/views/decidim/conferences/admin/registration_types/edit.html.erb +16 -6
  132. data/app/views/decidim/conferences/admin/registration_types/index.html.erb +52 -56
  133. data/app/views/decidim/conferences/admin/registration_types/new.html.erb +16 -6
  134. data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma_user.html.erb +2 -2
  135. data/app/views/decidim/conferences/conference_program/_program_item.html.erb +21 -24
  136. data/app/views/decidim/conferences/conference_program/_program_meeting.html.erb +29 -63
  137. data/app/views/decidim/conferences/conference_program/show.html.erb +27 -39
  138. data/app/views/decidim/conferences/conference_speakers/index.html.erb +12 -6
  139. data/app/views/decidim/conferences/conferences/_conference_hero.html.erb +33 -0
  140. data/app/views/decidim/conferences/conferences/_partners.html.erb +10 -13
  141. data/app/views/decidim/conferences/conferences/index.html.erb +17 -7
  142. data/app/views/decidim/conferences/conferences/show.html.erb +84 -50
  143. data/app/views/decidim/conferences/media/index.html.erb +33 -19
  144. data/app/views/decidim/conferences/registration_types/index.html.erb +25 -17
  145. data/app/views/layouts/decidim/admin/conference.html.erb +12 -14
  146. data/app/views/layouts/decidim/admin/conferences.html.erb +13 -8
  147. data/app/views/layouts/decidim/conference.html.erb +7 -17
  148. data/app/views/layouts/decidim/conferences/_conference_nav_item.html.erb +6 -0
  149. data/app/views/layouts/decidim/conferences/application.html.erb +6 -0
  150. data/config/assets.rb +1 -1
  151. data/config/environment.rb +3 -0
  152. data/config/initializers/wicked_pdf.rb +1 -1
  153. data/config/locales/ar.yml +1 -68
  154. data/config/locales/bg.yml +0 -1
  155. data/config/locales/ca.yml +35 -55
  156. data/config/locales/cs.yml +40 -58
  157. data/config/locales/de.yml +37 -57
  158. data/config/locales/el.yml +11 -57
  159. data/config/locales/en.yml +36 -56
  160. data/config/locales/es-MX.yml +34 -54
  161. data/config/locales/es-PY.yml +34 -54
  162. data/config/locales/es.yml +33 -53
  163. data/config/locales/eu.yml +179 -198
  164. data/config/locales/fi-plain.yml +33 -53
  165. data/config/locales/fi.yml +39 -59
  166. data/config/locales/fr-CA.yml +33 -53
  167. data/config/locales/fr.yml +34 -54
  168. data/config/locales/ga-IE.yml +0 -17
  169. data/config/locales/gl.yml +1 -68
  170. data/config/locales/hu.yml +15 -57
  171. data/config/locales/id-ID.yml +1 -62
  172. data/config/locales/it.yml +2 -68
  173. data/config/locales/ja.yml +34 -55
  174. data/config/locales/lb.yml +1 -59
  175. data/config/locales/lt.yml +21 -54
  176. data/config/locales/lv.yml +1 -65
  177. data/config/locales/nl.yml +1 -68
  178. data/config/locales/no.yml +1 -68
  179. data/config/locales/pl.yml +1 -66
  180. data/config/locales/pt-BR.yml +1 -68
  181. data/config/locales/pt.yml +1 -68
  182. data/config/locales/ro-RO.yml +11 -56
  183. data/config/locales/sk.yml +1 -65
  184. data/config/locales/sl.yml +0 -3
  185. data/config/locales/sq-AL.yml +1 -0
  186. data/config/locales/sr-CS.yml +0 -5
  187. data/config/locales/sv.yml +7 -67
  188. data/config/locales/th-TH.yml +1 -0
  189. data/config/locales/tr-TR.yml +12 -66
  190. data/config/locales/zh-CN.yml +1 -65
  191. data/config/locales/zh-TW.yml +6 -53
  192. data/db/migrate/20221116084952_add_weight_to_conferences.rb +7 -0
  193. data/lib/decidim/api/conference_speaker_type.rb +1 -1
  194. data/lib/decidim/conferences/admin_engine.rb +14 -138
  195. data/lib/decidim/conferences/content_blocks/registry_manager.rb +21 -0
  196. data/lib/decidim/conferences/engine.rb +17 -15
  197. data/lib/decidim/conferences/menu.rb +182 -0
  198. data/lib/decidim/conferences/participatory_space.rb +6 -200
  199. data/lib/decidim/conferences/query_extensions.rb +2 -2
  200. data/lib/decidim/conferences/seeds.rb +153 -0
  201. data/lib/decidim/conferences/test/factories.rb +10 -9
  202. data/lib/decidim/conferences/version.rb +1 -1
  203. metadata +46 -46
  204. data/app/cells/decidim/conferences/conference_address/show.erb +0 -11
  205. data/app/cells/decidim/conferences/conference_address_cell.rb +0 -11
  206. data/app/cells/decidim/conferences/conference_m/footer.erb +0 -9
  207. data/app/cells/decidim/conferences/conference_m/tags.erb +0 -1
  208. data/app/cells/decidim/conferences/conference_m_cell.rb +0 -42
  209. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +0 -30
  210. data/app/cells/decidim/conferences/photo/show.erb +0 -26
  211. data/app/cells/decidim/conferences/photo_cell.rb +0 -41
  212. data/app/cells/decidim/conferences/photos_list/show.erb +0 -8
  213. data/app/cells/decidim/conferences/photos_list_cell.rb +0 -18
  214. data/app/commands/decidim/conferences/admin/create_conference_admin.rb +0 -114
  215. data/app/commands/decidim/conferences/admin/destroy_conference_admin.rb +0 -58
  216. data/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb +0 -22
  217. data/app/commands/decidim/conferences/admin/unpublish_conference.rb +0 -39
  218. data/app/commands/decidim/conferences/admin/update_conference_admin.rb +0 -53
  219. data/app/controllers/decidim/conferences/conference_widgets_controller.rb +0 -23
  220. data/app/queries/decidim/conferences/admin/conference_invites.rb +0 -60
  221. data/app/views/decidim/conferences/_order_by_conferences.html.erb +0 -3
  222. data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +0 -27
  223. data/app/views/decidim/conferences/media/_attachments.html.erb +0 -6
  224. data/app/views/decidim/conferences/shared/_conference_user_login.html.erb +0 -14
  225. data/app/views/layouts/decidim/_conference_hero.html.erb +0 -42
  226. data/app/views/layouts/decidim/_conferences_nav.html.erb +0 -46
  227. data/db/seeds/Exampledocument.pdf +0 -0
  228. data/db/seeds/city.jpeg +0 -0
  229. data/db/seeds/city2.jpeg +0 -0
  230. data/db/seeds/homepage_image.jpg +0 -0
  231. data/db/seeds/logo.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a01432f5ccaa1b68116b04f8d4fe375d9dfa44bb477c671879d5909570b0f33
4
- data.tar.gz: c944dd6ad73fbd43852d42a6915ac6bc3a317a221337f499ea4d7845ffd096af
3
+ metadata.gz: 2395d9c022041b144d6f60a1b35df8fe820e92825e15d5d3d89956e23ee0ff31
4
+ data.tar.gz: 04253f02be42de674d2408424a57057648a0421c9e05bbd37e7a6445471ab79b
5
5
  SHA512:
6
- metadata.gz: c132735ef0610002bcac09362ba9da092d65caa1638333c0d917f1115faceb91849f066cad21abe2d7fdcc2827d2873c80c22b1324cc63ed8521f32da8aaf80d
7
- data.tar.gz: 83f12daf6c55805d506571c1883a92a0b7b47ef806bdb6bc831a2038125be77f28fea0d2081a1628a6070b058d5a1b57aac80c8b133ad1315c01833b33cf505a
6
+ metadata.gz: e826b4934031606d36f828d622a275b478722f0deba9d796fc8b895703ce2da0b4b1641cf004cd68f0284ac213f07abca10f1ad0775ce78b939834a6f977224f
7
+ data.tar.gz: 85b315f660ddd937e0ceda29a16d6406857b14a1beafdb22e319f2ba4c7cf0b4b48f5a57fd3dd882da30a52eed94543d7b47d84d61652209fd7f66c4e03e8ea8
@@ -2,17 +2,22 @@
2
2
 
3
3
  module Decidim
4
4
  module Conferences
5
- # This cell renders the conference card for an instance of an Conference
6
- # the default size is the Medium Card (:m)
5
+ # This cell renders the conference card for an instance of a Conference
6
+ # the default size is the Grid Card (:g)
7
7
  class ConferenceCell < Decidim::ViewModel
8
8
  def show
9
- cell card_size, model
9
+ cell card_size, model, options
10
10
  end
11
11
 
12
12
  private
13
13
 
14
14
  def card_size
15
- "decidim/conferences/conference_m"
15
+ case @options[:size]
16
+ when :s
17
+ "decidim/conferences/conference_s"
18
+ else
19
+ "decidim/conferences/conference_g"
20
+ end
16
21
  end
17
22
  end
18
23
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ class ConferenceDropdownMetadataCell < Decidim::ParticipatorySpaceDropdownMetadataCell
6
+ include ConferenceHelper
7
+ include Decidim::ComponentPathHelper
8
+ include ActiveLinkTo
9
+
10
+ def decidim_conferences
11
+ Decidim::Conferences::Engine.routes.url_helpers
12
+ end
13
+
14
+ private
15
+
16
+ def nav_items_method = :conference_nav_items
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ # This cell renders the Grid (:g) conference card
6
+ # for a given instance of a Conference
7
+ class ConferenceGCell < Decidim::CardGCell
8
+ private
9
+
10
+ def resource_path
11
+ Decidim::Conferences::Engine.routes.url_helpers.conference_path(model)
12
+ end
13
+
14
+ def resource_image_path
15
+ model.attached_uploader(:hero_image).path
16
+ end
17
+
18
+ def metadata_cell
19
+ "decidim/conferences/conference_metadata"
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cell/partial"
4
+
5
+ module Decidim
6
+ module Conferences
7
+ class ConferenceMetadataCell < Decidim::CardMetadataCell
8
+ def items
9
+ [dates_item].compact
10
+ end
11
+
12
+ def start_date
13
+ model.start_date.to_time
14
+ end
15
+
16
+ def end_date
17
+ model.end_date.to_time
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ # This cell renders the Search (:s) conference card
6
+ # for a given instance of a Conference
7
+ class ConferenceSCell < Decidim::CardSCell
8
+ def metadata_cell
9
+ "decidim/conferences/conference_metadata"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,87 +1,73 @@
1
- <div class="column conference-speaker js-conference">
2
- <div class="speaker-img-wrapper">
3
- <div class="speaker-img">
4
- <%= image_tag avatar_path, alt: "speaker-image" %>
5
- </div>
1
+ <button class="conference__speaker__item" data-conference-speaker data-dialog-open="<%= model.id %>">
2
+ <div class="conference__speaker__item-image">
3
+ <%= image_tag avatar_path, alt: nickname || "" %>
6
4
  </div>
7
- <div class="speaker-data">
8
- <div class="data-name"><%= name %></div>
9
- <% if position.presence %>
10
- <div class="data-role">
11
- <%= position %>
12
- </div>
13
- <% end %>
14
- <% if affiliation.presence %>
15
- <div class="data-extra">
16
- <%= affiliation %>
17
- </div>
18
- <% end %>
19
- <div class="data-extra">
20
- <% if nickname.present? %>
21
- <%= link_to nickname, profile_path, class: "card-link" %>
22
- <% else %>
23
- <div class="author__nickname">&nbsp;</div>
5
+ <div>
6
+ <h2 class="h5 conference__speaker__item-name"><%= name %></h2>
7
+ <div class="conference__speaker__item-text">
8
+ <% if position.presence %>
9
+ <span><%= position %></span>
10
+ <% end %>
11
+ <% if affiliation.presence %>
12
+ <span><%= affiliation %></span>
24
13
  <% end %>
25
- <div><u><%= t(".more_info") %></u></div>
26
14
  </div>
27
15
  </div>
28
- <div class="speaker-bio js-bio">
29
- <div class="row">
30
- <div class="column medium-6">
31
- <div class="speaker-img-wrapper">
32
- <div class="speaker-img">
33
- <%= image_tag avatar_path, alt: "speaker-image" %>
34
- </div>
35
- </div>
36
- <div class="speaker-data">
37
- <div class="data-name"><%= name %></div>
16
+ </button>
17
+
18
+ <%= decidim_modal id: model.id, class: "conference__speaker__modal" do %>
19
+ <h3 class="conference__speaker__modal-title">
20
+ <%= icon "user-voice-line", class: "w-6 h-6 text-gray fill-current" %>
21
+ <span><%= t("decidim.conferences.conference_speakers.index.speakers", count: 1) %></span>
22
+ </h3>
23
+ <div class="conference__speaker__modal-bio-container">
24
+ <div class="conference__speaker__modal-img">
25
+ <%= image_tag avatar_path, alt: "speaker-image" %>
26
+ </div>
27
+ <div class="conference__speaker__modal-bio">
28
+ <div>
29
+ <h4 class="conference__speaker__modal-bio-name" id="dialog-title-<%= model.id %>"><%= name %></h4>
30
+ <div class="conference__speaker__modal-bio-roles">
38
31
  <% if position.presence %>
39
- <div class="data-role"><%= position %></div>
32
+ <span><%= position %></span>
40
33
  <% end %>
41
34
  <% if affiliation.presence %>
42
- <div class="data-extra">
43
- <%= affiliation %>
44
- </div>
35
+ <span><%= affiliation %></span>
36
+ <% end %>
37
+ </div>
38
+ <div class="conference__speaker__modal-bio-networks">
39
+ <% if nickname.present? %>
40
+ <%= link_to nickname, profile_path, class: "card-link" %>
45
41
  <% end %>
46
- <div class="data-extra">
47
- <% if nickname.present? %>
48
- <%= link_to nickname, profile_path, class: "card-link" %>
49
- <% else %>
50
- <div class="author__nickname">&nbsp;</div>
51
- <% end %>
52
- <div><u><%= t(".more_info") %></u></div>
53
- </div>
54
42
  <% if personal_url.presence %>
55
43
  <div>
44
+ <%= icon "link", class: "w-3.5 h-3.5 text-gray fill-current" %>
56
45
  <%= personal_url %>
57
46
  </div>
58
47
  <% end %>
59
48
  <% if twitter_handle.presence %>
60
49
  <div>
50
+ <%= icon "twitter-x-line", class: "w-3.5 h-3.5 text-gray fill-current" %>
61
51
  <%= twitter_handle %>
62
52
  </div>
63
53
  <% end %>
64
54
  </div>
65
55
  </div>
66
56
  <% if short_bio.presence %>
67
- <div class="column medium-6 bio-extended">
57
+ <div class="conference__speaker__modal-bio-description" id="dialog-desc-<%= model.id %>">
68
58
  <%= short_bio %>
69
59
  </div>
70
60
  <% end %>
71
- </div>
72
- <% if meetings.present? %>
73
- <hr class="reset mt-none mb-s">
74
- <div class="row">
75
- <div class="column medium-12">
76
- <div class="bio-acts"><%= t("conferences.conference_speaker.show.speaking_at", scope: "decidim") %></div>
77
-
78
- <ul class="list-reset">
61
+ <% if meetings.present? %>
62
+ <div>
63
+ <div class="conference__speaker__modal-bio-meetings-title"><%= t("conferences.conference_speaker.show.speaking_at", scope: "decidim") %></div>
64
+ <ul class="conference__speaker__modal-bio-meetings">
79
65
  <% meetings.each do |meeting| %>
80
- <%= meeting_title meeting %> <br>
66
+ <%= meeting_title meeting %>
81
67
  <% end %>
82
68
  </ul>
83
69
  </div>
84
- </div>
85
- <% end %>
70
+ <% end %>
71
+ </div>
86
72
  </div>
87
- </div>
73
+ <% end %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Decidim
4
4
  module Conferences
5
- # This cell renders the card for an instance of an Conference Speaker
5
+ # This cell renders the card for an instance of a Conference Speaker
6
6
  class ConferenceSpeakerCell < Decidim::AuthorCell
7
7
  include Decidim::Meetings::MeetingCellsHelper
8
8
  include Cell::ViewModel::Partial
@@ -12,17 +12,7 @@ module Decidim
12
12
  property :profile_path
13
13
 
14
14
  def show
15
- render
16
- end
17
-
18
- def speakers_list
19
- cell(
20
- "decidim/collapsible_list",
21
- presenters_for_speakers(list),
22
- cell_name: "decidim/author",
23
- cell_options: options.merge(has_actions: false),
24
- size: size
25
- )
15
+ render :show
26
16
  end
27
17
 
28
18
  private
@@ -66,7 +56,7 @@ module Decidim
66
56
  def twitter_handle
67
57
  return unless model.twitter_handle.presence
68
58
 
69
- link_to t(".go_to_twitter"), "https://twitter.com/#{model.twitter_handle}", target: "_blank", rel: "noopener"
59
+ link_to "@#{model.twitter_handle}", "https://twitter.com/#{model.twitter_handle}", target: "_blank", rel: "noopener"
70
60
  end
71
61
 
72
62
  def personal_url
@@ -3,32 +3,33 @@
3
3
  module Decidim
4
4
  module Conferences
5
5
  module ContentBlocks
6
- class HighlightedConferencesCell < Decidim::ViewModel
6
+ class HighlightedConferencesCell < Decidim::ContentBlocks::HighlightedParticipatorySpacesCell
7
7
  delegate :current_user, to: :controller
8
8
 
9
- def show
10
- render if highlighted_conferences.any?
11
- end
12
-
13
- def highlighted_conferences
14
- OrganizationPrioritizedConferences.new(current_organization, current_user)
9
+ def highlighted_spaces
10
+ @highlighted_spaces ||= OrganizationPrioritizedConferences
11
+ .new(current_organization, current_user)
12
+ .query
13
+ .with_attached_hero_image
14
+ .includes([:organization])
15
15
  end
16
16
 
17
17
  def i18n_scope
18
18
  "decidim.conferences.pages.home.highlighted_conferences"
19
19
  end
20
20
 
21
- def decidim_conferences
22
- Decidim::Conferences::Engine.routes.url_helpers
21
+ def all_path
22
+ Decidim::Conferences::Engine.routes.url_helpers.conferences_path
23
+ end
24
+
25
+ def max_results
26
+ model.settings.max_results
23
27
  end
24
28
 
25
29
  private
26
30
 
27
- def cache_hash
28
- hash = []
29
- hash.push(I18n.locale)
30
- hash.push(highlighted_conferences.map(&:cache_key_with_version))
31
- hash.join(Decidim.cache_key_separator)
31
+ def block_id
32
+ "highlighted-conferences"
32
33
  end
33
34
  end
34
35
  end
@@ -0,0 +1,3 @@
1
+ <% form.fields_for :settings, form.object.settings do |settings_fields| %>
2
+ <%= settings_fields.select :max_results, [6, 9, 12], prompt: "", label: %>
3
+ <% end %>
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ module ContentBlocks
6
+ class HighlightedConferencesSettingsFormCell < Decidim::ViewModel
7
+ alias form model
8
+
9
+ def content_block
10
+ options[:content_block]
11
+ end
12
+
13
+ def label
14
+ I18n.t("decidim.conferences.admin.content_blocks.highlighted_conferences.max_results")
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,10 +1,8 @@
1
1
  <% conference_spaces.each do |block_space| %>
2
- <div class="section">
3
- <h4 class="section-heading"><%= t("conferences.show.related_#{title(block_space)}", scope: "decidim") %></h4>
4
- <div class="row small-up-1 medium-up-2 card-grid">
5
- <% block_space.each do |space| %>
6
- <%= card_for space %>
7
- <% end %>
8
- </div>
9
- </div>
2
+ <section class="content-block">
3
+ <h2 class="h2 decorator"><%= t("conferences.show.related_#{title(block_space)}", scope: "decidim") %></h2>
4
+ <% block_space.each do |space| %>
5
+ <%= card_for space %>
6
+ <% end %>
7
+ </section>
10
8
  <% end %>
@@ -15,7 +15,7 @@ module Decidim
15
15
  private
16
16
 
17
17
  def conference_spaces
18
- [conference_participatory_processes, conference_assemblies, conference_consultations].compact
18
+ [conference_participatory_processes, conference_assemblies].compact
19
19
  end
20
20
 
21
21
  def conference_participatory_processes
@@ -36,15 +36,6 @@ module Decidim
36
36
  assemblies
37
37
  end
38
38
 
39
- def conference_consultations
40
- return unless Decidim.participatory_space_manifests.map(&:name).include?(:consultations)
41
-
42
- consultations = model.linked_participatory_space_resources(:consultations, "included_consultations")
43
- return unless consultations.any?
44
-
45
- consultations
46
- end
47
-
48
39
  def title(block_space)
49
40
  block_space.first.class.name.demodulize.tableize
50
41
  end
@@ -1,9 +1,7 @@
1
- <li>
2
- <%= icon "external-link", role: "img", "aria-hidden": true %>
3
- <div>
4
- <%= link_to model.link, target: "_blank" do %>
5
- <strong><%= decidim_html_escape translated_attribute(model.title) %> </strong>
6
- <% end %>
7
- <div class="text-small"><%= l(model.date, format: :decidim_short_with_month_name_short) %> · <%= model.link %></div>
1
+ <div class="card__list-content">
2
+ <%= link_to decidim_html_escape(translated_attribute(model.title)), model.link, rel: "noopener noreferrer", target: "_blank", class: "card__list-title" %>
3
+ <div class="card__list-metadata">
4
+ <span><%= icon "calendar-line" %><%= l(model.date, format: :decidim_short_with_month_name_short) %></span>
5
+ <span><%= icon "link-m" %><%= model.link %></span>
8
6
  </div>
9
- </li>
7
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="conference__grid-item-img">
2
+ <%= image_tag model.attached_uploader(:logo).path(variant: :medium), alt: "logo" %>
3
+ </div>
@@ -1,11 +1,11 @@
1
- <% if model.link.presence %>
2
- <%= link_to model.link, class: "partner-box column collapse text-center mb-m", target: "_blank" do %>
3
- <%= logo %>
4
- <%= name %>
1
+ <% if model.link.present? %>
2
+ <%= link_to model.link, target: "_blank", class: "conference__grid-item", data: { "external-link": "false" } do %>
3
+ <%= render :image %>
4
+ <%= render :text %>
5
5
  <% end %>
6
6
  <% else %>
7
- <div class="partner-box column collapse text-center mb-m">
8
- <%= logo %>
9
- <%= name %>
10
- </div>
7
+ <%= content_tag :div, nil, class: "conference__grid-item" do %>
8
+ <%= render :image %>
9
+ <%= render :text %>
10
+ <% end %>
11
11
  <% end %>
@@ -0,0 +1 @@
1
+ <h3 class="h5 conference__grid-item-text"><%= model.name %></h3>
@@ -10,16 +10,18 @@ module Decidim
10
10
 
11
11
  private
12
12
 
13
+ # deprecated
13
14
  def name
14
15
  return unless model.name.presence
15
16
 
16
- "<div class='text-medium'> #{model.name} </div>"
17
+ "<div> #{model.name} </div>"
17
18
  end
18
19
 
20
+ # deprecated
19
21
  def logo
20
22
  return unless model.logo.attached?
21
23
 
22
- "<div class='card p-m flex--cc'> #{image_tag model.attached_uploader(:logo).path(variant: :medium), alt: "logo"} </div>"
24
+ "<div class='card p-m'> #{image_tag model.attached_uploader(:logo).path(variant: :medium), alt: "logo"} </div>"
23
25
  end
24
26
  end
25
27
  end
@@ -2,23 +2,26 @@
2
2
  <% if conference.has_registration_for_user_and_registration_type?(current_user, model) %>
3
3
  <% if allowed? %>
4
4
  <%= button_to conference_registration_type_conference_registration_path(conference, model),
5
- method: :delete,
6
- class: "#{button_classes} secondary light",
7
- style: "margin-bottom: 0;",
8
- data: { disable: true } do %>
9
- <%= icon("check", class: "icon--small") %>
10
- <%= t("going", scope: "decidim.conferences.conference.show") %>
5
+ method: :delete,
6
+ class: "#{button_classes} bg-success text-white border-transparent conference__registration-button",
7
+ data: { disable: true } do %>
8
+ <span><%= t("going", scope: "decidim.conferences.conference.show") %></span>
9
+ <%= icon "checkbox-circle-line", class: "w-3.5 h-3.5 fill-current flex-none" %>
11
10
  <% end %>
12
11
  <% end %>
13
12
  <% else %>
14
- <%= render :registration_confirm %>
15
13
  <% if allowed? %>
16
- <%= button_to i18n_join_text, "#",
17
- class: button_classes,
14
+ <%= button_tag(
15
+ type: "button",
16
+ class: "#{button_classes} conference__registration-button",
18
17
  disabled: !conference.has_available_slots? || conference.has_registration_for?(current_user),
19
- style: "margin-bottom: 0;",
20
- onclick: "event.preventDefault()",
21
- data: { open: current_user.present? ? "conference-registration-confirm-#{model.id}" : "loginModal" } %>
18
+ data: { dialog_open: current_user.present? ? "conference-registration-confirm-#{model.id}" : "loginModal" }
19
+ ) do %>
20
+ <span><%= i18n_join_text %></span>
21
+ <%= icon "ticket-line", class: "w-3.5 h-3.5 fill-current flex-none" %>
22
+ <% end %>
23
+
24
+ <%= render :registration_confirm %>
22
25
  <% end %>
23
26
  <% end %>
24
27
  <% end %>
@@ -1,15 +1,15 @@
1
- <div class="reveal" data-reveal id="conference-registration-confirm-<%= model.id %>">
2
- <div class="row">
3
- <div class="columns medium-10 medium-offset-1 help-text">
4
- <%= decidim_sanitize_editor translated_attribute(conference.registration_terms) %>
5
- </div>
1
+ <%= decidim_modal id: "conference-registration-confirm-#{model.id}", class: "conference__registration-modal" do %>
2
+ <div class="flex items-center gap-2">
3
+ <%= icon "ticket-line", class: "w-6 h-6 text-gray fill-current flex-none" %>
4
+ <div class="font-semibold text-black text-2xl" id="dialog-title-conference-registration-confirm-<%= model.id %>"><%= I18n.t("registration", scope: "decidim.conferences.conference.show") %></div>
6
5
  </div>
7
- <div class="row">
8
- <div class="columns medium-8 medium-offset-2">
9
- <%= button_to t("confirm", scope: "decidim.conferences.conference.registration_confirm"), conference_registration_type_conference_registration_path(conference, model), class: "button expanded", data: { disable: true } %>
10
- </div>
6
+
7
+ <div id="dialog-desc-conference-registration-confirm-<%= model.id %>" class="text-gray-2 text-xl mt-9">
8
+ <%= decidim_sanitize_editor translated_attribute(conference.registration_terms) %>
11
9
  </div>
12
- <div class="text-center">
13
- <button class="link" data-close><%= t("cancel", scope: "decidim.conferences.conference.registration_confirm") %></button>
10
+
11
+ <div class="flex justify-between mt-16">
12
+ <button class="button button__lg button__transparent-secondary" data-dialog-close="<%= model.id %>"><%= t("cancel", scope: "decidim.conferences.conference.registration_confirm") %></button>
13
+ <%= button_to t("confirm", scope: "decidim.conferences.conference.registration_confirm"), conference_registration_type_conference_registration_path(conference, model), class: "button button__lg button__secondary" %>
14
14
  </div>
15
- </div>
15
+ <% end %>
@@ -1,16 +1,13 @@
1
- <div class="conference-registration card__block" id="registration-type-<%= model.id %>">
2
- <div class="row flex--cc">
3
- <div class="columns medium-8">
4
- <div class="registration__text">
5
- <strong><%= title %></strong>
6
- <span> <%= description %></span>
7
- </div>
8
- </div>
9
- <div class="columns medium-4">
10
- <div class="registration__buttons">
11
- <button type="button" class="small-5 small"><strong><%= price %></strong></button>
12
- <%= render :join_conference %>
13
- </div>
14
- </div>
1
+ <div id="registration-type-<%= model.id %>" class="conference__registration" data-conference-registration>
2
+ <div class="conference__registration-text">
3
+ <h2 class="h5 text-secondary"><%= title %></h2>
4
+ <span>
5
+ <%= icon "information-line", class: "text-gray fill-current" %>
6
+ <span class="truncate" title="<%= description %>"><%= description %></span>
7
+ </span>
8
+ </div>
9
+ <div class="conference__registration-button-container">
10
+ <span><%= price %></span>
11
+ <%= render :join_conference %>
15
12
  </div>
16
13
  </div>
@@ -22,11 +22,11 @@ module Decidim
22
22
  end
23
23
 
24
24
  def description
25
- decidim_sanitize_editor translated_attribute model.description
25
+ strip_tags translated_attribute model.description
26
26
  end
27
27
 
28
28
  def price
29
- return I18n.t("free", scope: "decidim.conferences.conference.show") if model.price.blank?
29
+ return if model.price.blank? || model.price.zero?
30
30
 
31
31
  number_to_currency(model.price, locale: I18n.locale, unit: Decidim.currency_unit)
32
32
  end
@@ -36,7 +36,7 @@ module Decidim
36
36
  end
37
37
 
38
38
  def button_classes
39
- "button button--sc small"
39
+ "button button__sm button__transparent-secondary"
40
40
  end
41
41
 
42
42
  def conference
@@ -18,7 +18,7 @@ module Decidim
18
18
  # Executes the command. Broadcasts these events:
19
19
  #
20
20
  # - :ok when everything is valid.
21
- # - :invalid if the form wasn't valid and we couldn't proceed.
21
+ # - :invalid if the form was not valid and we could not proceed.
22
22
  #
23
23
  # Returns nothing.
24
24
  def call