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
@@ -1,9 +1,29 @@
1
- <%= decidim_form_for(@form, url: update_url, method: :put, html: { class: "form edit_questionnaire" }) do |form| %>
2
- <%= render partial: "decidim/meetings/admin/poll/form", object: form %>
1
+ <% add_decidim_page_title(edit_questionnaire_title) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= edit_questionnaire_title %>
5
+ <% if questionnaire.answers.any? %>
6
+ <div class="button--title">
7
+ <%= export_dropdown(current_component, questionnaire.id) if allowed_to?(:export_answers, :questionnaire) %>
8
+ </div>
9
+ <% else %>
10
+ <button class="button button__sm button__secondary" disabled><%= t("empty", scope: "decidim.forms.admin.questionnaires.answers") %></button>
11
+ <% end %>
12
+ </h2>
13
+ </div>
3
14
 
4
- <% if questionnaire.questions_editable? %>
5
- <div class="button--double form-general-submit">
6
- <%= form.submit t("save", scope: "decidim.forms.admin.questionnaires.edit"), class: "button" %>
7
- </div>
8
- <% end %>
9
- <% end %>
15
+ <div class="item__edit item__edit-1col">
16
+ <div class="item__edit-form">
17
+ <%= decidim_form_for(@form, url: update_url, method: :put, html: { class: "form-defaults form edit_questionnaire" }) do |form| %>
18
+ <%= render partial: "decidim/meetings/admin/poll/form", object: form %>
19
+
20
+ <% if questionnaire.questions_editable? %>
21
+ <div class="item__edit-sticky">
22
+ <div class="item__edit-sticky-container">
23
+ <%= form.submit t("save", scope: "decidim.forms.admin.questionnaires.edit"), class: "button button__sm button__secondary" %>
24
+ </div>
25
+ </div>
26
+ <% end %>
27
+ <% end %>
28
+ </div>
29
+ </div>
@@ -1,59 +1,36 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title">
4
- <%= t(".title") %>
5
- <%= link_to t(".invites"), meeting_registrations_invites_path(meeting), class: "button tiny button--title #{'disabled' unless allowed_to? :read_invites, :meeting, meeting: meeting}" %>
6
- <% if allowed_to? :export_registrations, :meeting, meeting: meeting %>
7
- <span class="exports dropdown tiny button button--simple button--title" data-toggle="export-dropdown"><%= t "actions.export", scope: "decidim.admin" %></span>
8
- <div class="dropdown-pane" id="export-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
9
- <ul class="vertical menu add-components">
10
- <% %w{CSV JSON Excel}.each do |format| %>
11
- <li class="exports--format--<%= format.downcase %> exports--registrations"><%= link_to t("decidim.admin.exports.export_as", name: t("decidim.#{current_component.manifest.name}.admin.exports.registrations"), export_format: format), export_meeting_registrations_path(meeting_id: meeting, format: format) %></li>
12
- <% end %>
13
- </ul>
14
- </div>
15
- <% end %>
16
- <%= link_to t(".registration_form"), edit_meeting_registrations_form_path(meeting_id: meeting.id), class: "button tiny button--title" %>
17
- </h2>
18
- </div>
19
-
20
- <div class="card-section">
21
- <div class="callout alert">
22
- <%= t(".recommendation_message") %>
23
- </div>
24
-
25
- <div class="row column">
26
- <%= form.check_box :registrations_enabled %>
27
- </div>
28
-
29
- <div class="row column">
30
- <%= form.check_box :registration_form_enabled %>
31
- </div>
32
-
33
- <div class="row column">
34
- <p><%= t(".registrations_count", count: meeting.registrations.count) %></p>
35
- <%= form.number_field :available_slots %>
36
- <p class="help-text"><%= t(".available_slots_help") %></p>
37
- </div>
38
-
39
- <div class="row column">
40
- <%= form.number_field :reserved_slots %>
41
- <p class="help-text"><%= t(".reserved_slots_help") %></p>
42
- </div>
43
-
44
- <div class="row column">
45
- <%= form.check_box :customize_registration_email, :"data-toggle" => "customize_registration_email-div" %>
46
- </div>
47
-
48
- <div id="customize_registration_email-div" data-toggler=".hide" class="row column <%= @form.customize_registration_email? ? nil : "hide" %>">
49
- <%= form.translated :editor, :registration_email_custom_content, lines: 10 %>
50
- <p class="help-text"><%= t(".registration_email_help") %></p>
51
- </div>
52
-
53
- <div class="row column">
54
- <%= form.translated :editor, :registration_terms, toolbar: :content %>
1
+ <div class="form__wrapper">
2
+ <div class="card pt-4">
3
+ <div class="card-section">
4
+ <div class="row column">
5
+ <%= form.check_box :registrations_enabled %>
6
+ </div>
7
+
8
+ <div class="row column">
9
+ <%= form.check_box :registration_form_enabled %>
10
+ </div>
11
+
12
+ <div class="row column">
13
+ <p><%= t(".registrations_count", count: meeting.registrations.count) %></p>
14
+ <%= form.number_field :available_slots, help_text: t(".available_slots_help") %>
15
+ </div>
16
+
17
+ <div class="row column">
18
+ <%= form.number_field :reserved_slots, help_text: t(".reserved_slots_help") %>
19
+ </div>
20
+
21
+ <div class="row column">
22
+ <%= form.check_box :customize_registration_email %>
23
+ </div>
24
+
25
+ <div id="customize_registration_email-div" class="row column hidden">
26
+ <%= form.translated :editor, :registration_email_custom_content, lines: 10, help_text: t(".registration_email_help") %>
27
+ </div>
28
+
29
+ <div class="row column">
30
+ <%= form.translated :editor, :registration_terms, toolbar: :content, aria: { label: :registration_terms } %>
31
+ </div>
55
32
  </div>
