decidim-meetings 0.27.8 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/meetings/attending_organizations_list_cell.rb +32 -0
  3. data/app/cells/decidim/meetings/cancel_registration_meeting_button/cancelation_modal.erb +21 -0
  4. data/app/cells/decidim/meetings/cancel_registration_meeting_button/show.erb +10 -13
  5. data/app/cells/decidim/meetings/cancel_registration_meeting_button_cell.rb +2 -2
  6. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb +8 -18
  7. data/app/cells/decidim/meetings/dates_and_map/show.erb +25 -0
  8. data/app/cells/decidim/meetings/dates_and_map/static_map.erb +1 -0
  9. data/app/cells/decidim/meetings/dates_and_map_cell.rb +35 -0
  10. data/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +32 -30
  11. data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +76 -16
  12. data/app/cells/decidim/meetings/join_meeting_button/registration_modal.erb +25 -0
  13. data/app/cells/decidim/meetings/join_meeting_button/remaining_slots.erb +4 -0
  14. data/app/cells/decidim/meetings/join_meeting_button/show.erb +6 -4
  15. data/app/cells/decidim/meetings/join_meeting_button_cell.rb +3 -7
  16. data/app/cells/decidim/meetings/meeting_activity_cell.rb +1 -12
  17. data/app/cells/decidim/meetings/meeting_card_metadata_cell.rb +64 -0
  18. data/app/cells/decidim/meetings/meeting_cell.rb +2 -6
  19. data/app/cells/decidim/meetings/meeting_l/image.erb +5 -0
  20. data/app/cells/decidim/meetings/meeting_l_cell.rb +33 -0
  21. data/app/cells/decidim/meetings/meeting_month/show.erb +33 -0
  22. data/app/cells/decidim/meetings/meeting_month_cell.rb +72 -0
  23. data/app/cells/decidim/meetings/meeting_s_cell.rb +5 -37
  24. data/app/cells/decidim/meetings/meetings_map/show.erb +9 -24
  25. data/app/cells/decidim/meetings/meetings_map_cell.rb +1 -1
  26. data/app/cells/decidim/meetings/online_meeting_cell.rb +1 -0
  27. data/app/cells/decidim/meetings/online_meeting_link/show.erb +18 -41
  28. data/app/cells/decidim/meetings/public_participants_list/show.erb +4 -15
  29. data/app/commands/decidim/meetings/admin/copy_meeting.rb +1 -1
  30. data/app/commands/decidim/meetings/admin/create_meeting.rb +1 -1
  31. data/app/commands/decidim/meetings/admin/invite_user_to_join_meeting.rb +5 -5
  32. data/app/commands/decidim/meetings/admin/publish_meeting.rb +1 -1
  33. data/app/commands/decidim/meetings/admin/unpublish_meeting.rb +1 -1
  34. data/app/commands/decidim/meetings/create_meeting.rb +14 -3
  35. data/app/commands/decidim/meetings/decline_invitation.rb +1 -1
  36. data/app/commands/decidim/meetings/join_meeting.rb +5 -5
  37. data/app/commands/decidim/meetings/update_meeting.rb +13 -3
  38. data/app/controllers/concerns/decidim/meetings/component_filterable.rb +4 -4
  39. data/app/controllers/decidim/meetings/admin/agenda_controller.rb +6 -6
  40. data/app/controllers/decidim/meetings/admin/invites_controller.rb +3 -3
  41. data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +2 -4
  42. data/app/controllers/decidim/meetings/admin/meeting_copies_controller.rb +3 -3
  43. data/app/controllers/decidim/meetings/admin/meetings_controller.rb +7 -7
  44. data/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb +4 -4
  45. data/app/controllers/decidim/meetings/admin/registrations_controller.rb +6 -6
  46. data/app/controllers/decidim/meetings/application_controller.rb +11 -0
  47. data/app/controllers/decidim/meetings/calendars_controller.rb +0 -1
  48. data/app/controllers/decidim/meetings/directory/application_controller.rb +12 -0
  49. data/app/controllers/decidim/meetings/directory/meetings_controller.rb +5 -30
  50. data/app/controllers/decidim/meetings/live_events_controller.rb +1 -0
  51. data/app/controllers/decidim/meetings/meeting_closes_controller.rb +2 -3
  52. data/app/controllers/decidim/meetings/meetings_controller.rb +75 -7
  53. data/app/controllers/decidim/meetings/polls/answers_controller.rb +2 -2
  54. data/app/controllers/decidim/meetings/polls/questions_controller.rb +1 -1
  55. data/app/controllers/decidim/meetings/registrations_controller.rb +5 -5
  56. data/app/events/decidim/meetings/close_meeting_event.rb +1 -1
  57. data/app/events/decidim/meetings/meeting_event.rb +1 -1
  58. data/app/events/decidim/meetings/meeting_registration_notification_event.rb +3 -3
  59. data/app/events/decidim/meetings/meeting_registrations_enabled_event.rb +1 -1
  60. data/app/events/decidim/meetings/meeting_registrations_over_percentage_event.rb +1 -1
  61. data/app/events/decidim/meetings/registration_code_validated_event.rb +1 -1
  62. data/app/forms/decidim/meetings/admin/meeting_form.rb +5 -1
  63. data/app/forms/decidim/meetings/admin/meeting_registrations_form.rb +2 -2
  64. data/app/forms/decidim/meetings/admin/validate_registration_code_form.rb +1 -1
  65. data/app/forms/decidim/meetings/base_meeting_form.rb +1 -1
  66. data/app/forms/decidim/meetings/meeting_form.rb +3 -3
  67. data/app/helpers/decidim/meetings/admin/application_helper.rb +1 -0
  68. data/app/helpers/decidim/meetings/application_helper.rb +18 -25
  69. data/app/helpers/decidim/meetings/directory/application_helper.rb +11 -59
  70. data/app/helpers/decidim/meetings/map_helper.rb +2 -9
  71. data/app/helpers/decidim/meetings/meetings_helper.rb +6 -5
  72. data/app/jobs/decidim/meetings/hide_all_created_by_author_job.rb +13 -0
  73. data/app/mailers/decidim/meetings/admin/invite_join_meeting_mailer.rb +1 -1
  74. data/app/mailers/decidim/meetings/registration_mailer.rb +1 -1
  75. data/app/models/decidim/meetings/meeting.rb +11 -32
  76. data/app/models/decidim/meetings/question.rb +1 -1
  77. data/app/packs/entrypoints/decidim_meetings.js +3 -0
  78. data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_attended_meetings.svg +42 -1
  79. data/app/packs/src/decidim/meetings/admin/agendas.js +3 -4
  80. data/app/packs/src/decidim/meetings/admin/registrations_form.js +12 -4
  81. data/app/packs/src/decidim/meetings/meetings_form.js +1 -1
  82. data/app/packs/src/decidim/meetings/poll.component.js +1 -28
  83. data/app/packs/stylesheets/decidim/meetings/_calendar.scss +47 -0
  84. data/app/packs/stylesheets/decidim/meetings/_item.scss +177 -0
  85. data/app/packs/stylesheets/decidim/meetings/_list.scss +58 -0
  86. data/app/packs/stylesheets/decidim/meetings/_live_event.scss +128 -0
  87. data/app/packs/stylesheets/decidim/meetings/meetings.scss +4 -0
  88. data/app/permissions/decidim/meetings/permissions.rb +15 -12
  89. data/app/presenters/decidim/meetings/admin_log/invite_presenter.rb +2 -2
  90. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +6 -2
  91. data/app/presenters/decidim/meetings/admin_log/questionnaire_presenter.rb +2 -2
  92. data/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb +1 -1
  93. data/app/presenters/decidim/meetings/log/resource_presenter.rb +18 -0
  94. data/app/presenters/decidim/meetings/meeting_presenter.rb +8 -2
  95. data/app/services/decidim/meetings/calendar/component_calendar.rb +1 -1
  96. data/app/services/decidim/meetings/close_meeting_reminder_generator.rb +7 -13
  97. data/app/services/decidim/meetings/meeting_iframe_embedder.rb +1 -1
  98. data/app/views/decidim/meetings/_calendar_modal.html.erb +19 -21
  99. data/app/views/decidim/meetings/admin/agenda/_agenda_item.html.erb +12 -12
  100. data/app/views/decidim/meetings/admin/agenda/_agenda_item_child.html.erb +8 -8
  101. data/app/views/decidim/meetings/admin/agenda/_agenda_item_child_template.html.erb +1 -1
  102. data/app/views/decidim/meetings/admin/agenda/_agenda_item_fields.html.erb +3 -3
  103. data/app/views/decidim/meetings/admin/agenda/_form.html.erb +54 -50
  104. data/app/views/decidim/meetings/admin/agenda/edit.html.erb +18 -6
  105. data/app/views/decidim/meetings/admin/agenda/new.html.erb +17 -5
  106. data/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +11 -2
  107. data/app/views/decidim/meetings/admin/invites/_form.html.erb +38 -28
  108. data/app/views/decidim/meetings/admin/invites/index.html.erb +77 -81
  109. data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +26 -28
  110. data/app/views/decidim/meetings/admin/meeting_closes/edit.html.erb +17 -5
  111. data/app/views/decidim/meetings/admin/meeting_copies/new.html.erb +17 -6
  112. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +76 -83
  113. data/app/views/decidim/meetings/admin/meetings/_service.html.erb +14 -10
  114. data/app/views/decidim/meetings/admin/meetings/_services.html.erb +9 -5
  115. data/app/views/decidim/meetings/admin/meetings/edit.html.erb +17 -7
  116. data/app/views/decidim/meetings/admin/meetings/index.html.erb +133 -129
  117. data/app/views/decidim/meetings/admin/meetings/new.html.erb +16 -6
  118. data/app/views/decidim/meetings/admin/poll/_answer_option.html.erb +1 -1
  119. data/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb +1 -1
  120. data/app/views/decidim/meetings/admin/poll/_form.html.erb +17 -32
  121. data/app/views/decidim/meetings/admin/poll/_question.html.erb +81 -75
  122. data/app/views/decidim/meetings/admin/poll/edit.html.erb +28 -8
  123. data/app/views/decidim/meetings/admin/registrations/_form.html.erb +32 -55
  124. data/app/views/decidim/meetings/admin/registrations/edit.html.erb +59 -26
  125. data/app/views/decidim/meetings/directory/meetings/index.html.erb +15 -20
  126. data/app/views/decidim/meetings/directory/meetings/index.js.erb +1 -23
  127. data/app/views/decidim/meetings/layouts/_aside_block.html.erb +8 -0
  128. data/app/views/decidim/meetings/layouts/live_event.html.erb +20 -19
  129. data/app/views/decidim/meetings/live_events/show.html.erb +4 -5
  130. data/app/views/decidim/meetings/meeting_closes/_form.html.erb +3 -10
  131. data/app/views/decidim/meetings/meeting_closes/edit.html.erb +17 -21
  132. data/app/views/decidim/meetings/meetings/_actions.html.erb +6 -0
  133. data/app/views/decidim/meetings/meetings/_add_to_calendar_modal.html.erb +17 -0
  134. data/app/views/decidim/meetings/meetings/_form.html.erb +26 -34
  135. data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +3 -22
  136. data/app/views/decidim/meetings/meetings/_meeting.html.erb +74 -0
  137. data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +28 -26
  138. data/app/views/decidim/meetings/meetings/_meeting_aside.html.erb +98 -0
  139. data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +23 -36
  140. data/app/views/decidim/meetings/meetings/edit.html.erb +17 -21
  141. data/app/views/decidim/meetings/meetings/index.html.erb +15 -33
  142. data/app/views/decidim/meetings/meetings/index.js.erb +1 -23
  143. data/app/views/decidim/meetings/meetings/new.html.erb +17 -21
  144. data/app/views/decidim/meetings/meetings/show.html.erb +8 -167
  145. data/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb +9 -13
  146. data/app/views/decidim/meetings/polls/answers/_single_option.html.erb +4 -4
  147. data/app/views/decidim/meetings/polls/answers/create.js.erb +1 -1
  148. data/app/views/decidim/meetings/polls/questions/_index.html.erb +1 -1
  149. data/app/views/decidim/meetings/polls/questions/_index_admin.html.erb +5 -5
  150. data/app/views/decidim/meetings/polls/questions/_published_question.html.erb +9 -11
  151. data/app/views/decidim/meetings/polls/questions/_question.html.erb +3 -3
  152. data/app/views/decidim/meetings/polls/questions/index_admin.js.erb +1 -1
  153. data/app/views/decidim/meetings/shared/_filters.html.erb +20 -0
  154. data/app/views/decidim/meetings/shared/_index.html.erb +24 -0
  155. data/app/views/decidim/meetings/shared/_index.js.erb +16 -0
  156. data/app/views/decidim/meetings/shared/_meetings.html.erb +33 -0
  157. data/app/views/decidim/meetings/shared/_meetings_aside.html.erb +18 -0
  158. data/app/views/decidim/meetings/versions/show.html.erb +14 -4
  159. data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +13 -15
  160. data/config/assets.rb +0 -2
  161. data/config/locales/ar.yml +6 -94
  162. data/config/locales/bg.yml +0 -673
  163. data/config/locales/ca.yml +52 -75
  164. data/config/locales/cs.yml +49 -71
  165. data/config/locales/de.yml +53 -76
  166. data/config/locales/el.yml +48 -51
  167. data/config/locales/en.yml +51 -74
  168. data/config/locales/es-MX.yml +50 -73
  169. data/config/locales/es-PY.yml +48 -71
  170. data/config/locales/es.yml +53 -76
  171. data/config/locales/eu.yml +52 -75
  172. data/config/locales/fi-plain.yml +46 -69
  173. data/config/locales/fi.yml +44 -67
  174. data/config/locales/fr-CA.yml +43 -69
  175. data/config/locales/fr.yml +48 -71
  176. data/config/locales/ga-IE.yml +2 -16
  177. data/config/locales/gl.yml +5 -63
  178. data/config/locales/hu.yml +6 -92
  179. data/config/locales/id-ID.yml +4 -60
  180. data/config/locales/is-IS.yml +1 -22
  181. data/config/locales/it.yml +6 -86
  182. data/config/locales/ja.yml +44 -73
  183. data/config/locales/lb.yml +6 -67
  184. data/config/locales/lt.yml +42 -65
  185. data/config/locales/lv.yml +4 -61
  186. data/config/locales/nl.yml +4 -92
  187. data/config/locales/no.yml +4 -80
  188. data/config/locales/pl.yml +2 -199
  189. data/config/locales/pt-BR.yml +4 -200
  190. data/config/locales/pt.yml +5 -85
  191. data/config/locales/ro-RO.yml +11 -81
  192. data/config/locales/ru.yml +5 -60
  193. data/config/locales/sk.yml +4 -61
  194. data/config/locales/sl.yml +0 -3
  195. data/config/locales/sr-CS.yml +0 -6
  196. data/config/locales/sv.yml +10 -90
  197. data/config/locales/tr-TR.yml +5 -78
  198. data/config/locales/uk.yml +5 -53
  199. data/config/locales/zh-CN.yml +3 -70
  200. data/config/locales/zh-TW.yml +24 -51
  201. data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +1 -1
  202. data/db/migrate/20230427105701_change_types_and_registration_types_on_meetings.rb +49 -0
  203. data/lib/decidim/meetings/admin_engine.rb +2 -2
  204. data/lib/decidim/meetings/component.rb +4 -216
  205. data/lib/decidim/meetings/content_blocks/registry_manager.rb +17 -0
  206. data/lib/decidim/meetings/directory_engine.rb +4 -6
  207. data/lib/decidim/meetings/engine.rb +62 -27
  208. data/lib/decidim/meetings/meeting_serializer.rb +3 -3
  209. data/lib/decidim/meetings/seeds.rb +188 -0
  210. data/lib/decidim/meetings/test/factories.rb +124 -54
  211. data/lib/decidim/meetings/test/notifications_handling.rb +3 -3
  212. data/lib/decidim/meetings/test/translated_event.rb +1 -1
  213. data/lib/decidim/meetings/version.rb +1 -1
  214. metadata +58 -58
  215. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings/elements.erb +0 -16
  216. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings/heading.erb +0 -1
  217. data/app/cells/decidim/meetings/content_blocks/upcoming_meetings/show.erb +0 -26
  218. data/app/cells/decidim/meetings/content_blocks/upcoming_meetings_cell.rb +0 -63
  219. data/app/cells/decidim/meetings/join_meeting_button/registration_confirm.erb +0 -31
  220. data/app/cells/decidim/meetings/meeting_highlighted_list_item/show.erb +0 -21
  221. data/app/cells/decidim/meetings/meeting_highlighted_list_item_cell.rb +0 -10
  222. data/app/cells/decidim/meetings/meeting_list_item/show.erb +0 -14
  223. data/app/cells/decidim/meetings/meeting_list_item_cell.rb +0 -44
  224. data/app/cells/decidim/meetings/meeting_m/address.erb +0 -5
  225. data/app/cells/decidim/meetings/meeting_m/data.erb +0 -2
  226. data/app/cells/decidim/meetings/meeting_m/date.erb +0 -8
  227. data/app/cells/decidim/meetings/meeting_m/footer.erb +0 -9
  228. data/app/cells/decidim/meetings/meeting_m/multiple_dates.erb +0 -17
  229. data/app/cells/decidim/meetings/meeting_m/single_date.erb +0 -9
  230. data/app/cells/decidim/meetings/meeting_m/tags.erb +0 -1
  231. data/app/cells/decidim/meetings/meeting_m_cell.rb +0 -121
  232. data/app/cells/decidim/meetings/meeting_s/show.erb +0 -27
  233. data/app/controllers/concerns/decidim/meetings/filterable.rb +0 -27
  234. data/app/controllers/decidim/meetings/widgets_controller.rb +0 -30
  235. data/app/packs/stylesheets/decidim/meetings/_header.scss +0 -52
  236. data/app/packs/stylesheets/decidim/meetings/_main.scss +0 -178
  237. data/app/packs/stylesheets/decidim/meetings/_meetings.scss +0 -2
  238. data/app/queries/decidim/meetings/admin/invites.rb +0 -60
  239. data/app/views/decidim/meetings/admin/meeting_closes/proposals_picker.html.erb +0 -1
  240. data/app/views/decidim/meetings/directory/meetings/_filters.html.erb +0 -34
  241. data/app/views/decidim/meetings/directory/meetings/_meetings.html.erb +0 -26
  242. data/app/views/decidim/meetings/meeting_closes/proposals_picker.html.erb +0 -1
  243. data/app/views/decidim/meetings/meetings/_calendar_modal.html.erb +0 -26
  244. data/app/views/decidim/meetings/meetings/_filters.html.erb +0 -40
  245. data/app/views/decidim/meetings/meetings/_filters_small_view.html.erb +0 -18
  246. data/app/views/decidim/meetings/meetings/_meetings.html.erb +0 -48
  247. data/app/views/decidim/meetings/versions/index.html.erb +0 -8
  248. data/app/views/decidim/participatory_spaces/_upcoming_meeting_for_card.html.erb +0 -4
  249. data/config/locales/he-IL.yml +0 -1
  250. data/decidim-meetings.gemspec +0 -36
  251. data/lib/decidim/meetings/seeds/city.jpeg +0 -0
