decidim-meetings 0.21.0 → 0.23.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_meetings_manifest.js +2 -0
  3. data/app/assets/images/decidim/gamification/badges/attended_meetings.svg +1 -106
  4. data/app/assets/images/decidim/meetings/icon.svg +1 -5
  5. data/app/assets/javascripts/decidim/meetings/admin/destroy_meeting_alert.js.es6 +16 -0
  6. data/app/assets/javascripts/decidim/meetings/admin/meetings_form.js.es6 +3 -0
  7. data/app/assets/javascripts/decidim/meetings/meetings_form.js.es6 +9 -0
  8. data/app/cells/decidim/meetings/content_blocks/upcoming_events_cell.rb +2 -1
  9. data/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +7 -7
  10. data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +1 -1
  11. data/app/cells/decidim/meetings/join_meeting_button/show.erb +2 -2
  12. data/app/cells/decidim/meetings/meeting_cell.rb +1 -0
  13. data/app/cells/decidim/meetings/meeting_list_item/show.erb +3 -3
  14. data/app/cells/decidim/meetings/meeting_list_item_cell.rb +1 -1
  15. data/app/cells/decidim/meetings/meeting_m/date.erb +1 -1
  16. data/app/cells/decidim/meetings/meeting_m/footer.erb +1 -1
  17. data/app/cells/decidim/meetings/meeting_m/multiple_dates.erb +1 -1
  18. data/app/cells/decidim/meetings/meeting_m_cell.rb +9 -1
  19. data/app/cells/decidim/meetings/meeting_s/show.erb +6 -6
  20. data/app/cells/decidim/meetings/meetings_map/show.erb +0 -2
  21. data/app/cells/decidim/meetings/meetings_map_cell.rb +3 -1
  22. data/app/commands/decidim/meetings/admin/close_meeting.rb +1 -2
  23. data/app/commands/decidim/meetings/admin/copy_meeting.rb +38 -28
  24. data/app/commands/decidim/meetings/admin/create_meeting.rb +36 -24
  25. data/app/commands/decidim/meetings/admin/destroy_meeting.rb +6 -1
  26. data/app/commands/decidim/meetings/admin/invite_user_to_join_meeting.rb +2 -1
  27. data/app/commands/decidim/meetings/admin/update_meeting.rb +9 -3
  28. data/app/commands/decidim/meetings/create_meeting.rb +78 -0
  29. data/app/commands/decidim/meetings/update_meeting.rb +94 -0
  30. data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
  31. data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +2 -0
  32. data/app/controllers/decidim/meetings/admin/meetings_controller.rb +21 -7
  33. data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +4 -0
  34. data/app/controllers/decidim/meetings/meetings_controller.rb +76 -13
  35. data/app/controllers/decidim/meetings/registrations_controller.rb +1 -1
  36. data/app/controllers/decidim/meetings/versions_controller.rb +14 -0
  37. data/app/controllers/decidim/meetings/{meeting_widgets_controller.rb → widgets_controller.rb} +2 -2
  38. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +7 -1
  39. data/app/forms/decidim/meetings/admin/meeting_copy_form.rb +2 -8
  40. data/app/forms/decidim/meetings/admin/meeting_form.rb +24 -23
  41. data/app/forms/decidim/meetings/meeting_form.rb +78 -0
  42. data/app/helpers/decidim/meetings/admin/application_helper.rb +1 -6
  43. data/app/helpers/decidim/meetings/application_helper.rb +26 -0
  44. data/app/helpers/decidim/meetings/map_helper.rb +2 -1
  45. data/app/helpers/decidim/meetings/meetings_helper.rb +13 -1
  46. data/app/models/decidim/meetings/agenda.rb +3 -0
  47. data/app/models/decidim/meetings/agenda_item.rb +3 -0
  48. data/app/models/decidim/meetings/meeting.rb +79 -23
  49. data/app/models/decidim/meetings/minutes.rb +3 -0
  50. data/app/models/decidim/meetings/service.rb +13 -0
  51. data/app/permissions/decidim/meetings/admin/permissions.rb +2 -0
  52. data/app/permissions/decidim/meetings/permissions.rb +20 -0
  53. data/app/presenters/decidim/meetings/admin_log/invite_presenter.rb +5 -1
  54. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +3 -4
  55. data/app/presenters/decidim/meetings/meeting_presenter.rb +21 -6
  56. data/app/presenters/decidim/meetings/official_author_presenter.rb +14 -0
  57. data/app/queries/decidim/meetings/filtered_meetings.rb +1 -1
  58. data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +2 -8
  59. data/app/services/decidim/meetings/calendar/meeting_to_event.rb +1 -1
  60. data/app/services/decidim/meetings/diff_renderer.rb +21 -0
  61. data/app/services/decidim/meetings/meeting_search.rb +3 -25
  62. data/app/types/decidim/meetings/meeting_type.rb +1 -1
  63. data/app/views/decidim/meetings/_calendar_modal.html.erb +4 -4
  64. data/app/views/decidim/meetings/admin/invites/index.html.erb +2 -2
  65. data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +1 -6
  66. data/app/views/decidim/meetings/admin/meeting_closes/proposals_picker.html.erb +1 -0
  67. data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +2 -9
  68. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +5 -12
  69. data/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -1
  70. data/app/views/decidim/meetings/admin/meetings/index.html.erb +22 -3
  71. data/app/views/decidim/meetings/admin/registrations/_form.html.erb +4 -0
  72. data/app/views/decidim/meetings/directory/meetings/index.html.erb +5 -3
  73. data/app/views/decidim/meetings/directory/meetings/index.js.erb +11 -4
  74. data/app/views/decidim/meetings/meetings/_count.html.erb +1 -0
  75. data/app/views/decidim/meetings/meetings/_filters.html.erb +13 -7
  76. data/app/views/decidim/meetings/meetings/_form.html.erb +51 -0
  77. data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +2 -2
  78. data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +2 -2
  79. data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +8 -8
  80. data/app/views/decidim/meetings/meetings/edit.html.erb +25 -0
  81. data/app/views/decidim/meetings/meetings/index.html.erb +16 -1
  82. data/app/views/decidim/meetings/meetings/index.js.erb +13 -4
  83. data/app/views/decidim/meetings/meetings/new.html.erb +25 -0
  84. data/app/views/decidim/meetings/meetings/show.html.erb +32 -8
  85. data/app/views/decidim/meetings/versions/index.html.erb +8 -0
  86. data/app/views/decidim/meetings/versions/show.html.erb +10 -0
  87. data/app/views/decidim/participatory_processes/participatory_process_groups/_meeting.html.erb +2 -2
  88. data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +1 -1
  89. data/app/views/decidim/participatory_spaces/_upcoming_meeting_for_card.html.erb +1 -3
  90. data/config/locales/am-ET.yml +1 -0
  91. data/config/locales/ar.yml +0 -8
  92. data/config/locales/bg-BG.yml +21 -0
  93. data/config/locales/bg.yml +21 -0
  94. data/config/locales/ca.yml +60 -7
  95. data/config/locales/cs.yml +68 -9
  96. data/config/locales/da-DK.yml +1 -0
  97. data/config/locales/da.yml +1 -0
  98. data/config/locales/de.yml +128 -71
  99. data/config/locales/el.yml +448 -0
  100. data/config/locales/en.yml +61 -8
  101. data/config/locales/eo.yml +1 -0
  102. data/config/locales/es-MX.yml +60 -7
  103. data/config/locales/es-PY.yml +61 -8
  104. data/config/locales/es.yml +61 -8
  105. data/config/locales/et-EE.yml +1 -0
  106. data/config/locales/et.yml +1 -0
  107. data/config/locales/eu.yml +0 -8
  108. data/config/locales/fi-plain.yml +60 -7
  109. data/config/locales/fi.yml +183 -130
  110. data/config/locales/fr-CA.yml +504 -0
  111. data/config/locales/fr.yml +60 -7
  112. data/config/locales/ga-IE.yml +1 -0
  113. data/config/locales/gl.yml +3 -7
  114. data/config/locales/hr-HR.yml +1 -0
  115. data/config/locales/hr.yml +1 -0
  116. data/config/locales/hu.yml +11 -7
  117. data/config/locales/id-ID.yml +0 -8
  118. data/config/locales/is-IS.yml +0 -9
  119. data/config/locales/is.yml +228 -0
  120. data/config/locales/it.yml +58 -7
  121. data/config/locales/ja-JP.yml +494 -0
  122. data/config/locales/ja.yml +496 -0
  123. data/config/locales/ko-KR.yml +1 -0
  124. data/config/locales/ko.yml +1 -0
  125. data/config/locales/lt-LT.yml +1 -0
  126. data/config/locales/lt.yml +1 -0
  127. data/config/locales/lv.yml +452 -0
  128. data/config/locales/mt-MT.yml +1 -0
  129. data/config/locales/mt.yml +1 -0
  130. data/config/locales/nl.yml +52 -7
  131. data/config/locales/no.yml +35 -9
  132. data/config/locales/om-ET.yml +1 -0
  133. data/config/locales/pl.yml +210 -147
  134. data/config/locales/pt-BR.yml +2 -10
  135. data/config/locales/pt.yml +232 -177
  136. data/config/locales/ro-RO.yml +500 -0
  137. data/config/locales/ru.yml +0 -8
  138. data/config/locales/si-LK.yml +1 -0
  139. data/config/locales/sk-SK.yml +463 -0
  140. data/config/locales/sk.yml +458 -0
  141. data/config/locales/sl.yml +33 -0
  142. data/config/locales/so-SO.yml +1 -0
  143. data/config/locales/sr-CS.yml +13 -0
  144. data/config/locales/sv.yml +67 -13
  145. data/config/locales/sw-KE.yml +1 -0
  146. data/config/locales/ti-ER.yml +1 -0
  147. data/config/locales/tr-TR.yml +154 -98
  148. data/config/locales/uk.yml +0 -9
  149. data/config/locales/vi-VN.yml +1 -0
  150. data/config/locales/vi.yml +1 -0
  151. data/config/locales/zh-CN.yml +496 -0
  152. data/config/locales/zh-TW.yml +1 -0
  153. data/db/migrate/20200320105922_index_foreign_keys_in_decidim_meetings_registrations.rb +7 -0
  154. data/db/migrate/20200526110940_add_author_to_meetings.rb +30 -0
  155. data/db/migrate/20200702123209_create_meeting_services_table.rb +13 -0
  156. data/db/migrate/20200702123210_move_meeting_services_to_own_model.rb +31 -0
  157. data/db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb +9 -0
  158. data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +29 -0
  159. data/db/migrate/20201111133246_add_salt_to_decidim_meetings.rb +8 -0
  160. data/lib/decidim/api/services_interface.rb +1 -7
  161. data/lib/decidim/meetings/admin_engine.rb +5 -1
  162. data/lib/decidim/meetings/component.rb +63 -11
  163. data/lib/decidim/meetings/engine.rb +3 -6
  164. data/lib/decidim/meetings/meeting_serializer.rb +1 -1
  165. data/lib/decidim/meetings/seeds/city.jpeg +0 -0
  166. data/lib/decidim/meetings/test/factories.rb +46 -8
  167. data/lib/decidim/meetings/version.rb +1 -1
  168. data/lib/tasks/decidim_meetings.rake +16 -0
  169. metadata +88 -23
  170. data/app/presenters/decidim/meetings/admin_log/value_types/organizer_presenter.rb +0 -70
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f49b1f1b6174033a3ff2af8e7e69fcd14fb7a7586c0ee7d865a144109aea7c24
4
- data.tar.gz: ff2bc14eb13640978f7d15e5f3db7cc1825fe6afec7e73e2a26c04c1d96df22e
3
+ metadata.gz: 469b5f5acce27d78472dae8eaa2a1caa284552f2b7af76ae0718d5952792c65e
4
+ data.tar.gz: 60bb7a7a5032cd4755d55627c2739659688057fd58b330f845c686b996564bc2
5
5
  SHA512:
