decidim-meetings 0.24.3 → 0.25.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/meetings/join_meeting_button/registration_confirm.erb +6 -0
  3. data/app/cells/decidim/meetings/join_meeting_button/show.erb +8 -6
  4. data/app/cells/decidim/meetings/meeting_m_cell.rb +4 -0
  5. data/app/cells/decidim/meetings/meeting_url/show.erb +7 -2
  6. data/app/cells/decidim/meetings/meeting_url_cell.rb +14 -2
  7. data/app/cells/decidim/meetings/meetings_map/show.erb +1 -1
  8. data/app/cells/decidim/meetings/online_meeting_cell.rb +36 -0
  9. data/app/cells/decidim/meetings/online_meeting_link/show.erb +44 -0
  10. data/app/cells/decidim/meetings/online_meeting_link_cell.rb +27 -0
  11. data/app/cells/decidim/meetings/public_participants_list/show.erb +16 -0
  12. data/app/cells/decidim/meetings/public_participants_list_cell.rb +31 -0
  13. data/app/cells/decidim/meetings/question_responses/show.erb +7 -0
  14. data/app/cells/decidim/meetings/question_responses_cell.rb +72 -0
  15. data/app/commands/decidim/meetings/admin/close_meeting.rb +3 -0
  16. data/app/commands/decidim/meetings/admin/copy_meeting.rb +0 -9
  17. data/app/commands/decidim/meetings/admin/create_meeting.rb +4 -20
  18. data/app/commands/decidim/meetings/admin/destroy_meeting.rb +2 -0
  19. data/app/commands/decidim/meetings/admin/publish_meeting.rb +72 -0
  20. data/app/commands/decidim/meetings/admin/unpublish_meeting.rb +45 -0
  21. data/app/commands/decidim/meetings/admin/update_meeting.rb +6 -3
  22. data/app/commands/decidim/meetings/admin/update_question_status.rb +57 -0
  23. data/app/commands/decidim/meetings/admin/update_questionnaire.rb +93 -0
  24. data/app/commands/decidim/meetings/close_meeting.rb +2 -0
  25. data/app/commands/decidim/meetings/create_answer.rb +52 -0
  26. data/app/commands/decidim/meetings/create_meeting.rb +3 -1
  27. data/app/commands/decidim/meetings/join_meeting.rb +2 -1
  28. data/app/commands/decidim/meetings/update_meeting.rb +2 -1
  29. data/app/controllers/concerns/decidim/meetings/admin/filterable.rb +55 -0
  30. data/app/controllers/concerns/decidim/meetings/polls_resources.rb +29 -0
  31. data/app/controllers/decidim/meetings/admin/application_controller.rb +6 -2
  32. data/app/controllers/decidim/meetings/admin/invites_controller.rb +0 -2
  33. data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +1 -1
  34. data/app/controllers/decidim/meetings/admin/meetings_controller.rb +46 -1
  35. data/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb +107 -0
  36. data/app/controllers/decidim/meetings/calendars_controller.rb +8 -0
  37. data/app/controllers/decidim/meetings/live_events_controller.rb +29 -0
  38. data/app/controllers/decidim/meetings/meeting_closes_controller.rb +1 -1
  39. data/app/controllers/decidim/meetings/polls/answers_controller.rb +37 -0
  40. data/app/controllers/decidim/meetings/polls/questions_controller.rb +45 -0
  41. data/app/events/decidim/meetings/create_meeting_event.rb +16 -0
  42. data/app/forms/decidim/meetings/admin/answer_option_form.rb +24 -0
  43. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +3 -1
  44. data/app/forms/decidim/meetings/admin/meeting_form.rb +12 -1
  45. data/app/forms/decidim/meetings/admin/question_form.rb +44 -0
  46. data/app/forms/decidim/meetings/admin/questionnaire_form.rb +19 -0
  47. data/app/forms/decidim/meetings/answer_choice_form.rb +14 -0
  48. data/app/forms/decidim/meetings/answer_form.rb +65 -0
  49. data/app/forms/decidim/meetings/close_meeting_form.rb +4 -0
  50. data/app/forms/decidim/meetings/join_meeting_form.rb +1 -0
  51. data/app/forms/decidim/meetings/meeting_form.rb +9 -0
  52. data/app/helpers/decidim/meetings/admin/filterable_helper.rb +13 -0
  53. data/app/helpers/decidim/meetings/application_helper.rb +3 -2
  54. data/app/helpers/decidim/meetings/meetings_helper.rb +21 -0
  55. data/app/models/decidim/meetings/answer.rb +48 -0
  56. data/app/models/decidim/meetings/answer_choice.rb +15 -0
  57. data/app/models/decidim/meetings/answer_option.rb +24 -0
  58. data/app/models/decidim/meetings/meeting.rb +88 -42
  59. data/app/models/decidim/meetings/poll.rb +19 -0
  60. data/app/models/decidim/meetings/question.rb +54 -0
  61. data/app/models/decidim/meetings/questionnaire.rb +23 -0
  62. data/app/models/decidim/meetings/registration.rb +2 -0
  63. data/app/packs/entrypoints/decidim_meetings.js +6 -0
  64. data/app/packs/entrypoints/decidim_meetings_admin.js +5 -0
  65. data/app/{assets/images/decidim/gamification/badges/attended_meetings.svg → packs/images/decidim/gamification/badges/decidim_gamification_badges_attended_meetings.svg} +0 -0
  66. data/app/{assets/images/decidim/meetings/icon.svg → packs/images/decidim/meetings/decidim_meetings.svg} +0 -0
  67. data/app/packs/src/decidim/meetings/admin/agendas.js +159 -0
  68. data/app/{assets/javascripts/decidim/meetings/admin/destroy_meeting_alert.js.es6 → packs/src/decidim/meetings/admin/destroy_meeting_alert.js} +0 -0
  69. data/app/{assets/javascripts/decidim/meetings/admin/meetings_form.js.es6 → packs/src/decidim/meetings/admin/meetings_form.js} +7 -4
  70. data/app/{assets/javascripts/decidim/meetings/admin/registrations_form.js.es6 → packs/src/decidim/meetings/admin/registrations_form.js} +0 -0
  71. data/app/{assets/javascripts/decidim/meetings/admin/registrations_invite_form.es6 → packs/src/decidim/meetings/admin/registrations_invite_form.js} +3 -3
  72. data/app/packs/src/decidim/meetings/meetings_form.js +54 -0
  73. data/app/packs/src/decidim/meetings/meetings_polls.js +41 -0
  74. data/app/packs/src/decidim/meetings/poll.component.js +166 -0
  75. data/app/packs/stylesheets/decidim/meetings/_header.scss +52 -0
  76. data/app/packs/stylesheets/decidim/meetings/_main.scss +178 -0
  77. data/app/packs/stylesheets/decidim/meetings/_meetings.scss +2 -0
  78. data/app/permissions/decidim/meetings/admin/permissions.rb +16 -8
  79. data/app/permissions/decidim/meetings/permissions.rb +42 -17
  80. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +5 -1
  81. data/app/presenters/decidim/meetings/meeting_presenter.rb +25 -25
  82. data/app/queries/decidim/meetings/filtered_meetings.rb +1 -1
  83. data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +1 -1
  84. data/app/queries/decidim/meetings/questionnaire_user_answers.rb +29 -0
  85. data/app/serializers/decidim/meetings/data_portability_invite_serializer.rb +2 -1
  86. data/app/serializers/decidim/meetings/data_portability_registration_serializer.rb +2 -1
  87. data/app/serializers/decidim/meetings/registration_serializer.rb +3 -12
  88. data/app/services/decidim/meetings/calendar/component_calendar.rb +2 -2
  89. data/app/services/decidim/meetings/calendar/meeting_calendar.rb +33 -0
  90. data/app/services/decidim/meetings/calendar_renderer.rb +2 -0
  91. data/app/services/decidim/meetings/meeting_iframe_embedder.rb +86 -0
  92. data/app/services/decidim/meetings/meeting_search.rb +2 -2
  93. data/app/views/decidim/meetings/admin/agenda/_form.html.erb +1 -1
  94. data/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +4 -4
  95. data/app/views/decidim/meetings/admin/invites/_form.html.erb +1 -1
  96. data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +16 -1
  97. data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +1 -1
  98. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +16 -1
  99. data/app/views/decidim/meetings/admin/meetings/index.html.erb +39 -11
  100. data/app/views/decidim/meetings/admin/poll/_answer_option.html.erb +34 -0
  101. data/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb +7 -0
  102. data/app/views/decidim/meetings/admin/poll/_form.html.erb +63 -0
  103. data/app/views/decidim/meetings/admin/poll/_question.html.erb +96 -0
  104. data/app/views/decidim/meetings/admin/poll/edit.html.erb +9 -0
  105. data/app/views/decidim/meetings/admin/registrations/_form.html.erb +1 -1
  106. data/app/views/decidim/meetings/directory/meetings/index.html.erb +4 -4
  107. data/app/views/decidim/meetings/directory/meetings/index.js.erb +2 -0
  108. data/app/views/decidim/meetings/layouts/live_event.html.erb +50 -0
  109. data/app/views/decidim/meetings/live_events/show.html.erb +12 -0
  110. data/app/views/decidim/meetings/meeting_closes/_form.html.erb +8 -1
  111. data/app/views/decidim/meetings/meeting_closes/edit.html.erb +1 -1
  112. data/app/views/decidim/meetings/meetings/_calendar_modal.html.erb +26 -0
  113. data/app/views/decidim/meetings/meetings/_filters.html.erb +1 -1
  114. data/app/views/decidim/meetings/meetings/_form.html.erb +6 -1
  115. data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +1 -1
  116. data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +7 -18
  117. data/app/views/decidim/meetings/meetings/edit.html.erb +1 -1
  118. data/app/views/decidim/meetings/meetings/index.html.erb +4 -4
  119. data/app/views/decidim/meetings/meetings/new.html.erb +1 -1
  120. data/app/views/decidim/meetings/meetings/show.html.erb +13 -14
  121. data/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb +13 -0
  122. data/app/views/decidim/meetings/polls/answers/_single_option.html.erb +19 -0
  123. data/app/views/decidim/meetings/polls/answers/create.js.erb +5 -0
  124. data/app/views/decidim/meetings/polls/questions/_closed_question.html.erb +7 -0
  125. data/app/views/decidim/meetings/polls/questions/_index.html.erb +5 -0
  126. data/app/views/decidim/meetings/polls/questions/_index_admin.html.erb +43 -0
  127. data/app/views/decidim/meetings/polls/questions/_published_question.html.erb +29 -0
  128. data/app/views/decidim/meetings/polls/questions/_question.html.erb +7 -0
  129. data/app/views/decidim/meetings/polls/questions/index.js.erb +5 -0
  130. data/app/views/decidim/meetings/polls/questions/index_admin.js.erb +5 -0
  131. data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +5 -2
  132. data/app/views/devise/mailer/join_meeting.html.erb +6 -6
  133. data/config/assets.rb +11 -0
  134. data/config/locales/ar.yml +3 -24
  135. data/config/locales/ca.yml +36 -27
  136. data/config/locales/cs.yml +72 -26
  137. data/config/locales/de.yml +22 -27
  138. data/config/locales/el.yml +3 -24
  139. data/config/locales/en.yml +112 -26
  140. data/config/locales/es-MX.yml +13 -27
  141. data/config/locales/es-PY.yml +13 -27
  142. data/config/locales/es.yml +13 -27
  143. data/config/locales/eu.yml +3 -24
  144. data/config/locales/fi-plain.yml +70 -26
  145. data/config/locales/fi.yml +70 -26
  146. data/config/locales/fr-CA.yml +19 -26
  147. data/config/locales/fr-LU.yml +534 -0
  148. data/config/locales/fr.yml +19 -26
  149. data/config/locales/gl.yml +46 -24
  150. data/config/locales/hu.yml +5 -24
  151. data/config/locales/id-ID.yml +3 -24
  152. data/config/locales/is-IS.yml +2 -22
  153. data/config/locales/it.yml +117 -23
  154. data/config/locales/ja.yml +148 -58
  155. data/config/locales/lb-LU.yml +1 -0
  156. data/config/locales/lv.yml +3 -24
  157. data/config/locales/nl.yml +70 -25
  158. data/config/locales/no.yml +5 -26
  159. data/config/locales/pl.yml +22 -33
  160. data/config/locales/pt-BR.yml +178 -23
  161. data/config/locales/pt.yml +3 -24
  162. data/config/locales/ro-RO.yml +38 -27
  163. data/config/locales/ru.yml +3 -24
  164. data/config/locales/sk.yml +3 -24
  165. data/config/locales/sv.yml +36 -27
  166. data/config/locales/tr-TR.yml +5 -27
  167. data/config/locales/uk.yml +3 -24
  168. data/config/locales/zh-CN.yml +3 -24
  169. data/db/migrate/20210217124802_add_registration_custom_content_to_meetings.rb +8 -0
  170. data/db/migrate/20210413050756_add_published_at_to_meetings.rb +7 -0
  171. data/db/migrate/20210413050917_update_published_at_to_existing_meetings.rb +20 -0
  172. data/db/migrate/20210430123416_add_public_participation_to_decidim_meetings_registrations.rb +7 -0
  173. data/db/migrate/20210506180226_merge_meetings_minutes_into_meetings_table.rb +48 -0
  174. data/db/migrate/20210512055802_create_decidim_meetings_polls.rb +10 -0
  175. data/db/migrate/20210512100333_drop_decidim_meetings_minutes_table.rb +77 -0
  176. data/db/migrate/20210518133236_merge_minutes_with_closing_report_in_meetings_table.rb +57 -0
  177. data/db/migrate/20210520084247_create_decidim_meetings_questionnaires.rb +11 -0
  178. data/db/migrate/20210520084253_create_decidim_meetings_questions.rb +15 -0
  179. data/db/migrate/20210520084321_create_decidim_meetings_answers.rb +13 -0
  180. data/db/migrate/20210520084330_create_decidim_meetings_answer_options.rb +10 -0
  181. data/db/migrate/20210520084337_create_decidim_meetings_answer_choices.rb +13 -0
  182. data/db/migrate/20210520134834_add_status_to_meetings_questions.rb +7 -0
  183. data/db/migrate/20210602040614_add_setting_embed_iframe_to_meetings.rb +7 -0
  184. data/lib/decidim/api/linked_resources_interface.rb +8 -1
  185. data/lib/decidim/api/meeting_type.rb +19 -4
  186. data/lib/decidim/api/meetings_type.rb +2 -2
  187. data/lib/decidim/meetings/admin_engine.rb +5 -1
  188. data/lib/decidim/meetings/api.rb +0 -1
  189. data/lib/decidim/meetings/component.rb +41 -6
  190. data/lib/decidim/meetings/data_portability_user_answers_serializer.rb +33 -0
  191. data/lib/decidim/meetings/engine.rb +10 -11
  192. data/lib/decidim/meetings/meeting_serializer.rb +1 -0
  193. data/lib/decidim/meetings/polls.rb +10 -0
  194. data/lib/decidim/meetings/test/factories.rb +85 -9
  195. data/lib/decidim/meetings/user_answers_serializer.rb +47 -0
  196. data/lib/decidim/meetings/version.rb +1 -1
  197. data/lib/decidim/meetings.rb +10 -0
  198. metadata +103 -113
  199. data/app/assets/config/decidim_meetings_manifest.js +0 -9
  200. data/app/assets/javascripts/decidim/meetings/admin/agendas.js.es6 +0 -158
  201. data/app/assets/javascripts/decidim/meetings/meetings_form.js.es6 +0 -54
  202. data/app/commands/decidim/meetings/admin/create_minutes.rb +0 -55
  203. data/app/commands/decidim/meetings/admin/update_minutes.rb +0 -63
  204. data/app/controllers/decidim/meetings/admin/minutes_controller.rb +0 -69
  205. data/app/forms/decidim/meetings/admin/minutes_form.rb +0 -20
  206. data/app/models/decidim/meetings/minutes.rb +0 -22
  207. data/app/presenters/decidim/meetings/admin_log/minutes_presenter.rb +0 -42
  208. data/app/views/decidim/meetings/admin/minutes/_form.html.erb +0 -23
  209. data/app/views/decidim/meetings/admin/minutes/edit.html.erb +0 -7
  210. data/app/views/decidim/meetings/admin/minutes/new.html.erb +0 -7
  211. data/app/views/decidim/meetings/meetings/_online_meeting_link.html.erb +0 -11
  212. data/config/locales/ja-JP.yml +0 -494
  213. data/lib/decidim/api/minutes_type.rb +0 -20