@@ -60,8 +60,8 @@ zh-TW:
60
60
  meeting_agenda:
61
61
  attributes:
62
62
  base:
63
- too_many_minutes: 這些項目的總時長超過了會議時間 %{count} 分鐘
64
- too_many_minutes_child: 子項目的持續時間超過議程項目「%{parent_title}」的持續時間 %{count} 分鐘
63
+ too_many_minutes: 這些項目的總時長超過了會議時間 %{count} 分鐘.
64
+ too_many_minutes_child: 子項目的持續時間超過議程項目「%{parent_title}」的持續時間 %{count} 分鐘.
65
65
  meeting_registration_invite:
66
66
  attributes:
67
67
  email:
@@ -117,7 +117,6 @@ zh-TW:
117
117
  success: 成功複製會議。
118
118
  new:
119
119
  copy: 複製
120
- select: 請選擇您想要複製的資料
121
120
  title: 複製會議
122
121
  components:
123
122
  meetings:
@@ -218,7 +217,6 @@ zh-TW:
218
217
  proposals_count:
219
218
  other: '該會議因有 %{count} 個相關提案而無法刪除:'
220
219
  manage_poll: 管理投票
221
- new: 新會議
222
220
  preview: 預覽
223
221
  registrations: 註冊
224
222
  title: 操作