6
- metadata.gz: 101c8f1e48b6379f656dbddadd6a80e1923a5e11b0251b283953e55f5ad3d057dee58bee33f13a7d31d5b4e2aafc0fa91ba6d6e66073eb2d2e3fe0dbe1f6c78f
7
- data.tar.gz: 438ec4fcc5f446ae8d7f8914587ce78fa4a3dcbe624058a0576fdc96850c975cf2cc90faf9d1b7348eb5082c6070f02090e7768db652817196767ad5367e740e
6
+ metadata.gz: 22e1f891fa9bd27065d75a85a2ea972ac2cbbb8dfd54cc7f602f099dc3102952f333f92d71655c89c1953936b82454ada41b0e4b9bb00b0bce8ec7abd395bedc
7
+ data.tar.gz: 7d8f79104f545ca928cf348b29e9d9df5563ad43f192be6b8443d62d012b0d59dd77e075b3f0e4553abffe9ac62ce0d0a663bf6511ec18d013a7cdd5dd0a1113
@@ -1,6 +1,8 @@
1
+ //= link decidim/meetings/meetings_form.js
1
2
  //= link decidim/meetings/admin/meetings_form.js
2
3
  //= link decidim/meetings/admin/registrations_form.js
3
4
  //= link decidim/meetings/admin/registrations_invite_form.js
