decidim-meetings 0.19.1 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) 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/join_meeting.rb +11 -0
  30. data/app/commands/decidim/meetings/update_meeting.rb +94 -0
  31. data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
  32. data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +2 -0
  33. data/app/controllers/decidim/meetings/admin/meetings_controller.rb +21 -7
  34. data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +4 -0
  35. data/app/controllers/decidim/meetings/calendars_controller.rb +1 -0
  36. data/app/controllers/decidim/meetings/directory/meetings_controller.rb +1 -1
  37. data/app/controllers/decidim/meetings/meetings_controller.rb +75 -12
  38. data/app/controllers/decidim/meetings/registrations_controller.rb +2 -2
  39. data/app/controllers/decidim/meetings/versions_controller.rb +14 -0
  40. data/app/controllers/decidim/meetings/{meeting_widgets_controller.rb → widgets_controller.rb} +2 -2
  41. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +7 -1
  42. data/app/forms/decidim/meetings/admin/meeting_copy_form.rb +2 -8
  43. data/app/forms/decidim/meetings/admin/meeting_form.rb +24 -23
  44. data/app/forms/decidim/meetings/meeting_form.rb +78 -0
  45. data/app/helpers/decidim/meetings/admin/application_helper.rb +1 -6
  46. data/app/helpers/decidim/meetings/application_helper.rb +26 -0
  47. data/app/helpers/decidim/meetings/map_helper.rb +2 -1
  48. data/app/helpers/decidim/meetings/meetings_helper.rb +13 -1
  49. data/app/models/decidim/meetings/agenda.rb +3 -0
  50. data/app/models/decidim/meetings/agenda_item.rb +3 -0
  51. data/app/models/decidim/meetings/meeting.rb +43 -15
  52. data/app/models/decidim/meetings/minutes.rb +3 -0
  53. data/app/models/decidim/meetings/service.rb +13 -0
  54. data/app/permissions/decidim/meetings/admin/permissions.rb +2 -0
  55. data/app/permissions/decidim/meetings/permissions.rb +20 -0
  56. data/app/presenters/decidim/meetings/admin_log/invite_presenter.rb +5 -1
  57. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +1 -2
  58. data/app/presenters/decidim/meetings/meeting_presenter.rb +21 -6
  59. data/app/presenters/decidim/meetings/official_author_presenter.rb +14 -0
  60. data/app/queries/decidim/meetings/filtered_meetings.rb +37 -0
  61. data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +2 -8
  62. data/app/services/decidim/meetings/calendar/meeting_to_event.rb +3 -3
  63. data/app/services/decidim/meetings/diff_renderer.rb +21 -0
  64. data/app/services/decidim/meetings/meeting_search.rb +3 -25
  65. data/app/types/decidim/meetings/agenda_item_type.rb +28 -0
  66. data/app/types/decidim/meetings/agenda_type.rb +25 -0
  67. data/app/types/decidim/meetings/meeting_type.rb +35 -8
  68. data/app/types/decidim/meetings/meetings_type.rb +1 -1
  69. data/app/types/decidim/meetings/minutes_type.rb +26 -0
  70. data/app/types/decidim/meetings/service_type.rb +13 -0
  71. data/app/views/decidim/meetings/_calendar_modal.html.erb +4 -4
  72. data/app/views/decidim/meetings/admin/invites/index.html.erb +2 -2
  73. data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +1 -6
  74. data/app/views/decidim/meetings/admin/meeting_closes/proposals_picker.html.erb +1 -0
  75. data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +2 -9
  76. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +8 -12
  77. data/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -1
  78. data/app/views/decidim/meetings/admin/meetings/index.html.erb +22 -3
  79. data/app/views/decidim/meetings/admin/registrations/_form.html.erb +4 -0
  80. data/app/views/decidim/meetings/directory/meetings/index.html.erb +5 -3
  81. data/app/views/decidim/meetings/directory/meetings/index.js.erb +11 -4
  82. data/app/views/decidim/meetings/meetings/_count.html.erb +1 -0
  83. data/app/views/decidim/meetings/meetings/_filters.html.erb +13 -7
  84. data/app/views/decidim/meetings/meetings/_form.html.erb +51 -0
  85. data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +2 -2
  86. data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +2 -2
  87. data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +8 -8
  88. data/app/views/decidim/meetings/meetings/edit.html.erb +25 -0
  89. data/app/views/decidim/meetings/meetings/index.html.erb +16 -1
  90. data/app/views/decidim/meetings/meetings/index.js.erb +13 -4
  91. data/app/views/decidim/meetings/meetings/new.html.erb +25 -0
  92. data/app/views/decidim/meetings/meetings/show.html.erb +30 -8
  93. data/app/views/decidim/meetings/versions/index.html.erb +8 -0
  94. data/app/views/decidim/meetings/versions/show.html.erb +10 -0
  95. data/app/views/decidim/participatory_processes/participatory_process_groups/_meeting.html.erb +2 -2
  96. data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +1 -1
  97. data/app/views/decidim/participatory_spaces/_upcoming_meeting_for_card.html.erb +1 -3
  98. data/config/locales/am-ET.yml +1 -0
  99. data/config/locales/ar.yml +4 -8
  100. data/config/locales/bg-BG.yml +21 -0
  101. data/config/locales/bg.yml +21 -0
  102. data/config/locales/ca.yml +64 -8
  103. data/config/locales/cs.yml +70 -8
  104. data/config/locales/da-DK.yml +1 -0
  105. data/config/locales/da.yml +1 -0
  106. data/config/locales/de.yml +64 -7
  107. data/config/locales/el-GR.yml +1 -0
  108. data/config/locales/el.yml +449 -0
  109. data/config/locales/en.yml +65 -9
  110. data/config/locales/eo.yml +1 -0
  111. data/config/locales/es-MX.yml +63 -7
  112. data/config/locales/es-PY.yml +63 -7
  113. data/config/locales/es.yml +65 -9
  114. data/config/locales/et-EE.yml +1 -0
  115. data/config/locales/et.yml +1 -0
  116. data/config/locales/eu.yml +0 -8
  117. data/config/locales/fi-plain.yml +63 -7
  118. data/config/locales/fi.yml +89 -33
  119. data/config/locales/fr-CA.yml +504 -0
  120. data/config/locales/fr.yml +63 -7
  121. data/config/locales/ga-IE.yml +1 -0
  122. data/config/locales/gl.yml +0 -8
  123. data/config/locales/hr-HR.yml +1 -0
  124. data/config/locales/hr.yml +1 -0
  125. data/config/locales/hu.yml +14 -7
  126. data/config/locales/id-ID.yml +0 -8
  127. data/config/locales/is-IS.yml +228 -0
  128. data/config/locales/is.yml +228 -0
  129. data/config/locales/it.yml +62 -8
  130. data/config/locales/ja-JP.yml +494 -0
  131. data/config/locales/ja.yml +496 -0
  132. data/config/locales/ko-KR.yml +1 -0
  133. data/config/locales/ko.yml +1 -0
  134. data/config/locales/lt-LT.yml +1 -0
  135. data/config/locales/lt.yml +1 -0
  136. data/config/locales/lv.yml +452 -0
  137. data/config/locales/mt-MT.yml +1 -0
  138. data/config/locales/mt.yml +1 -0
  139. data/config/locales/nl.yml +95 -47
  140. data/config/locales/no.yml +358 -1
  141. data/config/locales/om-ET.yml +1 -0
  142. data/config/locales/pl.yml +210 -147
  143. data/config/locales/pt-BR.yml +1 -9
  144. data/config/locales/pt.yml +232 -177
  145. data/config/locales/ro-RO.yml +500 -0
  146. data/config/locales/ru.yml +0 -8
  147. data/config/locales/sk-SK.yml +463 -0
  148. data/config/locales/sk.yml +458 -0
  149. data/config/locales/sl.yml +29 -0
  150. data/config/locales/so-SO.yml +1 -0
  151. data/config/locales/sr-CS.yml +13 -0
  152. data/config/locales/sv.yml +67 -13
  153. data/config/locales/ti-ER.yml +1 -0
  154. data/config/locales/tr-TR.yml +0 -8
  155. data/config/locales/uk.yml +0 -8
  156. data/config/locales/vi-VN.yml +1 -0
  157. data/config/locales/vi.yml +1 -0
  158. data/config/locales/zh-CN.yml +496 -0
  159. data/config/locales/zh-TW.yml +1 -0
  160. data/db/migrate/20200320105922_index_foreign_keys_in_decidim_meetings_registrations.rb +7 -0
  161. data/db/migrate/20200526110940_add_author_to_meetings.rb +30 -0
  162. data/db/migrate/20200702123209_create_meeting_services_table.rb +13 -0
  163. data/db/migrate/20200702123210_move_meeting_services_to_own_model.rb +31 -0
  164. data/db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb +9 -0
  165. data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +29 -0
  166. data/lib/decidim/api/linked_resources_interface.rb +17 -0
  167. data/lib/decidim/api/services_interface.rb +13 -0
  168. data/lib/decidim/meetings.rb +1 -0
  169. data/lib/decidim/meetings/admin_engine.rb +5 -1
  170. data/lib/decidim/meetings/api.rb +8 -0
  171. data/lib/decidim/meetings/component.rb +69 -14
  172. data/lib/decidim/meetings/engine.rb +3 -6
  173. data/lib/decidim/meetings/meeting_serializer.rb +1 -1
  174. data/lib/decidim/meetings/seeds/city.jpeg +0 -0
  175. data/lib/decidim/meetings/test/factories.rb +45 -8
  176. data/lib/decidim/meetings/version.rb +1 -1
  177. data/lib/tasks/decidim_meetings.rake +16 -0
  178. metadata +92 -20
  179. data/app/presenters/decidim/meetings/admin_log/value_types/organizer_presenter.rb +0 -70
  180. data/app/views/decidim/meetings/meeting_widgets/show.html.erb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adaf71d724039a5417fe7db43517820fca26f8ada9b22c628c45f6f864d999de