@@ -237,8 +235,8 @@ zh-TW:
237
235
  remove: 移除
238
236
  up: 往上
239
237
  create:
240
- invalid: 建立議程時發生問題
241
- success: 議程成功建立
238
+ invalid: 建立議程時發生問題.
239
+ success: 議程成功建立.
242
240
  edit:
243
241
  title: 編輯議程
244
242
  update: 更新
@@ -251,8 +249,8 @@ zh-TW:
251
249
  create: 建立
252
250
  title: 新的議程
253
251
  update:
254
- invalid: 更新議程時發生問題
255
- success: 議程已成功更新
252
+ invalid: 更新議程時發生問題.
253
+ success: 議程已成功更新.
256
254
  exports:
257
255
  answers: 回答
258
256
  meeting_comments: 評論
@@ -276,9 +274,10 @@ zh-TW:
276
274
  select_user: 選擇參與者
277
275
  index:
278
276
  filter:
277
+ accepted: 已接受
279
278
  all: 全部
279
+ rejected: 已拒絕
280
280
  sent: 傳送
281
- filter_by: 篩選條件
282
281
  invite_attendee: 邀請的與會者
283
282
  invites: 邀請
284
283
  registrations_disabled: 你無法邀請參加者,因為註冊已被禁用。
@@ -289,15 +288,15 @@ zh-TW:
289
288
  title: 關閉會議