4
5
  //= link decidim/meetings/admin/meetings_form.js
5
6
  //= link decidim/meetings/admin/agendas.js
7
+ //= link decidim/meetings/admin/destroy_meeting_alert.js
6
8
  //= link_tree ../images/decidim
@@ -1,106 +1 @@
1
- <svg version="1.1" id="meetings-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
2
- y="0px" width="1080px" height="1080px" viewBox="0 0 1080 1080" enable-background="new 0 0 1080 1080" xml:space="preserve">
3
- <g id="meetings" class="stroke-primary">
4
- <g id="paper_down">
5
-
6
- <polyline class="fill-primary" id="_x32_5-pct_14_" fill="#31536E" fill-opacity="0.25" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
7
- 604.753,874.5 378.529,924.816 367.337,874.497 "/>
8
-
9
- <polyline class="fill-primary" id="_x32_5-pct_13_" fill="#31536E" fill-opacity="0.25" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
10
- 836.5,510.5 902.72,808.227 836.5,822.955 "/>
11
-
12
- <polyline class="fill-primary" id="_x32_5-pct_12_" fill="#31536E" fill-opacity="0.25" stroke="#31536E" stroke-width="16" stroke-linejoin="round" stroke-miterlimit="10" points="
13
- 531.249,205.5 757.471,155.184 766.35,197.105 "/>
14
-
15
- <polyline class="fill-primary" id="_x32_5-pct_11_" fill="#31536E" fill-opacity="0.25" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
16
- 299.5,569.499 233.28,271.774 299.5,257.045 "/>
17
- </g>
18
- <g id="paper">
19
-
20
- <polyline fill="none" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
21
- 836.5,294.5 836.5,874.5 299.5,874.5 299.5,824.5 "/>
22
-
23
- <polyline fill="none" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
24
- 299.5,661.5 299.5,205.5 755.5,205.5 "/>
25
- </g>
26
- <g id="pencil">
27
- <path fill="none" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
28
- M310.292,820.867l554.726-554.725c23.627-23.627,23.785-61.775,0.354-85.207l0,0c-23.433-23.431-61.58-23.273-85.206,0.354
29
- L225.439,736.015l-47.714,132.567L310.292,820.867z"/>
30
-
31
- <path class="fill-primary" id="_x35_0-pct_11_" fill="#31536E" fill-opacity="0.5" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
32
- M836.379,294.78l28.639-28.638c23.627-23.627,23.785-61.775,0.354-85.207l0,0c-23.433-23.431-61.58-23.273-85.206,0.354
33
- l-28.637,28.638"/>
34
-
35
- <line fill="#31536E" stroke="#31536E" stroke-width="16" stroke-miterlimit="10" x1="751.527" y1="209.927" x2="836.38" y2="294.78"/>
36
-
37
- <line fill="none" stroke="#31536E" stroke-width="16" stroke-miterlimit="10" x1="716.172" y1="245.283" x2="801.023" y2="330.136"/>
38
-
39
- <polyline fill="none" stroke="#31536E" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
40
- 227.476,733.785 270.5,734.958 270.5,771.5 309.745,771.5 310.195,820.982 "/>
41
-
42
- <polygon class="fill-primary" id="_x32_5-pct_15_" fill="#31536E" fill-opacity="0.25" stroke="#31536E" stroke-width="8" stroke-miterlimit="10" points="
43
- 310.292,771.37 776.275,305.387 738.092,267.203 270.694,734.601 270.5,771.5 "/>
44
- <polygon class="fill-primary" fill="#31536E" points="177.629,868.678 200.69,804.604 241.703,845.616 "/>
45
- </g>
46
- <g id="stars_8" class="stars">
47
-
48
- <path fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
49
- M155.26,565.735c0-14.688-18.667-35.354-35.355-35.354c15.355,0,35.355-20.333,35.355-35.355
50
- c0,15.022,16.666,35.355,35.355,35.355C171.593,530.381,155.26,551.048,155.26,565.735z"/>
51
- <g>
52
-
53
- <circle fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="904.382" cy="162.858" r="13.5"/>
54
-
55
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="887.883" y1="146.123" x2="866.67" y2="124.91"/>
56
-
57
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="921.824" y1="180.064" x2="943.037" y2="201.277"/>
58
-
59
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="921.117" y1="146.83" x2="942.33" y2="125.617"/>
60
-
61
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="887.883" y1="180.064" x2="866.67" y2="201.277"/>
62
- </g>
63
- <g>
64
-
65
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="266.689" y1="898.798" x2="240.528" y2="924.962"/>
66
-
67
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="231.335" y1="934.153" x2="205.173" y2="960.317"/>
68
-
69
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="265.982" y1="960.317" x2="239.82" y2="934.153"/>
70
-
71
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="230.628" y1="924.962" x2="204.466" y2="898.798"/>
72
- </g>
73
-
74
- <path fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
75
- M922.592,965.056c0,0-21.565,4.035-26.516,8.983c-4.948,4.947-8.982,26.515-8.982,26.515s-4.035-21.564-8.983-26.515
76
- c-4.947-4.948-26.515-8.983-26.515-8.983s22.077-4.546,26.515-8.982c4.438-4.438,8.983-26.516,8.983-26.516
77
- s4.034,21.565,8.982,26.516C901.025,961.021,922.592,965.056,922.592,965.056z"/>
78
- <g>
79
-
80
- <circle fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="896.863" cy="447.201" r="16.604"/>
81
-
82
- <circle fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="860.962" cy="447.201" r="6.432"/>
83
-
84
- <circle fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="896.863" cy="483.103" r="6.433"/>
85
-
86
- <circle fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="932.765" cy="447.201" r="6.432"/>
87
-
88
- <circle fill="#FFD92B" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="896.863" cy="411.3" r="6.432"/>
89
- </g>
90
- <g>
91
-
92
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="298.746" y1="98.42" x2="353.649" y2="153.325"/>
93
-
94
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="353.649" y1="98.42" x2="298.746" y2="153.325"/>
95
-
96
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="308" y1="125.447" x2="281" y2="125.447"/>
97
-
98
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="346" y1="125.447" x2="373" y2="125.447"/>
99
-
100
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="327" y1="144.447" x2="327" y2="171.447"/>
101
-
102
- <line fill="none" stroke="#31536E" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="327" y1="106.447" x2="327" y2="79.447"/>
103
- </g>
104
- </g>
105
- </g>
106
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="meetings-svg" width="1080" height="1080" x="0" y="0" enable-background="new 0 0 1080 1080" version="1.1" viewBox="0 0 1080 1080" xml:space="preserve"><g id="meetings" class="stroke-primary"><g id="paper_down"><polyline id="_x32_5-pct_14_" fill="#31536E" fill-opacity=".25" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" points="604.753 874.5 378.529 924.816 367.337 874.497" class="fill-primary"/><polyline id="_x32_5-pct_13_" fill="#31536E" fill-opacity=".25" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" points="836.5 510.5 902.72 808.227 836.5 822.955" class="fill-primary"/><polyline id="_x32_5-pct_12_" fill="#31536E" fill-opacity=".25" stroke="#31536E" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" points="531.249 205.5 757.471 155.184 766.35 197.105" class="fill-primary"/><polyline id="_x32_5-pct_11_" fill="#31536E" fill-opacity=".25" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" points="299.5 569.499 233.28 271.774 299.5 257.045" class="fill-primary"/></g><g id="paper"><polyline fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" points="836.5 294.5 836.5 874.5 299.5 874.5 299.5 824.5"/><polyline fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" points="299.5 661.5 299.5 205.5 755.5 205.5"/></g><g id="pencil"><path fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" d="M310.292,820.867l554.726-554.725c23.627-23.627,23.785-61.775,0.354-85.207l0,0c-23.433-23.431-61.58-23.273-85.206,0.354 L225.439,736.015l-47.714,132.567L310.292,820.867z"/><path id="_x35_0-pct_11_" fill="#31536E" fill-opacity=".5" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" d="M836.379,294.78l28.639-28.638c23.627-23.627,23.785-61.775,0.354-85.207l0,0c-23.433-23.431-61.58-23.273-85.206,0.354 l-28.637,28.638" class="fill-primary"/><line x1="751.527" x2="836.38" y1="209.927" y2="294.78" fill="#31536E" stroke="#31536E" stroke-miterlimit="10" stroke-width="16"/><line x1="716.172" x2="801.023" y1="245.283" y2="330.136" fill="none" stroke="#31536E" stroke-miterlimit="10" stroke-width="16"/><polyline fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="16" points="227.476 733.785 270.5 734.958 270.5 771.5 309.745 771.5 310.195 820.982"/><polygon id="_x32_5-pct_15_" fill="#31536E" fill-opacity=".25" stroke="#31536E" stroke-miterlimit="10" stroke-width="8" points="310.292 771.37 776.275 305.387 738.092 267.203 270.694 734.601 270.5 771.5" class="fill-primary"/><polygon fill="#31536E" points="177.629 868.678 200.69 804.604 241.703 845.616" class="fill-primary"/></g><g id="stars_8" class="stars"><path fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4" d="M155.26,565.735c0-14.688-18.667-35.354-35.355-35.354c15.355,0,35.355-20.333,35.355-35.355 c0,15.022,16.666,35.355,35.355,35.355C171.593,530.381,155.26,551.048,155.26,565.735z"/><g><circle cx="904.382" cy="162.858" r="13.5" fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="887.883" x2="866.67" y1="146.123" y2="124.91" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="921.824" x2="943.037" y1="180.064" y2="201.277" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="921.117" x2="942.33" y1="146.83" y2="125.617" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="887.883" x2="866.67" y1="180.064" y2="201.277" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/></g><g><line x1="266.689" x2="240.528" y1="898.798" y2="924.962" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="231.335" x2="205.173" y1="934.153" y2="960.317" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="265.982" x2="239.82" y1="960.317" y2="934.153" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="230.628" x2="204.466" y1="924.962" y2="898.798" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/></g><path fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4" d="M922.592,965.056c0,0-21.565,4.035-26.516,8.983c-4.948,4.947-8.982,26.515-8.982,26.515s-4.035-21.564-8.983-26.515 c-4.947-4.948-26.515-8.983-26.515-8.983s22.077-4.546,26.515-8.982c4.438-4.438,8.983-26.516,8.983-26.516 s4.034,21.565,8.982,26.516C901.025,961.021,922.592,965.056,922.592,965.056z"/><g><circle cx="896.863" cy="447.201" r="16.604" fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><circle cx="860.962" cy="447.201" r="6.432" fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><circle cx="896.863" cy="483.103" r="6.433" fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><circle cx="932.765" cy="447.201" r="6.432" fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><circle cx="896.863" cy="411.3" r="6.432" fill="#FFD92B" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/></g><g><line x1="298.746" x2="353.649" y1="98.42" y2="153.325" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="353.649" x2="298.746" y1="98.42" y2="153.325" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="308" x2="281" y1="125.447" y2="125.447" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="346" x2="373" y1="125.447" y2="125.447" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="327" x2="327" y1="144.447" y2="171.447" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/><line x1="327" x2="327" y1="106.447" y2="79.447" fill="none" stroke="#31536E" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"/></g></g></g></svg>
@@ -1,5 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36.02 36.02" width="2000" height="2000">
2
- <path d="M693.07,543.84a18,18,0,1,1,18-18A18,18,0,0,1,693.07,543.84Zm0-34a16,16,0,1,0,16,16A16,16,0,0,0,693.07,509.83Z" transform="translate(-675.07 -507.83)"/>
3
- <path d="M693.07,526.93a4.1,4.1,0,1,1,4.1-4.1A4.1,4.1,0,0,1,693.07,526.93Zm0-6.19a2.1,2.1,0,1,0,2.1,2.1A2.1,2.1,0,0,0,693.07,520.74Z" transform="translate(-675.07 -507.83)"/>
4
- <path d="M693.07,536.65a1,1,0,0,1-.67-0.26c-0.29-.26-7.11-6.5-7.11-14a7.78,7.78,0,0,1,15.57,0c0,7.46-6.82,13.71-7.11,14A1,1,0,0,1,693.07,536.65Zm0-20a5.79,5.79,0,0,0-5.78,5.78c0,5.29,4.13,10.11,5.78,11.82,1.65-1.72,5.78-6.54,5.78-11.82A5.79,5.79,0,0,0,693.07,516.64Z" transform="translate(-675.07 -507.83)"/>
5
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="2000" height="2000" viewBox="0 0 36.02 36.02"><path d="M693.07,543.84a18,18,0,1,1,18-18A18,18,0,0,1,693.07,543.84Zm0-34a16,16,0,1,0,16,16A16,16,0,0,0,693.07,509.83Z" transform="translate(-675.07 -507.83)"/><path d="M693.07,526.93a4.1,4.1,0,1,1,4.1-4.1A4.1,4.1,0,0,1,693.07,526.93Zm0-6.19a2.1,2.1,0,1,0,2.1,2.1A2.1,2.1,0,0,0,693.07,520.74Z" transform="translate(-675.07 -507.83)"/><path d="M693.07,536.65a1,1,0,0,1-.67-0.26c-0.29-.26-7.11-6.5-7.11-14a7.78,7.78,0,0,1,15.57,0c0,7.46-6.82,13.71-7.11,14A1,1,0,0,1,693.07,536.65Zm0-20a5.79,5.79,0,0,0-5.78,5.78c0,5.29,4.13,10.11,5.78,11.82,1.65-1.72,5.78-6.54,5.78-11.82A5.79,5.79,0,0,0,693.07,516.64Z" transform="translate(-675.07 -507.83)"/></svg>
@@ -0,0 +1,16 @@
1
+ const removeNewlineAdjacentSpaces = (text) => {
2
+ return text.replace(/\n\s/g, "\n");
3
+ }
4
+
5
+ $(() => {
6
+ const $confirmButton = $(".destroy-meeting-alert");
7
+
8
+ if ($confirmButton.length > 0) {
9
+ $confirmButton.on("click", () => {
10
+ let alertText = `${$confirmButton.data("invalid-destroy-message")} \n\n`;
11
+ alertText += removeNewlineAdjacentSpaces($confirmButton.data("proposal-titles"));
12
+
13
+ alert(alertText); // eslint-disable-line no-alert
14
+ });
15
+ }
16
+ });
@@ -1,5 +1,6 @@
1
1
  ((exports) => {
2
2
  const { AutoLabelByPositionComponent, AutoButtonsByPositionComponent, createDynamicFields, createSortList } = exports.DecidimAdmin;
3
+ const { attachGeocoding } = window.Decidim;
3
4
 
4
5
  const wrapperSelector = ".meeting-services";
5
6
  const fieldSelector = ".meeting-service";
@@ -93,5 +94,7 @@
93
94
 
94
95
  $privateMeeting.on("change", toggleDisabledHiddenFields);
95
96
  toggleDisabledHiddenFields();
97
+
98
+ attachGeocoding($form.find("#meeting_address"));
96
99
  }
97
100
  })(window);