@@ -1,42 +1,31 @@
1
1
  <div class="section minutes-section">
2
- <h3 class="section-heading"><%= t(".meeting_minutes") %></h3>
3
- <% if translated_attribute(meeting.minutes.description).present? %>
4
- <div class="card">
5
- <div class="card-section">
6
- <div class="row column">
7
- <%= decidim_sanitize translated_attribute meeting.minutes.description %>
8
- </div>
9
- </div>
10
- </div>
11
- <% end %>
12
-
13
- <% if meeting.minutes.video_url.presence || meeting.minutes.audio_url.presence %>
2
+ <% if meeting.video_url.presence || meeting.audio_url.presence %>
14
3
  <div class="section">
15
4
  <h4 class="section-heading"><%= t(".related_information") %></h4>
16
5
  <div class="card card--list">
17
- <% if meeting.minutes.video_url.presence %>
6
+ <% if meeting.video_url.presence %>
18
7
  <div class="card--list__item">
19
8
  <div class="card--list__text">
20
9
  <div>
21
- <%= link_to decidim_url_escape(meeting.minutes.video_url), decidim_html_escape(meeting.minutes.video_url), target: "_blank", rel: "noopener" %>
10
+ <%= link_to decidim_url_escape(meeting.video_url), decidim_html_escape(meeting.video_url), target: "_blank", rel: "noopener" %>
22
11
  </div>