4
- data.tar.gz: 92494c4c32b22a1420d7d3a843dcd265b1305b50d90d0bfcb5f1ea4140ea1b13
3
+ metadata.gz: 4dbf4ab48a65ce688b8060ae56a5785f2b13ce7c190c7a6c1ad6e8ae7824525c
4
+ data.tar.gz: aa38ade9d4cfe51a106cd7dedc0fa1e4a02036418a0b2779adeaa74c4532d089
5
5
  SHA512:
6
- metadata.gz: 7333cede07992c69ad71f04310a8d5e6dd1ce40e0bcc0cd3e80860fdb52c52945e91a140c6b55eeb866f5806e9cbcca0ee26bf9a2f3fb618a64f9f05df881c8f
7
- data.tar.gz: 2c350bc825a262a83fa77baa21e11b9e4a320202731e390a963ac69ebb7ec5228729759d007b0ee471778856b75bcd87d2861f0c8ff166b9a6978d349ed27650
6
+ metadata.gz: '0102305447283a83d06b46cb722a7f43815514856a63c4e34110218803292908737f7cc2bcb08ea04c44e05e01c8c718313da0626a4feef0c46d89a965d7e7bb'
7
+ data.tar.gz: 78a3a5d3f1dcd648cec44de5757cb876261b695640b8e051d376363c367adab0b0af321c4f61600f48d1257f7f89d119f17de67a054c48b936efe33865b03bb1
@@ -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">
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