@@ -0,0 +1,9 @@
1
+ ((exports) => {
2
+ const $ = exports.$; // eslint-disable-line
3
+ const { attachGeocoding } = exports.Decidim;
4
+
5
+ $(() => {
6
+ // Adds the latitude/longitude inputs after the geocoding is done
7
+ attachGeocoding($("#meeting_address"));
8
+ });
9
+ })(window);
@@ -16,13 +16,14 @@ module Decidim
16
16
  @upcoming_events ||= Decidim::Meetings::Meeting
17
17
  .includes(component: :participatory_space)
18
18
  .where(component: meeting_components)
19
+ .visible_meeting_for(current_user)
19
20
  .where("end_time >= ?", Time.current)
20
21
  .order(start_time: :asc)
21
22
  .limit(limit)
22
23
  end
23
24
 
24
25
  def geolocation_enabled?
25
- Decidim.geocoder.present?
26
+ Decidim::Map.available?(:geocoding)
26
27
  end
27
28
 
28
29
  def meetings_directory_path
@@ -1,24 +1,24 @@
1
1
  <% if upcoming_meetings.any? %>
2
2
  <div class="section row collapse upcoming_meetings">
3
- <h4 class="section-heading">
3
+ <h3 class="section-heading">
4
4
  <%= translated_attribute(model.name) %> - <%= t("decidim.participatory_spaces.highlighted_meetings.upcoming_meetings") %> <a href="<%= main_component_path(model) %>" class="text-small"><%= t("decidim.participatory_spaces.highlighted_meetings.see_all", count: meetings_count) %></a>
