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
@@ -6,20 +6,20 @@ $(() => {
6
6
  if ($form.length > 0) {
7
7
  $conferenceScopeEnabled.on("change", (event) => {
8
8
  const checked = event.target.checked;
9
- window.theDataPicker.enabled($conferenceScopeId, checked);
9
+ $conferenceScopeId.attr("disabled", !checked);
10
10
  })
11
- window.theDataPicker.enabled($conferenceScopeId, $conferenceScopeEnabled.prop("checked"));
11
+ $conferenceScopeId.attr("disabled", !$conferenceScopeEnabled.prop("checked"));
12
12
 
13
13
  const $registrationsEnabled = $form.find("#conference_registrations_enabled");
14
14
  const $availableSlots = $form.find("#conference_available_slots");
15
+ const $registrationTerms = $form.find("#conference_registrations_terms");
15
16
  const toggleDisabledFields = () => {
16
17
  const enabled = $registrationsEnabled.prop("checked");
17
18
  $availableSlots.attr("disabled", !enabled);
18
19
 
19
- $form.find("#conference_registrations_terms .editor-container").each((idx, node) => {
20
- const quill = Quill.find(node);
21
- quill.enable(enabled);
22
- })
20
+ $registrationTerms[0].querySelectorAll(".editor-container .ProseMirror").forEach((node) => {
21
+ node.editor.setOptions({ editable: enabled });
22
+ });
23
23
  };
24
24
  $registrationsEnabled.on("change", toggleDisabledFields);
25
25
  toggleDisabledFields();
@@ -0,0 +1,102 @@
1
+ .conference {
2
+ &__hero {
3
+ @apply backdrop-brightness-[30%];
4
+
5
+ &-text {
6
+ @apply container text-center text-white space-y-6 md:px-16 pt-10 pb-14 md:[&_a_+_a]:ml-6;
7
+ }
8
+
9
+ &-slogan {
10
+ @apply text-lg font-semibold;
11
+ }
12
+
13
+ &-location {
14
+ @apply text-lg;
15
+ }
16
+ }
17
+
18
+ &__content-block {
19
+ @apply grid grid-cols-9 gap-x-4 place-items-start space-y-0;
20
+
21
+ > :nth-child(3n + 1),
22
+ > :nth-child(3n + 2) {
23
+ @apply col-span-9 lg:col-span-6;
24
+ }
25
+
26
+ > :nth-child(3n) {
27
+ @apply col-span-9 lg:col-span-3 row-span-2 lg:order-2 justify-self-center flex flex-col gap-2 max-w-full overflow-x-auto;
28
+ }
29
+
30
+ > :nth-child(3n + 2) {
31
+ @apply lg:order-3;
32
+ }
33
+ }
34
+
35
+ &__nav {
36
+ @apply divide-y divide-white [&>li]:py-3.5 first:[&>li]:pt-0 last:[&>li]:pb-0;
37
+
38
+ &-container {
39
+ @apply ml-0 md:ml-6 bg-primary p-3 md:p-6 rounded w-full md:w-auto self-stretch;
40
+
41
+ [id*="dropdown-menu"] {
42
+ @apply mx-0;
43
+ }
44
+
45
+ [data-target*="dropdown"] {
46
+ @apply p-0 [&>span]:text-white [&>svg]:text-white;
47
+ }
48
+ }
49
+
50
+ &-item {
51
+ @apply flex items-center gap-1 text-white font-semibold hover:underline [&>svg]:fill-current;
52
+ }
53
+ }
54
+
55
+ &__grid {
56
+ @apply grid grid-cols-2 md:grid-cols-4 auto-rows-fr gap-3 md:gap-x-6 gap-y-10;
57
+
58
+ &-item {
59
+ @apply space-y-4;
60
+
61
+ &-img {
62
+ @apply border-4 border-background rounded aspect-[4/3] p-1;
63
+
64
+ img {
65
+ @apply w-full h-full object-contain;
66
+ }
67
+ }
68
+
69
+ &-text {
70
+ @apply text-secondary;
71
+ }
72
+ }
73
+ }
74
+
75
+ &__map {
76
+ @apply flex flex-col-reverse md:flex-row items-start gap-4 only:[&>*]:grow first:[&>*]:min-w-[40%];
77
+
78
+ & > :last-child:not(:only-child) {
79
+ @apply aspect-[4/3] w-full rounded overflow-hidden;
80
+ }
81
+
82
+ &-address {
83
+ @apply border-4 border-background rounded p-4 mt-4 first:mt-0;
84
+ }
85
+ }
86
+
87
+ &__box {
88
+ @apply flex flex-col gap-4 md:flex-row md:items-end justify-between border-2 border-background rounded p-6 first:[&>*]:space-y-4;
89
+
90
+ &-icon {
91
+ @apply w-8 h-8 text-tertiary fill-current;
92
+ }
93
+
94
+ &-title {
95
+ @apply text-2xl font-semibold;
96
+ }
97
+
98
+ &-description {
99
+ @apply text-lg text-gray-2;
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,13 @@
1
+ .conference__media {
2
+ &-section {
3
+ @apply mt-16 last:mb-16 md:last:mb-36 xl:max-w-[75%] space-y-10;
4
+
5
+ p {
6
+ @apply mt-4 text-gray-2 text-md;
7
+ }
8
+ }
9
+
10
+ &-links {
11
+ @apply mt-10 space-y-8;
12
+ }
13
+ }
@@ -0,0 +1,43 @@
1
+ .conference__program {
2
+ @apply mb-16 md:mb-36;
3
+
4
+ &-selector {
5
+ @apply grid grid-cols-2 md:flex gap-4 md:gap-1 justify-end [&~*]:mt-6 [&_button]:w-full;
6
+ }
7
+
8
+ &-item {
9
+ @apply grid grid-cols-12 gap-2 items-start first:[&>*]:col-span-12 md:first:[&>*]:col-span-2 last:[&>*]:col-span-12 md:last:[&>*]:col-span-10;
10
+ }
11
+
12
+ &-time {
13
+ @apply h-10 grid place-items-center border-b-2 border-tertiary text-center text-xl text-gray-2 font-semibold;
14
+ }
15
+
16
+ &-category {
17
+ @apply h-10 w-full bg-background border-b-2 border-gray-3 text-center text-md text-gray-2 font-normal truncate;
18
+
19
+ &-container {
20
+ @apply flex gap-2 [&>*]:grow [&>*]:min-w-0;
21
+ }
22
+
23
+ &-content {
24
+ @apply [&>a]:block [&>a]:py-4;
25
+ }
26
+
27
+ &[aria-expanded="true"] {
28
+ @apply bg-background-4 border-secondary text-secondary font-semibold;
29
+ }
30
+ }
31
+
32
+ &-attribute {
33
+ @apply flex items-center gap-2 last:[&>*]:flex last:[&>*]:flex-wrap last:[&>*]:items-center last:[&>*]:gap-2 md:last:[&>*]:gap-6;
34
+
35
+ &-container {
36
+ @apply py-6 border-t border-background space-y-6;
37
+ }
38
+
39
+ &-url {
40
+ @apply underline text-sm text-secondary;
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,39 @@
1
+ .conference__registration {
2
+ @apply flex flex-col md:flex-row items-start md:items-center justify-between gap-2.5 rounded-l px-4 border-l-4 border-background;
3
+
4
+ &-container {
5
+ @apply w-full lg:w-4/5 xl:w-3/5 space-y-10 mb-16 md:mb-36;
6
+
7
+ &-title {
8
+ @apply py-10 text-gray-2 uppercase font-semibold;
9
+ }
10
+ }
11
+
12
+ &-text {
13
+ @apply text-sm text-gray-2 space-y-2.5 md:space-y-4 w-full lg:w-1/5 xl:w-2/5;
14
+
15
+ & > *:last-child {
16
+ @apply inline-flex items-center gap-1.5 first:[&>*]:flex-none max-w-full;
17
+ }
18
+ }
19
+
20
+ &-button {
21
+ @apply truncate md:w-32;
22
+
23
+ &-container {
24
+ @apply w-full md:w-72 flex items-center justify-between md:justify-end gap-4 md:gap-8 px-3 md:px-6 py-3 bg-background rounded;
25
+
26
+ & > *:first-child {
27
+ @apply text-xl font-semibold whitespace-nowrap;
28
+ }
29
+ }
30
+ }
31
+
32
+ &:hover &-button:not([disabled]) {
33
+ @apply bg-secondary text-white border-transparent;
34
+ }
35
+
36
+ &-modal {
37
+ @apply p-6;
38
+ }
39
+ }
@@ -0,0 +1,83 @@
1
+ .conference__speaker {
2
+ &__container {
3
+ @apply grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-x-4 md:gap-x-8 lg:gap-x-16 gap-y-10 mb-16 md:mb-36;
4
+ }
5
+
6
+ &__item {
7
+ @apply flex flex-col gap-4 hover:cursor-pointer text-left focus-visible:outline-none;
8
+
9
+ &-image {
10
+ @apply ring-4 ring-background overflow-hidden rounded aspect-square;
11
+
12
+ img {
13
+ @apply w-full h-full object-cover;
14
+ }
15
+ }
16
+
17
+ &-name {
18
+ @apply text-secondary;
19
+ }
20
+
21
+ &-text {
22
+ @apply mt-2 flex flex-col text-sm text-gray-2;
23
+ }
24
+
25
+ &:hover &-image,
26
+ &:focus &-image {
27
+ @apply ring-tertiary;
28
+ }
29
+
30
+ &:hover &-name,
31
+ &:focus &-name {
32
+ @apply underline;
33
+ }
34
+ }
35
+
36
+ &__modal {
37
+ @apply md:pr-12 md:pb-12;
38
+
39
+ &-title {
40
+ @apply flex gap-2 items-center text-2xl text-black font-semibold;
41
+ }
42
+
43
+ &-img {
44
+ @apply w-1/4 flex-none rounded overflow-hidden aspect-square;
45
+
46
+ img {
47
+ @apply w-full h-full object-cover;
48
+ }
49
+ }
50
+
51
+ &-bio {
52
+ @apply w-full divide-y divide-gray-3 [&>*]:py-4 first:[&>*]:pt-0 last:[&>*]:pb-0;
53
+
54
+ &-container {
55
+ @apply flex flex-col md:flex-row gap-4 md:gap-10 items-start mt-10 w-full;
56
+ }
57
+
58
+ &-name {
59
+ @apply text-black text-2xl font-semibold;
60
+ }
61
+
62
+ &-roles {
63
+ @apply mt-4 text-gray-2 text-sm after:[&_span]:content-['_/_'] last:after:[&_span]:content-[''];
64
+ }
65
+
66
+ &-networks {
67
+ @apply flex flex-wrap mt-4 flex gap-2 md:gap-6 text-secondary text-sm [&>*]:flex [&>*]:items-center [&>*]:gap-1.5;
68
+ }
69
+
70
+ &-description {
71
+ @apply overflow-y-auto max-h-[50vh] text-gray-2 text-md;
72
+ }
73
+
74
+ &-meetings {
75
+ @apply overflow-y-auto max-h-[20vh] text-secondary text-md flex flex-col gap-2;
76
+
77
+ &-title {
78
+ @apply text-gray-2 font-bold mb-4;
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
@@ -1,3 +1,5 @@
1
- .conference--date{
2
- cursor: default;
3
- }
1
+ @import "stylesheets/decidim/conferences/conference.scss";
2
+ @import "stylesheets/decidim/conferences/speaker.scss";
3
+ @import "stylesheets/decidim/conferences/registration.scss";
4
+ @import "stylesheets/decidim/conferences/program.scss";
5
+ @import "stylesheets/decidim/conferences/media.scss";
@@ -80,14 +80,14 @@ module Decidim
80
80
  return unless user
81
81
  return unless conference.presence
82
82
  return unless conference.registrations_enabled? &&
83
- conference.conference_invites.exists?(user: user) &&
83
+ conference.conference_invites.exists?(user:) &&
84
84
  permission_action.action == :decline_invitation &&
85
85
  permission_action.subject == :conference
86
86
 
87
87
  allow!
88
88
  end
89
89
 
90
- # It's an admin user if it's an organization admin or is a space admin
90
+ # It is an admin user if it is an organization admin or is a space admin
91
91
  # for the current `conference`.
92
92
  def admin_user?
93
93
  user.admin? || (conference ? can_manage_conference?(role: :admin) : has_manageable_conferences?)
@@ -40,7 +40,7 @@ module Decidim
40
40
  def avatar_url(variant = nil)
41
41
  return avatar.default_url unless avatar.attached?
42
42
 
43
- avatar.path(variant: variant)
43
+ avatar.path(variant:)
44
44
  end
45
45
 
46
46
  private
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::Conferences::Invite`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::Conference`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::Conferences::ConferenceRegistration`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::ConferenceSpeaker`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::ConferenceUserRole`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::Conferences::MediaLink`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::Conferences::Partner`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::Conferences::RegistrationType`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -2,40 +2,15 @@
2
2
 
3
3
  module Decidim
4
4
  module Conferences
5
- # A presenter to render statistics in the homepage.
5
+ # A presenter to render statistics in a Conference.
6
6
  class ConferenceStatsPresenter < Decidim::StatsPresenter
7
7
  include IconHelper
8
8
 
9
- def conference
10
- __getobj__.fetch(:conference)
11
- end
12
-
13
- # Public: Render a collection of primary stats.
14
- def highlighted
15
- highlighted_stats = component_stats(priority: StatsRegistry::HIGH_PRIORITY)
16
- highlighted_stats.concat(component_stats(priority: StatsRegistry::MEDIUM_PRIORITY))
17
- highlighted_stats.concat(comments_stats(:conferences))
18
- highlighted_stats = highlighted_stats.reject(&:empty?)
19
- highlighted_stats = highlighted_stats.reject { |_manifest, _name, data| data.zero? }
20
- grouped_highlighted_stats = highlighted_stats.group_by(&:first)
21
-
22
- statistics(grouped_highlighted_stats)
23
- end
24
-
25
9
  private
26
10
 
27
- def component_stats(conditions)
28
- Decidim.component_manifests.map do |component_manifest|
29
- component_manifest.stats
30
- .filter(conditions)
31
- .with_context(published_components)
32
- .map { |name, data| [component_manifest.name, name, data] }.flatten
33
- end
34
- end
11
+ def participatory_space = __getobj__.fetch(:conference)
35
12
 
36
- def published_components
37
- @published_components ||= Component.where(participatory_space: conference).published
38
- end
13
+ def participatory_space_sym = :conferences
39
14
  end
40
15
  end
41
16
  end
@@ -3,11 +3,11 @@
3
3
  module Decidim
4
4
  module Conferences
5
5
  module Admin
6
- # A class used to find the admins for an conference or an organization conferences.
6
+ # A class used to find the admins for a conference or an organization conferences.
7
7
  class AdminUsers < Decidim::Query
8
8
  # Syntactic sugar to initialize the class and return the queried objects.
9
9
  #
10
- # conference - an conference that needs to find its conference admins
10
+ # conference - a conference that needs to find its conference admins
11
11
  def self.for(conference)
12
12
  new(conference).query
13
13
  end
@@ -21,7 +21,7 @@ module Decidim
21
21
 
22
22
  # Initializes the class.
23
23
  #
24
- # conference - an conference that needs to find its conference admins
24
+ # conference - a conference that needs to find its conference admins
25
25
  # organization - an organization that needs to find its conference admins
26
26
  def initialize(conference, organization = nil)
27
27
  @conference = conference
@@ -50,7 +50,7 @@ module Decidim
50
50
  if conference
51
51
  [conference]
52
52
  else
53
- Decidim::Conference.where(organization: organization)
53
+ Decidim::Conference.where(organization:)
54
54
  end
55
55
  end
56
56
  end
@@ -39,8 +39,8 @@ module Decidim
39
39
  attr_reader :user, :role
40
40
 
41
41
  def conference_ids
42
- user_roles = ConferenceUserRole.where(user: user) if role == :any
43
- user_roles = ConferenceUserRole.where(user: user, role: role) if role != :any
42
+ user_roles = ConferenceUserRole.where(user:) if role == :any
43
+ user_roles = ConferenceUserRole.where(user:, role:) if role != :any
44
44
  user_roles.pluck(:decidim_conference_id)
45
45
  end
46
46
  end
@@ -9,7 +9,7 @@ module Decidim
9
9
  end
10
10
 
11
11
  def query
12
- Decidim::Conference.where(organization: @organization)
12
+ Decidim::Conference.where(organization: @organization).order(weight: :asc, start_date: :desc)
13
13
  end
14
14
  end
15
15
  end
@@ -14,7 +14,7 @@ module Decidim
14
14
  OrganizationConferences.new(@organization),
15
15
  VisibleConferences.new(@user),
16
16
  PublishedConferences.new
17
- ).query.order(start_date: :desc)
17
+ ).query.order(weight: :asc, start_date: :desc)
18
18
  end
19
19
  end
20
20
  end
@@ -1,33 +1,27 @@
1
- <%= javascript_pack_tag "decidim_conferences_admin" %>
1
+ <%= append_javascript_pack_tag "decidim_conferences_admin" %>
2
2
 
3
- <div class="card" id="conferences">
4
- <div class="card-divider">
5
- <h2 class="card-title"><%= title %></h2>
6
- </div>
7
-
8
- <div class="card-section">
9
- <div class="row column">
10
- <div class="row">
11
- <div class="column xlarge-8">
12
- <%= form.translated :text_field, :title, autofocus: true %>
13
- </div>
14
- <div class="column xlarge-4 slug">
15
- <%= form.text_field :slug %>
16
- <p class="help-text"><%== t(".slug_help", url: decidim_form_slug_url(:conferences, form.object.slug)) %></p>
17
- </div>
3
+ <div class="form__wrapper">
4
+ <div class="card pt-4" id="conferences">
5
+ <div class="card-section">
6
+ <div class="row column">
7
+ <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
18
8
  </div>
19
- <div class="card">
20
- <div class="card-divider">
21
- <legend><%= select %></legend>
22
- </div>
23
- <div class="card-section">
24
- <div class="row">
25
- <div class="columns xlarge-3">
26
- <%= form.check_box :copy_categories %>
27
- </div>
28
-
29
- <div class="columns xlarge-6">
30
- <%= form.check_box :copy_components %>
9
+ <div class="row column slug">
10
+ <%= form.text_field :slug, help_text: t(".slug_help_html", url: decidim_form_slug_url(:conferences, form.object.slug)) %>
11
+ </div>
12
+ <div class="row column">
13
+ <div class="card">
14
+ <div class="card-divider">
15
+ <legend><%= t("conference_copies.new.select", scope: "decidim.admin") %></legend>
16
+ </div>
17
+ <div class="card-section">
18
+ <div class="row">
19
+ <div class="row column">
20
+ <%= form.check_box :copy_categories %>
21
+ </div>
22
+ <div class="row column">
23
+ <%= form.check_box :copy_components %>
24
+ </div>
31
25
  </div>
32
26
  </div>
33
27
  </div>
@@ -1,8 +1,19 @@
1
1
  <% add_decidim_page_title(t("conference_copies.new.title", scope: "decidim.admin")) %>
2
- <%= decidim_form_for(@form, url: conference_copies_path(current_conference), method: :post, html: { class: "form copy_conference" }) do |f| %>
3
- <%= render partial: "form", object: f, locals: { title: t("conference_copies.new.title", scope: "decidim.admin"), select: t("conference_copies.new.select", scope: "decidim.admin") } %>
4
2
 
5
- <div class="button--double form-general-submit">
6
- <%= f.submit t("conference_copies.new.copy", scope: "decidim.admin") %>
3
+ <div class="item_show__header">
4
+ <h2 class="item_show__header-title">
5
+ <%= t("conference_copies.new.title", scope: "decidim.admin") %>
6
+ </h2>
7
+ </div>
8
+ <div class="item__edit item__edit-1col">
9
+ <div class="item__edit-form">
10
+ <%= decidim_form_for(@form, url: conference_copies_path(current_conference), method: :post, html: { class: "form form-defaults copy_conference" }) do |f| %>
11
+ <%= render partial: "form", object: f %>
12
+ <div class="item__edit-sticky">
13
+ <div class="item__edit-sticky-container">
14
+ <%= f.submit t("conference_copies.new.copy", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
15
+ </div>
16
+ </div>
17
+ <% end %>
7
18
  </div>
8
- <% end %>
19
+ </div>