56
33
  </div>
57
34
  </div>
58
35
 
59
- <%= javascript_pack_tag "decidim_meetings_admin" %>
36
+ <%= append_javascript_pack_tag "decidim_meetings_admin" %>
@@ -1,33 +1,66 @@
1
- <% if meeting.component.settings.registration_code_enabled %>
2
- <div class="card">
3
- <div class="card-divider">
4
- <h2 class="card-title">
5
- <%= t(".validate_registration_code") %>
6
- </h2>
1
+ <% add_decidim_page_title(t("title", scope: "decidim.meetings.admin.registrations.form")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("title", scope: "decidim.meetings.admin.registrations.form") %>
5
+ <div class="flex items-center gap-x-4 ml-auto">
6
+ <%= link_to t("invites", scope: "decidim.meetings.admin.registrations.form"), meeting_registrations_invites_path(meeting), class: "button button__sm button__secondary #{"disabled" unless allowed_to? :read_invites, :meeting, meeting: meeting}" %>
7
+ <% if allowed_to? :export_registrations, :meeting, meeting: meeting %>
8
+ <span class="exports tiny button button__sm button__secondary button--simple button--title" data-toggle="export-dropdown">
9
+ <%= t "actions.export", scope: "decidim.admin" %>
10
+ <%= icon "arrow-down-s-line", class: "dropdown-filter-icon" %>
11
+ </span>
12
+ <div class="dropdown-pane" id="export-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
13
+ <ul class="vertical menu add-components">
14
+ <% %w(CSV JSON Excel).each do |format| %>
15
+ <li class="exports--format--<%= format.downcase %> exports--registrations"><%= link_to t("decidim.admin.exports.export_as", name: t("decidim.#{current_component.manifest.name}.admin.exports.registrations"), export_format: format), export_meeting_registrations_path(meeting_id: meeting, format:) %></li>
16
+ <% end %>
17
+ </ul>
18
+ </div>
19
+ <% end %>
20
+ <%= link_to t("registration_form" , scope: "decidim.meetings.admin.registrations.form"), edit_meeting_registrations_form_path(meeting_id: meeting.id), class: "button button__sm button__secondary" %>
7
21
  </div>
8
- <div class="card-section">
9
- <%= decidim_form_for(@validation_form, url: validate_registration_code_meeting_registrations_path, html: { class: "form validate_meeting_registration_code" }) do |f| %>
10
-
11
- <div class="grid-x grid-margin-x">
12
- <div class="auto cell">
13
- <%= f.text_field :code %>
14
- </div>
22
+ </h2>
23
+ </div>
15
24
 
16
- <div class="shrink cell">
17
- <div class="text-center mt-sm">
18
- <%= f.submit t(".validate") %>
25
+ <div class="item__edit item__edit-1col">
26
+ <div class="item__edit-form">
27
+ <% if meeting.component.settings.registration_code_enabled %>
28
+ <div class="card mb-4">
29
+ <div class="card-divider">
30
+ <h2 class="card-title">
31
+ <%= t(".validate_registration_code") %>
32
+ </h2>
33
+ </div>
34
+ <div class="card-section">
35
+ <%= decidim_form_for(@validation_form, url: validate_registration_code_meeting_registrations_path, html: { class: "form form-defaults validate_meeting_registration_code" }) do |f| %>
36
+ <div class="form__wrapper">
37
+ <div class="card-section">
38
+ <div class="row column">
39
+ <div>
40
+ <%= f.label :code %>
41
+ </div>
42
+ <%= f.text_field :code, label: false %>
43
+ </div>
44
+ <div class="row column">
45
+ <%= f.submit t(".validate"), class: "button button__sm button__secondary" %>
46
+ </div>
47
+ </div>
19
48
  </div>
20
- </div>
49
+ <% end %>
21
50
  </div>
22
- <% end %>
23
- </div>
24
- </div>
25
- <% end %>
51
+ </div>
52
+ <% end %>
26
53
 
27
- <%= decidim_form_for(@form, url: meeting_registrations_path, html: { class: "form edit_meeting_registrations" }) do |f| %>
28
- <%= render partial: "form", object: f %>
54
+ <%= cell("decidim/announcement", t("recommendation_message", scope: "decidim.meetings.admin.registrations.form"), callout_class: "warning" ) %>
29
55
 
30
- <div class="button--double form-general-submit">
31
- <%= f.submit t(".save") %>
56
+ <%= decidim_form_for(@form, url: meeting_registrations_path, html: { class: "form-defaults form edit_meeting_registrations mt-4" }) do |f| %>
57
+ <%= render partial: "form", object: f %>
58
+
59
+ <div class="item__edit-sticky">
60
+ <div class="item__edit-sticky-container">
61
+ <%= f.submit t(".save"), class: "button button__sm button__secondary" %>
62
+ </div>
63
+ </div>
64
+ <% end %>
32
65
  </div>
33
- <% end %>
66
+ </div>
@@ -1,20 +1,15 @@
1
- <% add_decidim_page_title(t(".meetings")) %>
2
-
3
- <div class="wrapper">
4
- <div class="row">
5
- <h1 class="section-heading" id="meetings-count">
6
- <%= render partial: "decidim/meetings/meetings/count" %>
7
- </h1>
8
-
9
- <%= cell "decidim/meetings/meetings_map", search.result %>
10
-
11
- <div class="columns mediumlarge-4 large-3">
12
- <div class="card card--secondary show-for-mediumlarge">
13
- <%= render partial: "filters" %>
14
- </div>
15
- </div>
16
- <div id="meetings" class="columns mediumlarge-8 large-9">
17
- <%= render partial: "meetings" %>
18
- </div>
19
- </div>
20
- </div>
1
+ <%= render partial: "decidim/meetings/shared/index", locals: {
2
+ display_map: Decidim::Map.available?(:geocoding, :dynamic),
3
+ display_announcement: false,
4
+ component: nil,
5
+ search_variable: :title_or_description_cont,
6
+ filter_options: {
7
+ date: !@forced_past_meetings,
8
+ type: true,
9
+ directory_scopes: true,
10
+ directory_categories: true,
11
+ origin: true,
12
+ space_type: true,
13
+ activity: current_user.present?
14
+ }
15
+ } %>
@@ -1,23 +1 @@
1
- var $meetings = $('#meetings');
2
- var $meetingsCount = $('#meetings-count');
3
-
4
- // make sure that calendar modal will use the updated filter values
5
- var $calendarShare = $('#calendarShare');
6
- $calendarShare.remove();
7
-
8
- $meetings.html('<%= j(render partial: "meetings").strip.html_safe %>');
9
- $meetingsCount.html('<%= j(render partial: "decidim/meetings/meetings/count").strip.html_safe %>');
10
-
11
- var $dropdownMenu = $('.dropdown.menu', $meetings);
12
- $dropdownMenu.foundation();
13
-
14
- $("#calendarShare").foundation(); // initialize export calendar on the page
15
-
16
- var markerData = JSON.parse('<%= escape_javascript meetings_data_for_map(search.result).to_json.html_safe %>');
17
-
18
- var $map = $("#map");
19
- var controller = $map.data("map-controller");
20
- if (controller) {
21
- controller.clearMarkers();
22
- controller.addMarkers(markerData);
23
- }
1
+ <%= render partial: "decidim/meetings/shared/index", locals: { component: nil } %>
@@ -0,0 +1,8 @@
1
+ <div class="meeting__aside-block">
2
+ <div class="meeting__aside-block__item">
3
+ <%= icon emoji || "question-line", class: "text-gray fill-current" %>
4
+ <div>
5
+ <%= yield %>
6
+ </div>
7
+ </div>
8
+ </div>
@@ -3,43 +3,42 @@
3
3
  <head>
4
4
  <title><%= decidim_page_title %></title>
5
5
  <%= render partial: "layouts/decidim/head" %>
6
+
7
+ <%= append_javascript_pack_tag "decidim_meetings" %>
8
+ <%= append_javascript_pack_tag "decidim_forms" %>
9
+ <%= stylesheet_pack_tag "decidim_meetings", media: "all" %>
10
+ <%= stylesheet_pack_tag "decidim_forms", media: "all" %>
6
11
  </head>
7
12
 
8
- <body>
13
+ <body class="meeting-polls__body">
9
14
  <%= render partial: "layouts/decidim/timeout_modal" %>
10
- <%= render partial: "layouts/decidim/data_consent_warning" %>
11
- <%= cell("decidim/data_consent", current_organization) %>
12
15
 
13
16
  <header class="meeting-polls__header">
14
17
  <% if current_user && poll %>
15
- <div class="flex--cc">
16
- <button class="meeting-polls__button meeting-polls__action-list">
17
- <%= t(".questions") %> <span id="visible-questions-count">(<%= questionnaire.questions.visible.count %>)</span>
18
+ <div class="flex gap-2">
19
+ <button class="button button__sm button__secondary meeting-polls__action-list">
20
+ <%= t("questions", scope: "decidim.meetings.layouts.live_event") %> <span id="visible-questions-count">(<%= questionnaire.questions.visible.count %>)</span>
18
21
  </button>
19
22
 
20
23
  <% if admin_allowed_to?(:update, :poll, meeting: meeting, poll: poll) %>
21
- <button class="meeting-polls__button meeting-polls__action-administrate"><%= t(".administrate") %></button>
24
+ <button class="button button__sm button__secondary meeting-polls__action-administrate"><%= t("administrate", scope: "decidim.meetings.layouts.live_event") %></button>
22
25
  <% end %>
23
26
  </div>
24
27
  <% end %>
25
28
 
26
29
  <div>
27
- <strong class="text-secondary"><%= current_organization.name %></strong> / <strong><%= present(meeting).title(links: true, html_escape: true) %></strong>
30
+ <strong class="text-secondary"><%= current_organization.name %></strong> / <strong><%= present(meeting).title(links: true, html_escape: true ) %></strong>
28
31
  </div>
29
32
 
30
- <div class="flex--cc">
33
+ <div class="flex gap-10">
31
34
  <% if current_user %>
32
- <span>
33
- <%= link_to current_user.name, decidim.account_path, target: "_blank", "aria-label": t("layouts.decidim.user_menu.account", name: current_user.name) %>
34
- </span>
35
+ <%= link_to current_user.name, decidim.account_path, target: "_blank", class: "button button__sm button__text-secondary", data: { "external-link": false }, "aria-label": t("layouts.decidim.user_menu.account", name: current_user.name) %>
35
36
  <% end %>
36
37
 
37
- <span class="meeting-polls__close">
38
- <%= link_to meeting_path(meeting), "aria-label": t(".close") do %>
39
- <%= t(".close") %>
40
- <%= icon "x", class: "text-small" %>
41
- <% end %>
42
- </span>
38
+ <%= link_to meeting_path(meeting), class: "button button__sm button__text-secondary", "aria-label": t("close", scope: "decidim.meetings.layouts.live_event") do %>
39
+ <span><%= t("close", scope: "decidim.meetings.layouts.live_event") %></span>
40
+ <%= icon "close-line" %>
41
+ <% end %>
43
42
  </div>
44
43
  </header>
45
44
 
@@ -49,7 +48,9 @@
49
48
  <%= yield %>
50
49
  </main>
51
50
 
51
+ <%= render partial: "layouts/decidim/data_consent_warning" %>
52
+ <%= cell("decidim/data_consent", current_organization) %>
52
53
  <%= render partial: "layouts/decidim/decidim_javascript" %>
53
- <%= javascript_pack_tag "decidim_meetings" %>
54
+
54
55
  </body>
55
56
  </html>
@@ -1,12 +1,11 @@
1
1
  <% provide(:title, present(meeting).title) %>
2
2
 
3
3
  <% add_decidim_meta_tags({
4
- title: present(meeting).title,
5
- description: present(meeting).description,
6
- url: meeting_url(meeting.id)
7
- }) %>
4
+ title: present(meeting).title,
5
+ description: present(meeting).description,
6
+ url: meeting_url(meeting.id)
7
+ }) %>
8
8
 