290
289
  meetings:
291
290
  close:
292
- invalid: 關閉此會議時出現問題
293
- success: 會議已成功關閉
291
+ invalid: 關閉此會議時出現問題.
292
+ success: 會議已成功關閉.
294
293
  create:
295
- invalid: 建立會議時發生問題
294
+ invalid: 建立會議時發生問題.
296
295
  success: 會議已成功建立。請注意這仍未發佈,您需要手動發佈。
297
296
  destroy:
298
297
  invalid:
299
298
  proposals_count:
300
- other: 該會議因有 %{count} 個相關提案而無法刪除
299
+ other: 該會議因有 %{count} 個相關提案而無法刪除.
301
300
  success: 會議已成功刪除
302
301
  edit:
303
302
  title: 編輯會議
@@ -319,7 +318,7 @@ zh-TW:
319
318
  title: 建立會議
320
319
  publish:
321
320
  invalid: 發佈此會議時出現問題。
322
- success: 會議成功發佈
321
+ success: 會議成功發佈.
323
322
  service:
324
323
  description: 說明
325
324
  down: 向下
@@ -331,20 +330,17 @@ zh-TW:
331
330
  add_service: 新增服務
332
331
  services: 服務
333
332
  unpublish:
334
- invalid: 取消發佈會議時出了問題
333
+ invalid: 取消發佈會議時出了問題.
335
334
  success: 會議已成功取消發佈。