23
12
  </div>
24
13
  <div class="card--list__data" aria-hidden="true">
25
- <%= link_to decidim_url_escape(meeting.minutes.video_url), target: "_blank", class: "card--list__data__icon", rel: "noopener" do %>
14
+ <%= link_to decidim_url_escape(meeting.video_url), target: "_blank", class: "card--list__data__icon", rel: "noopener" do %>
26
15
  <%= icon "external-link", role: "img", "aria-hidden": true %>
27
16
  <% end %>
28
17
  </div>
29
18
  </div>
30
19
  <% end %>
31
- <% if meeting.minutes.audio_url.presence %>
20
+ <% if meeting.audio_url.presence %>
32
21
  <div class="card--list__item">
33
22
  <div class="card--list__text">
34
23
  <div>
35
- <%= link_to decidim_url_escape(meeting.minutes.audio_url), decidim_html_escape(meeting.minutes.audio_url), target: "_blank", rel: "noopener" %>
24
+ <%= link_to decidim_url_escape(meeting.audio_url), decidim_html_escape(meeting.audio_url), target: "_blank", rel: "noopener" %>
36
25
  </div>
37
26
  </div>
38
27
  <div class="card--list__data" aria-hidden="true">
39
- <%= link_to decidim_url_escape(meeting.minutes.audio_url), target: "_blank", class: "card--list__data__icon", rel: "noopener" do %>
28
+ <%= link_to decidim_url_escape(meeting.audio_url), target: "_blank", class: "card--list__data__icon", rel: "noopener" do %>
40
29
  <%= icon "external-link", role: "img", "aria-hidden": true %>