9
- <aside class="meeting-polls__aside"></aside>
10
9
  <div class="meeting-polls__iframe">
11
10
  <%== live_meeting_embed_code %>
12
11
  </div>
@@ -1,14 +1,7 @@
1
- <div class="field hashtags__container">
2
- <%= text_editor_for(form, :closing_report, hashtaggable: true) %>
3
- </div>
1
+ <%= text_editor_for(form, :closing_report, hashtaggable: true) %>
4
2
 
5
- <div class="field hashtags__container">
6
- <%= form.number_field :attendees_count, min: 0 %>
7
- <div class="help-text help-text-form-required-fields"><%= t("decidim.forms.meetings.attendees_count_help_text") %></div>
8
- </div>
3
+ <%= form.number_field :attendees_count, min: 0, help_text: t("decidim.forms.meetings.attendees_count_help_text") %>
9
4
 
10
5
  <% if Decidim::Meetings.enable_proposal_linking %>
11
- <div class="field hashtags__container">
12
- <%= proposals_picker(form, :proposals, proposals_picker_meeting_meeting_closes_path(meeting)) %>
13
- </div>
6
+ <%= render partial: "decidim/proposals/proposals/proposals_picker", locals: { form:, field: :proposals } %>
14
7
  <% end %>
@@ -1,25 +1,21 @@
1
- <div class="row">
2
- <div class="columns large-3">
3
- <%= link_to :back do %>
4
- <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
5
- <%= t(".back") %>
6
- <% end %>
1
+ <%= render layout: "layouts/decidim/shared/layout_center" do %>
2
+ <div class="text-center py-10">
3
+ <h1 class="title-decorator inline-block text-left">
4
+ <%= t("title", scope: "decidim.meetings.meeting_closes.edit") %>
5
+ </h1>
7
6
  </div>