5
- </h4>
5
+ </h3>
6
6
  <div class="card card--list">
7
- <% upcoming_meetings.each do |meeting| %>
7
+ <% upcoming_meetings.includes(:component).each do |meeting| %>
8
8
  <%= card_for meeting, size: :list_item %>
9
9
  <% end %>
10
10
  </div>
11
11
  <%= link_to(
12
12
  t("decidim.participatory_spaces.highlighted_meetings.see_all", count: meetings_count),
13
13
  main_component_path(model),
14
- class: "button button--sc light secondary button--right"
14
+ class: "button button--sc hollow button--right"
15
15
  ) %>
16
16
  </div>
17
17
  <% elsif past_meetings.any? %>
18
18
  <div class="section row collapse past_meetings">
19
- <h4 class="section-heading">
19
+ <h3 class="section-heading">
20
20
  <%= translated_attribute(model.name) %> - <%= t("decidim.participatory_spaces.highlighted_meetings.past_meetings") %> <a href="<%= main_component_path(model) %>" class="text-small"><%= t("decidim.participatory_spaces.highlighted_meetings.see_all", count: meetings_count) %></a>
21
- </h4>
21
+ </h3>
22
22
  <div class="card card--list">
23
23
  <% past_meetings.each do |meeting| %>
24
24
  <%= card_for meeting, size: :list_item %>