41
30
  <% end %>
42
31
  </div>
@@ -1,7 +1,7 @@
1
1
  <div class="row">
2
2
  <div class="columns large-3">
3
3
  <%= link_to :back do %>
4
- <%= icon "chevron-left", class: "icon--small", role: "img" %>
4
+ <%= icon "chevron-left", class: "icon--small", role: "img", "aria--hidden": true %>
5
5
  <%= t(".back") %>
6
6
  <% end %>
7
7
  </div>
@@ -1,6 +1,8 @@
1
1
  <%= render partial: "decidim/shared/component_announcement" %>
2
2
 
3
- <%= cell "decidim/meetings/meetings_map", search.results %>
3
+ <% if current_component.settings.maps_enabled? && search.results.not_online.exists? %>
4
+ <%= cell "decidim/meetings/meetings_map", search.results %>
5
+ <% end %>
4
6
 
5
7
  <div class="row columns">
6
8
  <div class="title-action">
@@ -11,7 +13,7 @@
11
13
  <% if allowed_to?(:create, :meeting) %>
12
14
  <%= action_authorized_link_to :create, new_meeting_path, class: "title-action__action button small", data: { "redirect_url" => new_meeting_path } do %>
13
15
  <%= t("new_meeting", scope: "decidim.meetings.meetings.index") %>