8
7
 
9
- <div class="columns large-6">
10
- <h2 class="section-heading"><%= t(".title") %></h2>
11
- <div class="card">
12
- <div class="card__content">
13
- <%= decidim_form_for(@form, url: meeting_meeting_close_path(meeting, @form), html: { class: "form edit_close_meeting" }) do |f| %>
14
- <%= render partial: "form", object: f, locals: { title: t(".title") } %>
15
-
16
- <div class="button--double form-general-submit">
17
- <%= f.submit t(".close") %>
18
- </div>
19
- <% end %>
20
- </div>
8
+ <%= decidim_form_for(@form, url: meeting_meeting_close_path(meeting, @form), html: { class: "form edit_close_meeting" }) do |f| %>
9
+ <div class="form__wrapper">
10
+ <%= render partial: "form", object: f %>
21
11
  </div>
22
- </div>
23
12
 
24
- <div class="columns large-3"></div>
25
- </div>
13
+ <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
14
+ <%= link_to :back, class: "button button__sm md:button__lg button__text-secondary" do %>
15
+ <%= icon "arrow-left-line" %>
16
+ <%= t("back", scope: "decidim.meetings.meeting_closes.edit") %>
17
+ <% end %>
18
+ <%= f.submit t("close", scope: "decidim.meetings.meeting_closes.edit"), class: "button button__sm md:button__lg button__secondary" %>
19
+ </div>
20
+ <% end %>
21
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <div>
2
+ <%= cell "decidim/comments_button", nil %>
3
+ </div>
4
+ <div class="ml-auto">
5
+ <%= cell "decidim/tags", meeting %>
6
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= decidim_modal id: "calendarShare_#{id}", class: "calendar-modal" do %>
2
+ <div data-dialog-container>
3
+ <%= icon "calendar-check-line" %>
4
+ <h2 id="dialog-title-calendarShare" data-dialog-title><%= t("add_to_calendar", scope: "decidim.meetings.meetings.calendar_modal") %></h2>
5
+ <ul class="space-y-4 mt-4">
6
+ <li>
7
+ <%= link_to t("outlook", scope: "decidim.meetings.meetings.calendar_modal"), ics_url, class: "text-secondary underline" %>
8
+ </li>
9
+ <li>
10
+ <%= link_to t("apple", scope: "decidim.meetings.meetings.calendar_modal"), ics_url, class: "text-secondary underline" %>
11
+ </li>
12
+ <li>
13
+ <%= link_to t("google", scope: "decidim.meetings.meetings.calendar_modal"), google_url, target: "_blank", class: "text-secondary underline", data: { "external-link": false } %>
14
+ </li>
15
+ </ul>
16
+ </div>
17
+ <% end %>
@@ -14,39 +14,35 @@
14
14
  </div>