336
335
  update:
337
- invalid: 更新會議時發生問題
338
- success: 會議成功更新
336
+ invalid: 更新會議時發生問題.
337
+ success: 會議成功更新.
339
338
  meetings_poll:
340
339
  form:
341
340
  title: 編輯 %{questionnaire_for} 投票問卷
342
341
  update:
343
- invalid: 更新會議投票時出現問題
344
- success: 會議投票調查已成功更新"
345
- models:
346
- meeting:
347
- name: 會議
342
+ invalid: 更新會議投票時出現問題.
343
+ success: 會議投票已成功更新"
348
344
  registrations:
349
345
  edit:
350
346
  save: 儲存
@@ -388,11 +384,8 @@ zh-TW:
388
384
  all: 全部
389
385
  filter_meeting_space_values:
390
386
  all: 全部
391
- filter_scope_values:
392
- all: 全部
393
387
  calendar_modal:
394
388
  calendar_url: 行事曆 URL
395
- close_window: 關閉視窗
396
389
  copy_calendar_url: 複製
397
390
  copy_calendar_url_clarification: 將日曆 URL 複製到剪貼板
398
391
  copy_calendar_url_copied: 已複製!
@@ -410,8 +403,6 @@ zh-TW:
410
403
  content_blocks:
411
404
  upcoming_meetings:
412
405
  name: 即將到來的會議
413
- upcoming_meetings: 即將到來的會議
414
- view_all_meetings: 檢視全部
415
406
  directory:
416
407
  meetings:
417
408
  index:
@@ -427,10 +418,11 @@ zh-TW:
427
418
  open_in_live_event_page: 在直播活動頁面開啟(附加投票選項)
428
419
  open_in_new_tab: 在新頁籤中開啟 URL
429
420
  last_activity:
430
- meeting_updated_at_html: "<span>會議已更新,請查看連結:%{link}</span>"
431
- new_meeting_at_html: "<span>在 %{link} 新增會議</span>"
421
+ meeting_updated: '會議已更新:'
422
+ new_meeting: '新會議:'
432
423
  layouts:
433
424
  live_event:
425
+ administrate: 管理員
434
426
  close: 關閉
435
427
  questions: 問題
436
428
  mailer:
@@ -451,7 +443,6 @@ zh-TW:
451
443
  calendar_modal:
452
444
  add_to_calendar: 新增至行事曆
453
445
  apple: 新增至 Apple 日曆
454
- close_window: 關閉視窗
455
446
  full_details_html: 詳細內容請前往 %{link}
456
447
  google: 新增至 Google 日曆
457
448
  outlook: 添加到Outlook 行事曆
@@ -480,7 +471,6 @@ zh-TW:
480
471
  all: 全部
481
472
  official: 官方
482
473
  participants: 參與者
483
- scope: 範圍
484
474
  search: 搜尋
485
475
  type: 類別
486
476
  type_values:
@@ -488,11 +478,6 @@ zh-TW:
488
478
  hybrid: 混合
489
479
  in_person: 親自
490
480
  online: 線上
491
- filters_small_view:
492
- close_modal: 關閉視窗
493
- filter: 篩選
494
- filter_by: 篩選條件
495
- unfold: 展開
496
481
  form:
497
482
  address_help: '地址:用於地理編碼器找到位置'
498
483
  available_slots_help: 如果您有無限的可用名額,請將其設置為0。
@@ -512,8 +497,6 @@ zh-TW:
512
497
  see_all: 查看所有會議
513
498
  see_all_withdrawn: 查看所有撤回的會議
514
499
  text_banner: 您正在查看已被其作者撤回的會議列表。 %{go_back_link}。
515
- meeting_minutes:
516
- related_information: 相關信息
517
500
  meetings:
518
501
  no_meetings_warning: 沒有符合搜尋條件的會議或者目前沒有任何已排定的會議。
519
502
  upcoming_meetings_warning: 目前沒有安排的會議,但您可以在這裡找到所有過去的會議列表。
@@ -526,11 +509,8 @@ zh-TW:
526
509
  confirm: 確認
527
510
  show:
528
511
  attendees: 出席人數
529
- back: 返回列表
530
- close_meeting: 關閉會議
531
512
  contributions: 貢獻次數
532
- date: 日期
533
- edit_meeting: 編輯會議
513
+ join: 加入會議
534
514
  leave: 取消您的註冊