@@ -27,7 +27,7 @@
27
27
  <%= link_to(
28
28
  t("decidim.participatory_spaces.highlighted_meetings.see_all", count: meetings_count),
29
29
  main_component_path(model),
30
- class: "button button--sc light secondary button--right"
30
+ class: "button button--sc hollow button--right"
31
31
  ) %>
32
32
  </div>
33
33
  <% end %>
@@ -18,7 +18,7 @@ module Decidim
18
18
  private
19
19
 
20
20
  def meetings
21
- @meetings ||= Decidim::Meetings::Meeting.where(component: model)
21
+ @meetings ||= Decidim::Meetings::Meeting.where(component: model).visible_meeting_for(current_user)
22
22
  end
23
23
 
24
24
  def past_meetings
@@ -5,7 +5,7 @@
5
5
  meeting_registration_path(model),
6
6
  resource: model,
7
7
  method: :delete,
8
- class: "#{button_classes} secondary light",
8
+ class: "#{button_classes} active",
9
9
  data: { disable: true }
10
10
  ) do %>
11
11
  <%= icon("check", class: "icon--small") %>
@@ -25,7 +25,7 @@
25
25
  <%= action_authorized_button_to(
26
26
  :join,
27
27
  i18n_join_text,
28
- "",
28
+ "#",
29
29
  class: button_classes,
30
30
  disabled: !model.has_available_slots?,
31
31
  data: { open: current_user.present? ? "meeting-registration-confirm-#{model.id}" : "loginModal" }
@@ -6,6 +6,7 @@ module Decidim
6
6
  # the default size is the Medium Card (:m)
7
7
  # also available the List Item Card (:list_item)
8
8
  class MeetingCell < Decidim::ViewModel
9
+ include Decidim::SanitizeHelper
9
10
  include MeetingCellsHelper
10
11
  include Cell::ViewModel::Partial
11
12
 
@@ -2,10 +2,10 @@
2
2
  <div class="card--list__text">
3
3
  <div>
4
4
  <%= link_to resource_path, class: "card__link" do %>
5
- <h6 class="card--list__heading heading6">
5
+ <h4 class="card--list__heading heading6">
6
6
  <%= title %>
7
- </h6>
8
- <span class="text-medium">
7
+ </h4>
8
+ <span class="text-small">
9
9
  <%= resource_date_time %>
10
10
  </span>
11
11
  <% end %>
@@ -14,7 +14,7 @@ module Decidim
14
14
  private
15
15
 
16
16
  def resource_path
17
- resource_locator(model).path
17
+ resource_locator(model).path(filter_link_params)
18
18
  end
19
19
 
20
20
  def title
@@ -1,7 +1,7 @@
1
1
  <div class="card__icondata">
2
2
  <ul class="card-data">
3
3
  <li class="card-data__item">
4
- <%= icon "datetime", class: "icon--big" %>
4
+ <%= icon "datetime", class: "icon--big", role: "img", aria_label: t("decidim.meetings.meetings.show.date") %>
5
5
  </li>
6
6
  <%= meeting_date %>
7
7
  </ul>
@@ -3,7 +3,7 @@
3
3
  <% if can_join? && show_footer_actions? %>
4
4
  <%= cell "decidim/meetings/join_meeting_button", model %>
5
5
  <% else %>
6
- <%= link_to t("view", scope: "decidim.meetings.meetings.show"), resource_path, class: "card__button button secondary button--sc small light" %>
6
+ <%= link_to t("view", scope: "decidim.meetings.meetings.show"), resource_path, class: "card__button button--sc light button small" %>
7
7
  <% end %>
8
8
  </div>
9
9
  </div>
@@ -6,7 +6,7 @@
6
6
  </strong>
7
7
  <%= formatted_start_time %>
8
8
  </div>
9
- <%= icon "arrow-thin-right", class: "icon--big muted" %>
9
+ <%= icon "arrow-thin-right", class: "icon--big muted", role: "img", "aria-hidden": true %>
10
10
  <div>
11
11
  <strong>
12
12
  <%= l end_date, format: :decidim_with_month_name %>
@@ -7,12 +7,20 @@ module Decidim
7
7
  class MeetingMCell < Decidim::CardMCell
8
8
  include MeetingCellsHelper
9
9
 
10
+ def has_authors?
11
+ true
12
+ end
13
+
14
+ def render_authorship
15
+ cell "decidim/author", author_presenter_for(model.normalized_author)
16
+ end
17
+
10
18
  def date
11
19
  render
12
20
  end
13
21
 
14
22
  def address
15
- render
23
+ decidim_html_escape(render)
16
24
  end
17
25
 
18
26
  def title
@@ -1,16 +1,16 @@
1
- <article class="card">
1
+ <div class="card">
2
2
  <div class="p-s">
3
3
  <div class="card__header">
4
4
  <%= link_to meeting_path, class: "card__link" do %>
5
- <h5 class="card__title">
5
+ <span class="card__title">
6
6
  <%= title %>
7
- </h5>
7
+ </span>
8
8
  <% end %>
9
9
  </div>
10
10
  <div class="card__text">
11
11
  <div class="row collapse text-medium">
12
- <time datetime="<%= model.start_time.utc %>" class="column medium-4 icon--container">
13
- <%= icon "datetime", class: "primary" %>
12
+ <time datetime="<%= l(model.start_time, format: :long_dashed) %>" class="column medium-4 icon--container">
13
+ <%= icon "datetime", class: "primary", role: "img", "aria-hidden": true %>
14
14
  &nbsp;
15
15
  <%= l start_date, format: :decidim_with_month_name %>
16
16
  &nbsp;-&nbsp;
@@ -24,4 +24,4 @@
24
24
  </div>
25
25
  </div>
26
26
  </div>
27
- </article>
27
+ </div>
@@ -28,6 +28,4 @@
28
28
  </div>
29
29
  </div>
30
30
  </template>
31
- <%= stylesheet_link_tag "decidim/map" %>
32
- <%= javascript_include_tag "decidim/map" %>
33
31
  <% end.html_safe %>
@@ -6,8 +6,10 @@ module Decidim
6
6
  include Decidim::MapHelper
7
7
  include Decidim::Meetings::MapHelper
8
8
 
9
+ delegate :snippets, to: :controller
10
+
9
11
  def show
10
- return if Decidim.geocoder.blank?
12
+ return unless Decidim::Map.available?(:geocoding, :dynamic)
11
13
 
12
14
  render
13
15
  end
@@ -52,8 +52,7 @@ module Decidim
52
52
  event: "decidim.events.meetings.meeting_closed",
53
53
  event_class: Decidim::Meetings::CloseMeetingEvent,
54
54
  resource: meeting,
55
- affected_users: [meeting.organizer],
56
- followers: meeting.followers - [meeting.organizer]
55
+ followers: meeting.followers
57
56
  )