15
15
 
16
16
  <div class="field" data-meeting-type="in_person">
17
- <%= form.geocoding_field :address, input_html: { required: false } %>
18
- <p class="help-text"><%= t(".address_help") %></p>
17
+ <%= form.geocoding_field :address, input_html: { required: false }, help_text: t(".address_help") %>
19
18
  </div>
20
19
 
21
20
  <div class="field" data-meeting-type="in_person">
22
- <%= form.text_area :location %>
23
- <p class="help-text"><%= t(".location_help") %></p>
21
+ <%= form.text_area :location, help_text: t(".location_help") %>
24
22
  </div>
25
23
 
26
24
  <div class="field">
27
- <%= form.text_area :location_hints %>
28
- <p class="help-text"><%= t(".location_hints_help") %></p>
25
+ <%= form.text_area :location_hints, help_text: t(".location_hints_help") %>
29
26
  </div>
30
27
 
31
28
  <div class="field" data-meeting-type="online">
32
- <%= form.text_field :online_meeting_url %>
33
- <p class="help-text"><%= t(".online_meeting_url_help") %></p>
29
+ <%= form.text_field :online_meeting_url, help_text: t(".online_meeting_url_help") %>
34
30
  </div>
35
31
 
36
- <div class="iframe-fields">
37
- <div class="field" data-meeting-type="online">
38
- <%= form.select :iframe_embed_type,
39
- @form.iframe_embed_type_select,
40
- { multiple: false } %>
41
- <p class="help-text"><%= t(".show_embedded_iframe_help", domains: Decidim::Meetings.embeddable_services&.join(" ")) %></p>
42
- </div>
43
-
44
- <div class="field iframe-fields--access-level" id="meeting_iframe_embed_type" data-meeting-type="online-access-level">
45
- <%= form.select :iframe_access_level,
46
- @form.iframe_access_level_select,
47
- { include_blank: t(".select_an_iframe_access_level") },
48
- { multiple: false } %>
49
- </div>
32
+ <div class="field" data-meeting-type="online">
33
+ <%= form.select :iframe_embed_type,
34
+ @form.iframe_embed_type_select,
35
+ {
36
+ multiple: false,
37
+ help_text: t(".iframe_embed_type_html", domains: Decidim::Meetings.embeddable_services&.join(" "))
38
+ } %>
39
+ </div>
40
+
41
+ <div class="field iframe-fields--access-level" id="meeting_iframe_embed_type" data-meeting-type="online-access-level">
42
+ <%= form.select :iframe_access_level,
43
+ @form.iframe_access_level_select,
44
+ { include_blank: t(".select_an_iframe_access_level") },
45
+ { multiple: false } %>
50
46
  </div>