14
- <%= icon "plus", role: "img" %>
16
+ <%= icon "plus", role: "img", "aria-hidden": true %>
15
17
  <% end %>
16
18
  <% end %>
17
19
  </div>
@@ -28,5 +30,3 @@
28
30
  <%= render partial: "meetings" %>
29
31
  </div>
30
32
  </div>
31
-
32
- <%= javascript_include_tag("decidim/filters") %>
@@ -1,7 +1,7 @@
1
1
  <div class="row">
2
2
  <div class="columns large-3">
3
3
  <%= link_to :back do %>
4
- <%= icon "chevron-left", class: "icon--small", role: "img" %>
4
+ <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
5
5
  <%= t(".back") %>
6
6
  <% end %>
7
7
  </div>
@@ -23,7 +23,7 @@ edit_link(
23
23
  <% end %>
24
24
  </div>
25
25
 
26
- <h2 class="heading2"><%= present(meeting).title(links: true) %></h2>
26
+ <h2 class="heading2"><%= present(meeting).title(links: true, html_escape: true ) %></h2>
27
27
 
28
28
  <%= cell "decidim/author", author_presenter_for(meeting.normalized_author), has_actions: true, from: meeting, context: { extra_classes: ["author-data--small"] } %>
29
29
 
@@ -54,7 +54,7 @@ edit_link(
54
54
  <%= cell "decidim/meetings/join_meeting_button", meeting, big_button: true, show_remaining_slots: true %>
55
55
  <%= render partial: "decidim/shared/follow_button", locals: { followable: meeting, large: false } %>
56
56
  </div>
57
- <% if meeting.closed? %>
57
+ <% if meeting.closed? && meeting.closing_visible? %>
58
58
  <% double = meeting.has_contributions? && meeting.has_attendees? %>
59
59
  <div class="card card--secondary extra definition-data">
60
60
  <% if meeting.has_contributions? %>
@@ -69,7 +69,7 @@ edit_link(
69
69
  <span class="definition-data__number"><%= meeting.attendees_count %></span>
70
70
  </div>
71
71
  <% end %>
72
- <% if meeting.attending_organizations %>
72
+ <% if meeting.attending_organizations.present? %>
73
73
  <div class="definition-data__item">
74
74
  <span class="definition-data__title"><%= t(".organizations") %></span>
75
75
  <span class="definition-data__text"><%= simple_format(meeting.attending_organizations) %></span>
@@ -111,6 +111,7 @@ edit_link(
111
111
  <%= resource_version(meeting, versions_path: meeting_versions_path(meeting)) %>
112
112
  <%= render partial: "decidim/shared/share_modal" %>
113
113
  <%= embed_modal_for meeting_widget_url(meeting, format: :js) %>
114
+ <%= render partial: "calendar_modal", locals: { ics_url: calendar_meeting_url(meeting), google_url: google_calendar_event_url(meeting) } %>
114
115
  </div>
115
116
  <div class="columns mediumlarge-8 mediumlarge-pull-4">
116
117
  <div class="section">
@@ -126,15 +127,14 @@ edit_link(
126
127
  <% end %>
127
128
  <%= decidim_sanitize(present(meeting).description(links: true)) %>
128
129
 
129
- <% if meeting.online_meeting? %>
130
- <%= render partial: "online_meeting_link", locals: { meeting: meeting } %>
131
- <% elsif meeting.hybrid_meeting? %>
132
- <%= render partial: "decidim/shared/static_map", locals: { icon_name: "meetings", geolocalizable: meeting } %>
133
- <%= render partial: "online_meeting_link", locals: { meeting: meeting } %>
134
- <% else %>
130
+ <% if meeting.maps_enabled? && !meeting.online_meeting? %>
135
131
  <%= render partial: "decidim/shared/static_map", locals: { icon_name: "meetings", geolocalizable: meeting } %>
136
132
  <% end %>
137
133
 
134
+ <% unless meeting.in_person_meeting? %>
135
+ <%= cell "decidim/meetings/online_meeting_link", meeting %>
136
+ <% end %>
137
+
138
138
  <%= render partial: "decidim/shared/tags", locals: { resource: meeting, tags_class_extra: "tags--meeting" } %>
139
139
  </div>
140
140
 
@@ -142,9 +142,7 @@ edit_link(
142
142
  <%= render "meeting_agenda" %>
143
143
  <% end %>
144
144
 
145
- <% if meeting.minutes.present? && meeting.minutes.visible? %>
146
- <%= render "meeting_minutes" %>
147
- <% end %>
145
+ <%= cell "decidim/meetings/public_participants_list", meeting %>
148
146
 
149
147
  <% if !meeting.closed? && meeting.user_group_registrations.any? %>
150
148
  <% user_group_ids = meeting.user_group_registrations.user_group_ids %>
@@ -162,12 +160,13 @@ edit_link(
162
160
  </div>
163
161
  <% end %>
164
162
 
165
- <% if meeting.closed? %>
163
+ <% if meeting.closed? && meeting.closing_visible? %>
166
164
  <div class="section">
167
- <h3 class="section-heading"><%= t(".meeting_report") %></h3>
165
+ <h3 class="section-heading"><%= t(".meeting_minutes") %></h3>
168
166
  <%= decidim_sanitize translated_attribute meeting.closing_report %>
169
167
  </div>
170
168
  <% end %>
169
+
171
170
  <%= linked_resources_for meeting, :proposals, "proposals_from_meeting" %>
172
171
  <%= linked_resources_for meeting, :results, "meetings_through_proposals" %>
173
172
  </div>
@@ -0,0 +1,13 @@
1
+ <% question.answer_options.each_with_index do |answer_option, idx| %>
2
+ <% choice = answer.choices.find { |choice| choice.decidim_answer_option_id == answer_option.id } if answer %>
3
+
4
+ <%= label_tag do %>
5
+ <%= check_box_tag "answer[choices][#{idx}][body]",
6
+ translated_attribute(answer_option.body),
7
+ choice.present?, disabled: disabled %>
8
+
9
+ <%= translated_attribute(answer_option.body) %>
10
+
11
+ <%= hidden_field_tag "answer[choices][#{idx}][answer_option_id]", answer_option.id, disabled: disabled %>
12
+ <% end %>
13
+ <% end %>
@@ -0,0 +1,19 @@
1
+ <% choice = answer.choices.first if answer %>
2
+
3
+ <% question.answer_options.each_with_index do |answer_option, idx| %>
4
+ <% choice_id = "#{field_id}_choices_#{idx}" %>
5
+
6
+ <%= label_tag "#{choice_id}_body" do %>
7
+ <%= radio_button_tag "answer[choices][#{idx}][body]",
8
+ translated_attribute(answer_option.body),
9
+ answer_option.id == choice.try(:decidim_answer_option_id),
10
+ id: "#{choice_id}_body", disabled: disabled %>
11
+
12
+ <%= translated_attribute(answer_option.body) %>
13
+
14
+ <%= hidden_field_tag "answer[choices][#{idx}][answer_option_id]",
15
+ answer_option.id,
16
+ id: "#{choice_id}_answer_option",
17
+ disabled: disabled %>
18
+ <% end %>
19
+ <% end %>
@@ -0,0 +1,5 @@
1
+ var $question = $("[data-question=\"<%= question.id %>\"]");
2
+
3
+ if($question.length){
4
+ $question.replaceWith('<%= j(render partial: "decidim/meetings/polls/questions/question", locals: { form: @form, question: question, open_question: question }).strip.html_safe %>');
5
+ }
@@ -0,0 +1,7 @@
1
+ <summary><%= t(".question_results") %></summary>
2
+
3
+ <div>
4
+ <p><%= translated_attribute(question.body) %></p>
5
+
6
+ <%= cell "decidim/meetings/question_responses", question %>
7
+ </div>
@@ -0,0 +1,5 @@
1
+ <% if questionnaire.all_questions_unpublished? %>
2
+ <p class="padding-1"><%= t(".empty_questions") %></p>
3
+ <% else %>
4
+ <%= render partial: "decidim/meetings/polls/questions/question", collection: questionnaire.questions.includes([:questionnaire]).visible %>
5
+ <% end %>
@@ -0,0 +1,43 @@
1
+ <div class="meeting-polls__admin-label"><%= t(".admin_dashboard") %></div>
2
+
3
+ <% questionnaire.questions.includes([:questionnaire]).each do |question| %>
4
+ <details class="meeting-polls__question--admin text-medium open" data-question="<%= question.id %>" <%= "open" if open_question == question.id %>>
5
+ <summary><%= t(".question") %></summary>
6
+
7
+ <%= form_tag(meeting_polls_question_path(meeting, question), method: :patch, remote: true) do %>
8
+ <div>
9
+ <p><%= translated_attribute(question.body) %></p>
10
+
11
+ <%= link_to t(".edit"), Decidim::EngineRouter.admin_proxy(meeting.component).edit_meeting_poll_path(meeting), target: "_blank", rel: "noopener noreferrer" %>
12
+
13
+ <div class="meeting-polls__admin-action meeting-polls__admin-action-question">
14
+ <div><%= t(".question") %></div>
15
+ <div>
16
+ <% if question.unpublished? %>
17
+ <button class="button button--nomargin primary small"><%= t(".send") %></button>
18
+ <% else %>
19
+ <div><strong><%= t(".sent") %></strong></div>
20
+ <div><%= pluralize(question.answers_count, t(".received_answer"), t(".received_answers")) %></div>
21
+ <% end %>
22
+ </div>
23
+ </div>
24
+ <div class="meeting-polls__admin-action meeting-polls__admin-action-results">
25
+ <div><%= t(".results") %></div>
26
+ <div>
27
+ <% unless question.unpublished? %>
28
+ <%= cell "decidim/meetings/question_responses", question %>
29
+ <% end %>
30
+
31
+ <% if question.unpublished? %>
32
+ <button class="button button--nomargin primary small margin-top-1" disabled><%= t(".send") %></button>
33
+ <% elsif question.published? %>
34
+ <button class="button button--nomargin primary small margin-top-1"><%= t(".send") %></button>
35
+ <% elsif question.closed? %>
36
+ <div class="margin-top-1"><strong><%= t(".sent") %></strong></div>
37
+ <% end %>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <% end %>
42
+ </details>
43
+ <% end %>
@@ -0,0 +1,29 @@
1
+ <summary><%= t(".question") %></summary>
2
+
3
+ <div>
4
+ <p><%= translated_attribute(question.body) %></p>
5
+
6
+ <% @form = form || Decidim::Meetings::AnswerForm.new(question_id: question.id, current_user: current_user) %>
7
+ <%= decidim_form_for(@form, url: meeting_polls_answers_path(meeting), method: :post, remote: true, html: { class: "form answer-questionnaire" }, data: { "safe-path" => meeting_live_event_path(meeting) }) do |form| %>
8
+ <div class="row column answer question" data-max-choices="<%= question.max_choices %>">
9
+ <%= render partial: "decidim/meetings/polls/answers/#{question.question_type}", locals: { answer: @form.answer, question: question, answer_form: form, disabled: question.answered_by?(current_user), field_id: question.id } %>
10
+
11
+ <%= form.hidden_field :question_id %>
12
+
13
+ <small class="form-error max-choices-alert"><%= t(".max_choices_alert") %></small>
14
+
15
+ <% @form.errors.full_messages.each do |msg| %>
16
+ <small class="form-error is-visible margin-top-1"><%= msg %></small>
17
+ <% end %>
18
+ </div>
19
+ <% if question.answered_by?(current_user) %>
20
+ <div class="callout success margin-top-1">
21
+ <%= t(".question_replied") %>
22
+ </div>
23
+ <% else %>
24
+ <div class="text-right">
25
+ <button class="button button--nomargin primary small margin-top-1"><%= t(".reply_question") %></button>
26
+ </div>
27
+ <% end %>
28
+ <% end %>
29
+ </div>
@@ -0,0 +1,7 @@
1
+ <details class="meeting-polls__question text-medium" data-question="<%= question.id %>" <%= "open" if local_assigns.fetch(:open_question, nil) == question %>>
2
+ <% if question.published? %>
3
+ <%= render partial: "decidim/meetings/polls/questions/published_question", locals: { question: question, form: local_assigns.fetch(:form, nil) } %>
4
+ <% elsif question.closed? %>
5
+ <%= render partial: "decidim/meetings/polls/questions/closed_question", locals: { question: question } %>
6
+ <% end %>
7
+ </details>
@@ -0,0 +1,5 @@
1
+ var $aside = $("#meeting-poll-aside");
2
+
3
+ if($aside.length){
4
+ $aside.html('<%= j(render partial: "decidim/meetings/polls/questions/index").strip.html_safe %>');
5
+ }
@@ -0,0 +1,5 @@
1
+ var $aside = $("#admin-meeting-poll-aside");
2
+
3
+ if($aside.length){
4
+ $aside.html('<%= j(render partial: "decidim/meetings/polls/questions/index_admin", locals: { open_question: open_question }).strip.html_safe %>');
5
+ }
@@ -1,7 +1,10 @@
1
- <p><%= t(".confirmed_html", title: present(@meeting).title, url: @locator.url) %></p>
1
+ <p class="email-instructions"><%= t(".confirmed_html", title: present(@meeting).title, url: @locator.url) %></p>
2
2
 
3
3
  <% if @registration.meeting.component.settings.registration_code_enabled %>
4
4
  <p><%= t(".registration_code", code: @registration.code) %></p>
5
5
  <% end %>
6
+ <% if @meeting.customize_registration_email? %>
7
+ <p><%= present(@meeting).registration_email_custom_content %></p>
8
+ <% end %>
6
9
 
7
- <p><%= t(".details") %></p>
10
+ <p class="email-instructions"><%= t(".details") %></p>
@@ -1,14 +1,14 @@
1
- <p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>
1
+ <p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>
2
2
 
3
- <p>
3
+ <p class="email-instructions">
4
4
  <%= t("decidim.meetings.admin.invite_join_meeting_mailer.invite.invited_you_to_join_a_meeting", invited_by: @resource.invited_by.name, application: @resource.organization.name) %>
5
5
  </p>
6
6
 
7
- <p><%= link_to t("devise.mailer.invitation_instructions.decline"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: Decidim::EngineRouter.main_proxy(@opts[:meeting].component).decline_invitation_meeting_registration_path(meeting_id: @opts[:meeting], participatory_space_id: @opts[:meeting].component.participatory_space), host: @resource.organization.host) %></p>
8
- <p><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: Decidim::EngineRouter.main_proxy(@opts[:meeting].component).meeting_registration_path(meeting_id: @opts[:meeting], participatory_space_id: @opts[:meeting].component.participatory_space), host: @resource.organization.host) %></p>
7
+ <p class="email-button email-button__cta cta-decline"><%= link_to t("devise.mailer.invitation_instructions.decline"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: Decidim::EngineRouter.main_proxy(@opts[:meeting].component).decline_invitation_meeting_registration_path(meeting_id: @opts[:meeting], participatory_space_id: @opts[:meeting].component.participatory_space), host: @resource.organization.host) %></p>
8
+ <p class="email-button email-button__cta cta-accept"><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: Decidim::EngineRouter.main_proxy(@opts[:meeting].component).meeting_registration_path(meeting_id: @opts[:meeting], participatory_space_id: @opts[:meeting].component.participatory_space), host: @resource.organization.host) %></p>
9
9
 
10
10
  <% if @resource.invitation_due_at %>
11
- <p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
11
+ <p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
12
12
  <% end %>
13
13
 
14
- <p><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
14
+ <p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
data/config/assets.rb ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ base_path = File.expand_path("..", __dir__)
4
+
5
+ Decidim::Webpacker.register_path("#{base_path}/app/packs")
6
+ Decidim::Webpacker.register_entrypoints(
7
+ decidim_meetings: "#{base_path}/app/packs/entrypoints/decidim_meetings.js",
8
+ decidim_meetings_admin: "#{base_path}/app/packs/entrypoints/decidim_meetings_admin.js"
9
+ )
10
+
11
+ Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/meetings/meetings")
@@ -8,7 +8,8 @@ ar:
8
8
  close_meeting:
9
9
  attendees_count: عدد الحضور
10
10
  attending_organizations: قائمة المنظمات التي حضرت
11
- closing_report: أبلغ عن
11
+ closing_report: الدقائق
12
+ closing_visible: مرئي
12
13
  contributions_count: عدد المساهمات
13
14
  proposal_ids: المقترحات التي تم إنشاؤها في الاجتماع
14
15
  meeting:
@@ -28,9 +29,6 @@ ar:
28
29
  start_time: وقت البدء
29
30
  title: عنوان
30
31
  transparent: شفاف
31
- minutes:
32
- description: وصف
33
- visible: مرئي
34
32
  errors:
35
33
  models:
36
34
  meeting_agenda:
@@ -162,7 +160,6 @@ ar:
162
160
  confirm_destroy: هل أنت متأكد أنك تريد حذف هذا الاجتماع؟
163
161
  destroy: حذف
164
162
  edit: تعديل
165
- minutes: الدقائق
166
163
  new: اجتماع جديد
167
164
  preview: معاينة
168
165
  registrations: التسجيلات
@@ -238,7 +235,6 @@ ar:
238
235
  success: تم إغلاق الاجتماع بنجاح
239
236
  create:
240
237
  invalid: كانت هناك مشكلة في إنشاء هذا الاجتماع
241
- success: تم إنشاء الاجتماع بنجاح
242
238
  destroy:
243
239
  success: تم حذف الاجتماع بنجاح
244
240
  edit:
@@ -261,18 +257,6 @@ ar:
261
257
  update:
262
258
  invalid: حدثت مشكلة أثناء تحديث هذا الاجتماع
263
259
  success: تم تحديث الاجتماع بنجاح
264
- minutes:
265
- create:
266
- invalid: كانت هناك مشكلة في إنشاء هذه الدقائق
267
- success: تم إنشاء الدقائق بنجاح
268
- edit:
269
- update: تحديث
270
- new:
271
- create: إنشاء
272
- title: خلق دقائق
273
- update:
274
- invalid: حدثت مشكلة أثناء تحديث هذه الدقائق
275
- success: تم تحديث الدقائق بنجاح
276
260
  models:
277
261
  meeting:
278
262
  name: لقاء
@@ -315,9 +299,6 @@ ar:
315
299
  value_types:
316
300
  organizer_presenter:
317
301
  not_found: 'لم يتم العثور على المنظم في قاعدة البيانات (المعرف: %{id})'
318
- minutes:
319
- create: "%{user_name} خلق محضر الاجتماع %{resource_name} على %{space_name} الفضاء"
320
- update: "%{user_name} تحديث محضر الاجتماع %{resource_name} على %{space_name} الفضاء"
321
302
  calendar_modal:
322
303
  calendar_url: العنوان الشبكي للتقويم
323
304
  close_window: أغلق النافذة
@@ -360,7 +341,6 @@ ar:
360
341
  filter_by: مصنف بواسطة
361
342
  unfold: كشف
362
343
  meeting_minutes:
363
- meeting_minutes: محضر الاجتماع
364
344
  related_information: معلومات ذات صله
365
345
  meetings:
366
346
  no_meetings_warning: لا توجد اجتماعات تطابق معايير البحث الخاصة بك أو لا يوجد أي اجتماع مجدولة.
@@ -371,9 +351,8 @@ ar:
371
351
  show:
372
352
  attendees: الحضور الحضور
373
353
  contributions: عدد المساهمات
374
- going: ذاهب
375
354
  join: أنضم إلى الأجتماع
376
- meeting_report: تقرير الاجتماع
355
+ meeting_minutes: محضر الاجتماع
377
356
  no_slots_available: لا فتحات المتاحة
378
357
  organizations: حضور المنظمات
379
358
  registration_code_help_text: رمز التسجيل الخاص بك