58
57
  end
59
58
 
@@ -26,61 +26,71 @@ module Decidim
26
26
 
27
27
  transaction do
28
28
  copy_meeting!
29
+ copy_services!
29
30
  schedule_upcoming_meeting_notification
30
31
  send_notification
31
32
  end
32
33
 
33
- broadcast(:ok, @copied_meeting)
34
+ broadcast(:ok, copied_meeting)
34
35
  end
35
36
 
36
37
  private
37
38
 
38
- attr_reader :form, :meeting
39
+ attr_reader :form, :meeting, :copied_meeting
39
40
 
40
41
  def copy_meeting!
41
- parsed_title = Decidim::ContentProcessor.parse_with_processor(:hashtag, @form.title, current_organization: @meeting.organization).rewrite
42
- parsed_description = Decidim::ContentProcessor.parse_with_processor(:hashtag, @form.description, current_organization: @meeting.organization).rewrite
42
+ parsed_title = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.title, current_organization: meeting.organization).rewrite
43
+ parsed_description = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.description, current_organization: meeting.organization).rewrite
43
44
 
44
45
  @copied_meeting = Decidim.traceability.create!(
45
46
  Meeting,
46
- @form.current_user,
47
- scope: @meeting.scope,
48
- category: @meeting.category,
47
+ form.current_user,
48
+ scope: meeting.scope,
49
+ category: meeting.category,
49
50
  title: parsed_title,
50
51
  description: parsed_description,
51
- end_time: @form.end_time,
52
- start_time: @form.start_time,
53
- address: @form.address,
54
- latitude: @form.latitude,
55
- longitude: @form.longitude,
56
- location: @form.location,
57
- location_hints: @form.location_hints,
58
- services: @form.services_to_persist.map { |service| { "title" => service.title, "description" => service.description } },
59
- component: @meeting.component,
60
- private_meeting: @form.private_meeting,
61
- transparent: @form.transparent,
62
- organizer: @form.organizer,
63
- questionnaire: @form.questionnaire,
64
- registrations_enabled: @meeting.registrations_enabled,
65
- available_slots: @meeting.available_slots,
66
- registration_terms: @meeting.registration_terms
52
+ end_time: form.end_time,
53
+ start_time: form.start_time,
54
+ address: form.address,
55
+ latitude: form.latitude,
56
+ longitude: form.longitude,
57
+ location: form.location,
58
+ location_hints: form.location_hints,
59
+ component: meeting.component,
60
+ private_meeting: form.private_meeting,
61
+ transparent: form.transparent,
62
+ author: form.current_organization,
63
+ questionnaire: form.questionnaire,
64
+ registrations_enabled: meeting.registrations_enabled,
65
+ available_slots: meeting.available_slots,
66
+ registration_terms: meeting.registration_terms
67
67
  )