535
515
  leave_confirmation: 您確定要取消此次會議的註冊嗎?
536
516
  link_available_soon: 連結即將推出
@@ -546,7 +526,6 @@ zh-TW:
546
526
  validation_pending: 驗證待處理
547
527
  remaining_slots:
548
528
  other: "剩餘 %{count} 個位置"
549
- view: 檢視
550
529
  visit_finished: 查看過去的會議
551
530
  withdraw_btn_hint: 您可以撤回您的會議,如果您改變了主意。會議不會被刪除,而是會顯示在已撤回的會議列表中。
552
531
  withdraw_confirmation_html: 您確定要撤回此會議嗎?<br><br><strong>此操作無法取消!</strong>
@@ -554,8 +533,6 @@ zh-TW:
554
533
  update:
555
534
  invalid: 更新會議時發生問題.
556
535
  success: 您已成功更新會議。
557
- meetings_map:
558
- view_meeting: 檢視會議
559
536
  models:
560
537
  invite:
561
538
  fields:
@@ -628,11 +605,9 @@ zh-TW:
628
605
  private_meeting: 私人會議
629
606
  transparent: 透明
630
607
  withdraw: 撤回
631
- versions:
632
- back_to_resource: 回到會議畫面
633
608
  withdraw:
634
- error: 退出會議時發生錯誤
635
- success: 會議已成功取消
609
+ error: 退出會議時發生錯誤.
610
+ success: 會議已成功撤回.
636
611
  metrics:
637
612
  meetings:
638
613
  description: 建立的會議次數
@@ -643,8 +618,6 @@ zh-TW:
643
618
  past_meetings: 過去的會議
644
619
  see_all: 檢視所有會議 (%{count})
645
620
  upcoming_meetings: 即將到來的會議
646
- upcoming_meeting_for_card:
647
- upcoming_meeting: 即將到來的會議
648
621
  resource_links:
649
622
  meetings_through_proposals:
650
623
  meeting_result: '相關結果:'
@@ -11,7 +11,7 @@ class FixMeetingsRegistrationTerms < ActiveRecord::Migration[5.2]
11
11
  next if meeting.official?
12
12
 
13
13
  # Since user-created meetings have no way to override the `registration_terms` field
14
- # and it's supposed to use the component defaults,
14
+ # and it is supposed to use the component defaults,
15
15
  # we can safely override this.
16
16
  meeting.registration_terms = meeting.component.settings.default_registration_terms
17
17
  meeting.save!
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ChangeTypesAndRegistrationTypesOnMeetings < ActiveRecord::Migration[6.1]
4
+ class Meeting < ApplicationRecord
5
+ self.table_name = :decidim_meetings_meetings
6
+
7
+ TYPE_OF_MEETING = { in_person: 0, online: 10, hybrid: 20 }.freeze
8
+ REGISTRATION_TYPES = { registration_disabled: 0, on_this_platform: 10, on_different_platform: 20 }.freeze
9
+ end
10
+
11
+ def up
12
+ rename_column :decidim_meetings_meetings, :type_of_meeting, :old_type_of_meeting
13
+ rename_column :decidim_meetings_meetings, :registration_type, :old_registration_type
14
+ add_column :decidim_meetings_meetings, :type_of_meeting, :integer, default: 0, null: false
15
+ add_column :decidim_meetings_meetings, :registration_type, :integer, default: 0, null: false
16
+
17
+ Meeting.reset_column_information
18
+
19
+ Meeting::TYPE_OF_MEETING.each_pair do |status, index|
20
+ Meeting.where(old_type_of_meeting: status).update_all(type_of_meeting: index) # rubocop:disable Rails/SkipsModelValidations
21
+ end
22
+ Meeting::REGISTRATION_TYPES.each_pair do |status, index|
23
+ Meeting.where(old_registration_type: status).update_all(registration_type: index) # rubocop:disable Rails/SkipsModelValidations
24
+ end
25
+
26
+ remove_column :decidim_meetings_meetings, :old_type_of_meeting
27
+ remove_column :decidim_meetings_meetings, :old_registration_type
28
+ end
29
+
30
+ def down
31
+ rename_column :decidim_meetings_meetings, :type_of_meeting, :old_type_of_meeting
32
+ rename_column :decidim_meetings_meetings, :registration_type, :old_registration_type
33
+
34
+ add_column :decidim_meetings_meetings, :type_of_meeting, :string, default: null
35
+ add_column :decidim_meetings_meetings, :registration_type, :string, default: null
36
+
37
+ Meeting.reset_column_information
38
+
39
+ Meeting::TYPE_OF_MEETING.each_pair do |status, index|
40
+ Meeting.where(old_type_of_meeting: index).update_all(type_of_meeting: status) # rubocop:disable Rails/SkipsModelValidations
41
+ end
42
+ Meeting::REGISTRATION_TYPES.each_pair do |status, index|
43
+ Meeting.where(old_registration_type: index).update_all(registration_type: status) # rubocop:disable Rails/SkipsModelValidations
44
+ end
45
+
46
+ remove_column :decidim_meetings_meetings, :old_type_of_meeting
47
+ remove_column :decidim_meetings_meetings, :old_registration_type
48
+ end
49
+ end
@@ -31,8 +31,8 @@ module Decidim
31
31
  end
32
32
  end
33
33
  resources :agenda, except: [:index, :destroy]
34
- resources :attachment_collections
35
- resources :attachments
34
+ resources :attachment_collections, except: [:show]
35
+ resources :attachments, except: [:show]
36
36
  resources :copies, controller: "meeting_copies", only: [:new, :create]