51
47
 
52
48
  <div class="field">
@@ -59,7 +55,7 @@
59
55
 
60
56
  <% if current_participatory_space.has_subscopes? %>
61
57
  <div class="field">
62
- <%= scopes_picker_field form, :decidim_scope_id %>
58
+ <%= scopes_select_field form, :decidim_scope_id %>
63
59
  </div>
64
60
  <% end %>
65
61
 
@@ -69,14 +65,13 @@
69
65
 
70
66
  <div class="row column">
71
67
  <%= form.select :registration_type,
72
- @form.registration_type_select,
73
- { include_blank: t(".select_a_registration_type") },
74
- { multiple: false } %>
68
+ @form.registration_type_select,
69
+ { include_blank: t(".select_a_registration_type") },
70
+ { multiple: false } %>
75
71
  </div>
76
72
 
77
73
  <div class="row column" id="meeting_available_slots">
78
- <%= form.number_field :available_slots %>
79
- <p class="help-text"><%= t(".available_slots_help") %></p>
74
+ <%= form.number_field :available_slots, help_text: t(".available_slots_help") %>
80
75
  </div>
81
76
 
82
77
  <div class="field" id="meeting_registration_terms">
@@ -84,20 +79,17 @@
84
79
  </div>
85
80
 
86
81
  <div class="field" id="meeting_registration_url">