68
68
  end
69
69
 
70
+ def copy_services!
71
+ form.services_to_persist.map do |service|
72
+ Decidim::Meetings::Service.create!(
73
+ meeting: copied_meeting,
74
+ "title" => service.title,
75
+ "description" => service.description
76
+ )
77
+ end
78
+ end
79
+
70
80
  def schedule_upcoming_meeting_notification
71
- checksum = Decidim::Meetings::UpcomingMeetingNotificationJob.generate_checksum(@copied_meeting)
81
+ checksum = Decidim::Meetings::UpcomingMeetingNotificationJob.generate_checksum(copied_meeting)
72
82
 
73
83
  Decidim::Meetings::UpcomingMeetingNotificationJob
74
- .set(wait_until: @copied_meeting.start_time - 2.days)
75
- .perform_later(@copied_meeting.id, checksum)
84
+ .set(wait_until: copied_meeting.start_time - 2.days)
85
+ .perform_later(copied_meeting.id, checksum)
76
86
  end
77
87
 
78
88
  def send_notification
79
89
  Decidim::EventsManager.publish(
80
90
  event: "decidim.events.meetings.meeting_created",
81
91
  event_class: Decidim::Meetings::CreateMeetingEvent,
82
- resource: @copied_meeting,
83
- followers: @copied_meeting.participatory_space.followers
92
+ resource: copied_meeting,
93
+ followers: copied_meeting.participatory_space.followers
84
94
  )
85
95
  end
86
96
  end