37
37
  resource :poll, only: [:edit, :update], controller: "meetings_poll"
38
38
  end
@@ -1,18 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "decidim/components/namer"
4
-
5
3
  Decidim.register_component(:meetings) do |component|
6
4
  component.engine = Decidim::Meetings::Engine
7
5
  component.admin_engine = Decidim::Meetings::AdminEngine
8
6
  component.icon = "media/images/decidim_meetings.svg"
7
+ component.icon_key = "map-pin-line"
9
8
  component.permissions_class_name = "Decidim::Meetings::Permissions"
10
9
 
11
10
  component.query_type = "Decidim::Meetings::MeetingsType"
12
11
  component.data_portable_entities = ["Decidim::Meetings::Registration"]
13
12
 
14
13
  component.on(:before_destroy) do |instance|
15
- raise StandardError, "Can't remove this component" if Decidim::Meetings::Meeting.where(component: instance).any?
14
+ raise StandardError, "Cannot remove this component" if Decidim::Meetings::Meeting.where(component: instance).any?
16
15
  end
17
16
 
18
17
  component.register_resource(:meeting) do |resource|
@@ -97,220 +96,9 @@ Decidim.register_component(:meetings) do |component|
97
96
  end
98
97
 
99
98
  component.seeds do |participatory_space|
100
- admin_user = Decidim::User.find_by(
101
- organization: participatory_space.organization,
102
- email: "admin@example.org"
103
- )
104
-
105
- params = {
106
- name: Decidim::Components::Namer.new(participatory_space.organization.available_locales, :meetings).i18n_name,
107
- published_at: Time.current,
108
- manifest_name: :meetings,
109
- participatory_space: participatory_space
110
- }
111
-
112
- component = Decidim.traceability.perform_action!(
113
- "publish",
114
- Decidim::Component,
115
- admin_user,
116
- visibility: "all"
117
- ) do
118
- Decidim::Component.create!(params)
119
- end
120
-
121
- if participatory_space.scope
122
- scopes = participatory_space.scope.descendants
123
- global = participatory_space.scope
124
- else
125
- scopes = participatory_space.organization.scopes
126
- global = nil
127
- end
128
-
129
- 2.times do
130
- start_time = Faker::Date.between(from: 20.weeks.ago, to: 20.weeks.from_now)
131
- end_time = start_time + [rand(1..4).hours, rand(1..20).days].sample
132
- params = {
133
- component: component,
134
- scope: Faker::Boolean.boolean(true_ratio: 0.5) ? global : scopes.sample,
135
- category: participatory_space.categories.sample,
136
- title: Decidim::Faker::Localized.sentence(word_count: 2),
137
- description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
138
- Decidim::Faker::Localized.paragraph(sentence_count: 3)
139
- end,
140
- location: Decidim::Faker::Localized.sentence,
141
- location_hints: Decidim::Faker::Localized.sentence,
142
- start_time: start_time,
143
- end_time: end_time,
144
- address: "#{Faker::Address.street_address} #{Faker::Address.zip} #{Faker::Address.city}",
145
- latitude: Faker::Address.latitude,
146
- longitude: Faker::Address.longitude,
147
- registrations_enabled: [true, false].sample,
148
- available_slots: (10..50).step(10).to_a.sample,
149
- author: participatory_space.organization,
150
- registration_terms: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
151
- Decidim::Faker::Localized.paragraph(sentence_count: 3)
152
- end,
153
- published_at: Faker::Boolean.boolean(true_ratio: 0.8) ? Time.current : nil
154
- }
155
-
156
- _hybrid_meeting = Decidim.traceability.create!(
157
- Decidim::Meetings::Meeting,
158
- admin_user,
159
- params.merge(
160
- title: Decidim::Faker::Localized.sentence(word_count: 2),
161
- type_of_meeting: :hybrid,
162
- online_meeting_url: "http://example.org"
163
- ),
164
- visibility: "all"
165
- )
166
-
167
- _online_meeting = Decidim.traceability.create!(
168
- Decidim::Meetings::Meeting,
169
- admin_user,
170
- params.merge(
171
- title: Decidim::Faker::Localized.sentence(word_count: 2),
172
- type_of_meeting: :online,
173
- online_meeting_url: "http://example.org"
174
- ),
175
- visibility: "all"
176
- )
177
-
178
- meeting = Decidim.traceability.create!(
179
- Decidim::Meetings::Meeting,
180
- admin_user,
181
- params,
182
- visibility: "all"
183
- )
184
-
185
- 2.times do
186
- Decidim::Meetings::Service.create!(
187
- meeting: meeting,
188
- title: Decidim::Faker::Localized.sentence(word_count: 2),
189
- description: Decidim::Faker::Localized.sentence(word_count: 5)
190
- )
191
- end
192
-
193
- Decidim::Forms::Questionnaire.create!(
194
- title: Decidim::Faker::Localized.paragraph,
195
- description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
196
- Decidim::Faker::Localized.paragraph(sentence_count: 3)
197
- end,
198
- tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
199
- Decidim::Faker::Localized.paragraph(sentence_count: 2)
200
- end,
201
- questionnaire_for: meeting
202
- )
99
+ require "decidim/meetings/seeds"
203
100
 