87
- <%= form.text_field :registration_url %>
88
- <p class="help-text"><%= t(".registration_url_help") %></p>
82
+ <%= form.text_field :registration_url, help_text: t(".registration_url_help") %>
89
83
  <label><%= t(".disclaimer", organization: current_component.organization.name) %></label><br>
90
84
  </div>
91
85
 
92
86
  <div class="field">
93
87
  <%= form.select(
94
88
  :user_group_id,
95
- Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.map{|g| [g.name, g.id]},
89
+ Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.map { |g| [g.name, g.id] },
96
90
  prompt: current_user.name,
97
91
  label: t(".create_as")
98
92
  ) %>
99
93
  </div>
100
94
 
101
- <% content_for :js_content do %>
102
- <%= javascript_pack_tag "decidim_meetings" %>
103
- <% end %>
95
+ <%= append_javascript_pack_tag "decidim_meetings" %>
@@ -1,22 +1,3 @@
1
- <div class="row small-up-1 medium-up-2 card-grid">
2
- <% resources.each do |meeting| %>
3
- <div class="column">
4
- <div class="card card--meeting">
5
- <div class="card__content">
6
- <%= link_to resource_locator(meeting).path, class: "card__link" do %>
7
- <h5 class="card__title"><%= present(meeting).title(html_escape: true) %></h5>
8
- <% end %>
9
- <div class="card__datetime">
10
- <div class="card__datetime__date">
11
- <%= l meeting.start_time, format: "%d" %> <span class="card__datetime__month"><%= l meeting.start_time, format: "%B %Y" %></span>
12
- </div>
13
- <div class="card__datetime__time">
14
- <%= meeting.start_time.strftime("%H:%M") %> - <%= meeting.end_time.strftime("%H:%M") %>
15
- </div>
16
- </div>
17
- <%= decidim_sanitize_editor present(meeting).description(strip_tags: true) %>
18
- </div>
19
- </div>
20
- </div>
21
- <% end %>
22
- </div>
1
+ <% resources.each do |meeting| %>
2
+ <%= cell "decidim/meetings/meeting_l", meeting, url_extra_params: { included_in: resource.to_gid } %>
3
+ <% end %>