204
- 2.times do |n|
205
- email = "meeting-registered-user-#{meeting.id}-#{n}@example.org"
206
- name = "#{Faker::Name.name} #{meeting.id} #{n}"
207
- user = Decidim::User.find_or_initialize_by(email: email)
208
-
209
- user.update!(
210
- password: "decidim123456789",
211
- password_confirmation: "decidim123456789",
212
- name: name,
213
- nickname: Faker::Twitter.unique.screen_name,
214
- organization: component.organization,
215
- tos_agreement: "1",
216
- confirmed_at: Time.current,
217
- personal_url: Faker::Internet.url,
218
- about: Faker::Lorem.paragraph(sentence_count: 2)
219
- )
220
-
221
- Decidim::Meetings::Registration.create!(
222
- meeting: meeting,
223
- user: user
224
- )
225
- end
226
-
227
- attachment_collection = Decidim::AttachmentCollection.create!(
228
- name: Decidim::Faker::Localized.word,
229
- description: Decidim::Faker::Localized.sentence(word_count: 5),
230
- collection_for: meeting
231
- )
232
-
233
- Decidim::Attachment.create!(
234
- title: Decidim::Faker::Localized.sentence(word_count: 2),
235
- description: Decidim::Faker::Localized.sentence(word_count: 5),
236
- attachment_collection: attachment_collection,
237
- attached_to: meeting,
238
- content_type: "application/pdf",
239
- file: ActiveStorage::Blob.create_and_upload!(
240
- io: File.open(File.join(__dir__, "seeds", "Exampledocument.pdf")),
241
- filename: "Exampledocument.pdf",
242
- content_type: "application/pdf",
243
- metadata: nil
244
- ) # Keep after attached_to
245
- )
246
- Decidim::Attachment.create!(
247
- title: Decidim::Faker::Localized.sentence(word_count: 2),
248
- description: Decidim::Faker::Localized.sentence(word_count: 5),
249
- attached_to: meeting,
250
- content_type: "image/jpeg",
251
- file: ActiveStorage::Blob.create_and_upload!(
252
- io: File.open(File.join(__dir__, "seeds", "city.jpeg")),
253
- filename: "city.jpeg",
254
- content_type: "image/jpeg",
255
- metadata: nil
256
- ) # Keep after attached_to
257
- )
258
- Decidim::Attachment.create!(
259
- title: Decidim::Faker::Localized.sentence(word_count: 2),
260
- description: Decidim::Faker::Localized.sentence(word_count: 5),
261
- attached_to: meeting,
262
- content_type: "application/pdf",
263
- file: ActiveStorage::Blob.create_and_upload!(
264
- io: File.open(File.join(__dir__, "seeds", "Exampledocument.pdf")),
265
- filename: "Exampledocument.pdf",
266
- content_type: "application/pdf",
267
- metadata: nil
268
- ) # Keep after attached_to
269
- )
270
- end
271
-
272
- authors = [
273
- Decidim::UserGroup.where(decidim_organization_id: participatory_space.decidim_organization_id).verified.sample,
274
- Decidim::User.where(decidim_organization_id: participatory_space.decidim_organization_id).all.sample
275
- ]
276
-
277
- authors.each do |author|
278
- user_group = nil
279
-
280
- if author.is_a?(Decidim::UserGroup)
281
- user_group = author
282
- author = user_group.users.sample
283
- end
284
-
285
- start_time = Faker::Date.between(from: 20.weeks.ago, to: 20.weeks.from_now)
286
- params = {
287
- component: component,
288
- scope: Faker::Boolean.boolean(true_ratio: 0.5) ? global : scopes.sample,
289
- category: participatory_space.categories.sample,
290
- title: Decidim::Faker::Localized.sentence(word_count: 2),
291
- description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
292
- Decidim::Faker::Localized.paragraph(sentence_count: 3)
293
- end,
294
- location: Decidim::Faker::Localized.sentence,
295
- location_hints: Decidim::Faker::Localized.sentence,
296
- start_time: start_time,
297
- end_time: start_time + rand(1..4).hours,
298
- address: "#{Faker::Address.street_address} #{Faker::Address.zip} #{Faker::Address.city}",
299
- latitude: Faker::Address.latitude,
300
- longitude: Faker::Address.longitude,
301
- registrations_enabled: [true, false].sample,
302
- available_slots: (10..50).step(10).to_a.sample,
303
- author: author,
304
- user_group: user_group
305
- }
306
-
307
- Decidim.traceability.create!(
308
- Decidim::Meetings::Meeting,
309
- authors[0],
310
- params,
311
- visibility: "all"
312
- )
313
- end
101
+ Decidim::Meetings::Seeds.new(participatory_space:).call
314
102
  end
315
103
  end
316
104
 
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ module ContentBlocks
6
+ class RegistryManager
7
+ def self.register!
8
+ Decidim.content_blocks.register(:homepage, :upcoming_meetings) do |content_block|
9
+ content_block.cell = "decidim/meetings/content_blocks/highlighted_meetings"
10
+ content_block.public_name_key = "decidim.meetings.content_blocks.upcoming_meetings.name"
11
+ content_block.default!
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "decidim/meetings/content_blocks/registry_manager"
4
+
3
5
  module Decidim
4
6
  module Meetings
5
7
  # This is the engine that runs on the public interface of `decidim-meetings`.
@@ -21,12 +23,8 @@ module Decidim
21
23
  nil
22
24
  end
23
25
 
24
- initializer "decidim.meetings.content_blocks" do
25
- Decidim.content_blocks.register(:homepage, :upcoming_meetings) do |content_block|
26
- content_block.cell = "decidim/meetings/content_blocks/upcoming_meetings"
27
- content_block.public_name_key = "decidim.meetings.content_blocks.upcoming_meetings.name"
28
- content_block.default!
29
- end
26
+ initializer "decidim_meetings_directory.content_blocks" do
27
+ Decidim::Meetings::ContentBlocks::RegistryManager.register!
30
28
  end
31
29
  end
32
30
  end