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
@@ -33,4 +33,4 @@
33
33
  </div>
34
34
  </div>
35
35
 
36
- <%= javascript_include_tag "decidim/meetings/admin/registrations_invite_form" %>
36
+ <%= javascript_pack_tag "decidim_meetings_admin" %>
@@ -21,8 +21,23 @@
21
21
  <%= form.number_field :contributions_count, min: 0 %>
22
22
  </div>
23
23
  </div>
24
+
25
+ <% if Decidim::Meetings.enable_proposal_linking %>
26
+ <div class="row column">
27
+ <%= proposals_picker(form, :proposals, proposals_picker_meeting_meeting_closes_path(meeting)) %>
28
+ </div>
29
+ <% end %>
30
+
31
+ <div class="row column">
32
+ <%= form.text_field :video_url %>
33
+ </div>
34
+
35
+ <div class="row column">
36
+ <%= form.text_field :audio_url %>
37
+ </div>
38
+
24
39
  <div class="row column">
25
- <%= proposals_picker(form, :proposals, proposals_picker_meeting_meeting_closes_path(meeting)) %>
40
+ <%= form.check_box :closing_visible %>
26
41
  </div>
27
42
  </div>
28
43
  </div>
@@ -46,4 +46,4 @@
46
46
 
47
47
  <%= render "decidim/meetings/admin/meetings/services", form: form %>
48
48
 
49
- <%= javascript_include_tag "decidim/meetings/admin/meetings_form" %>
49
+ <%= javascript_pack_tag "decidim_meetings_admin" %>
@@ -38,6 +38,11 @@
38
38
  <p class="help-text"><%= t(".online_meeting_url_help") %></p>
39
39
  </div>
40
40
 
41
+ <div class="field" data-meeting-type="online">
42
+ <%= form.check_box :show_embedded_iframe %>
43
+ <p class="help-text"><%= t(".show_embedded_iframe_help") %></p>
44
+ </div>
45
+
41
46
  <div class="row">
42
47
  <div class="columns xlarge-6">
43
48
  <%= form.datetime_field :start_time %>
@@ -84,9 +89,19 @@
84
89
  <div class="row column" id="transparent">
85
90
  <%= form.check_box :transparent %>
86
91
  </div>
92
+
93
+ <div class="row column">
94
+ <%= form.check_box :customize_registration_email, :"data-toggle" => "customize_registration_email-div" %>
95
+ </div>
96
+
97
+ <div id="customize_registration_email-div" data-toggler=".hide" class="row column <%= @form.customize_registration_email? ? nil : "hide" %>">
98
+ <%= form.translated :editor, :registration_email_custom_content, lines: 10 %>
99
+ <p class="help-text"><%= t(".registration_email_help") %></p>
100
+ </div>
101
+
87
102
  </div>
88
103
  </div>
89
104
 
90
105
  <%= render "services", form: form, id: tabs_id_for_service(blank_service) %>
91
106
 
92
- <%= javascript_include_tag "decidim/meetings/admin/meetings_form" %>
107
+ <%= javascript_pack_tag "decidim_meetings_admin" %>
@@ -9,25 +9,44 @@
9
9
  </h2>
10
10
  </div>
11
11
 
12
+ <%= admin_filter_selector(:meetings) %>
12
13
  <div class="card-section">
13
14
  <div class="table-scroll">
14
15
  <table class="table-list">
15
16
  <thead>
16
17
  <tr>
17
- <th><%= t("models.meeting.fields.title", scope: "decidim.meetings") %></th>
18
- <th><%= t("models.meeting.fields.start_time", scope: "decidim.meetings") %></th>
19
- <th><%= t("models.meeting.fields.end_time", scope: "decidim.meetings") %></th>
20
- <th><%= t("models.meeting.fields.closed", scope: "decidim.meetings") %></th>
21
- <% if Decidim::Map.available?(:static, :geocoding) %>
18
+ <th>
19
+ <%= sort_link(query, :id, t("models.meeting.fields.id", scope: "decidim.meetings"), default_order: :desc ) %>
20
+ </th>
21
+ <th>
22
+ <%= sort_link(query, :translated_title, t("models.meeting.fields.title", scope: "decidim.meetings"), default_order: :desc ) %>
23
+ </th>
24
+ <th>
25
+ <%= sort_link(query, :start_time, t("models.meeting.fields.start_time", scope: "decidim.meetings"), default_order: :desc ) %>
26
+ </th>
27
+ <th>
28
+ <%= sort_link(query, :end_time, t("models.meeting.fields.end_time", scope: "decidim.meetings"), default_order: :desc ) %>
29
+ </th>
30
+ <th>
31
+ <%= sort_link(query, :closed, t("models.meeting.fields.closed", scope: "decidim.meetings"), default_order: :desc ) %>
32
+ </th>
33
+ <% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
22
34
  <th><%= t("models.meeting.fields.map", scope: "decidim.meetings") %></th>
23
35
  <% end %>
24
- <%= th_resource_scope_label %>
36
+ <% if resource_with_scopes_enabled? %>
37
+ <th>
38
+ <%= sort_link(query, :scope_name, t("models.proposal.fields.scope", scope: "decidim.proposals") ) %>
39
+ </th>
40
+ <% end %>
25
41
  <th class="actions"><%= t("actions.title", scope: "decidim.meetings") %></th>
26
42
  </tr>
27
43
  </thead>
28
44
  <tbody>
29
45
  <% meetings.each do |meeting| %>
30
46
  <tr data-id="<%= meeting.id %>">
47
+ <td>
48
+ <%= meeting.id %><br>
49
+ </td>
31
50
  <td>
32
51
  <%= present(meeting).title %><br>
33
52
  </td>
@@ -44,13 +63,23 @@
44
63
  <td>
45
64
  <%= humanize_boolean meeting.closed? %>
46
65
  </td>
47
- <% if Decidim::Map.available?(:static, :geocoding) %>
66
+ <% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
48
67
  <td>
49
68
  <%= static_map_link(meeting) %>
50
69
  </td>
51
70
  <% end %>
52
71
  <%= td_resource_scope_for(meeting.scope) %>
53
72
  <td class="table-list__actions">
73
+ <% if allowed_to? :update, :meeting, meeting: meeting %>
74
+ <% if meeting.published? %>
75
+ <%= icon_link_to "x", unpublish_meeting_path(meeting), t("actions.unpublish", scope: "decidim.admin"), method: :put, class: "action-icon--unpublish", data: { confirm: t("actions.unpublish", scope: "decidim.admin") } %>
76
+ <% else %>
77
+ <%= icon_link_to "check", publish_meeting_path(meeting), t("actions.publish", scope: "decidim.admin"), method: :put, class: "action-icon--publish" %>
78
+ <% end %>
79
+ <% else %>
80
+ <span class="action-space icon"></span>
81
+ <% end %>
82
+
54
83
  <%= icon_link_to "eye", resource_locator(meeting).path, t("actions.preview", scope: "decidim.meetings"), class: "action-icon--preview", target: :blank %>
55
84
 
56
85
  <% if allowed_to? :copy, :meeting, meeting: meeting %>
@@ -61,7 +90,7 @@
61
90
 
62
91
  <% if allowed_to? :update, :meeting, meeting: meeting %>
63
92
  <% if meeting.registration_disabled? %>
64
- <%= icon "people", class: "action-icon action-icon--disabled", role: "img" %>
93
+ <%= icon "people", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.registrations", scope: "decidim.meetings") %>
65
94
  <% else %>
66
95
  <%= icon_link_to "people", meeting.on_this_platform? ? edit_meeting_registrations_path(meeting) : meeting.registration_url, t("actions.registrations", scope: "decidim.meetings"), class: "action-icon--registrations" %>
67
96
  <% end %>
@@ -69,13 +98,12 @@
69
98
 
70
99
  <% if allowed_to? :update, :meeting, meeting: meeting %>
71
100
  <%= icon_link_to "pencil", edit_meeting_path(meeting), t("actions.edit", scope: "decidim.meetings"), class: "action-icon--edit" %>
72
- <%= icon_link_to "clock", meeting.minutes.present? ? edit_meeting_minute_path(meeting, meeting.minutes) : new_meeting_minute_path(meeting), t("actions.minutes", scope: "decidim.meetings"), class: "action-icon--minutes" %>
73
101
  <%= icon_link_to "calendar", meeting.agenda.present? ? edit_meeting_agenda_path(meeting, meeting.agenda) : new_meeting_agenda_path(meeting), t("actions.agenda", scope: "decidim.meetings"), class: "action-icon--agenda" %>
102
+ <%= icon_link_to "list", edit_meeting_poll_path(meeting), t("actions.manage_poll", scope: "decidim.meetings"), class: "action-icon--manage-poll-questionnaire" %>
74
103
  <% else %>
75
104
  <span class="action-space icon"></span>
76
105
  <span class="action-space icon"></span>
77
106
  <span class="action-space icon"></span>
78
- <span class="action-space icon"></span>
79
107
  <% end %>
80
108
 
81
109
  <% if allowed_to? :close, :meeting, meeting: meeting %>
@@ -128,4 +156,4 @@
128
156
  </div>
129
157
  </div>
130
158
 
131
- <%= javascript_include_tag "decidim/meetings/admin/destroy_meeting_alert" %>
159
+ <%= javascript_pack_tag "decidim_meetings_admin" %>
@@ -0,0 +1,34 @@
1
+ <% answer_option = form.object %>
2
+
3
+ <div class="card questionnaire-question-answer-option">
4
+ <div class="card-divider">
5
+ <h2 class="card-title">
6
+ <span><%= t("answer_option", scope: "decidim.forms.admin.questionnaires.answer_option") %></span>
7
+ <% if editable %>
8
+ <button class="button small alert hollow remove-answer-option button--title">
9
+ <%= t("remove", scope: "decidim.forms.admin.questionnaires.answer_option") %>
10
+ </button>
11
+ <% end %>
12
+ </h2>
13
+ </div>
14
+
15
+ <div class="card-section">
16
+ <div class="row column">
17
+ <%=
18
+ form.translated(
19
+ :text_field,
20
+ :body,
21
+ tabs_id: tabs_id_for_question_answer_option(question, answer_option),
22
+ label: t("statement", scope: "decidim.forms.admin.questionnaires.answer_option"),
23
+ disabled: !editable
24
+ )
25
+ %>
26
+ </div>
27
+ </div>
28
+
29
+ <% if answer_option.persisted? %>
30
+ <%= form.hidden_field :id, disabled: !editable %>
31
+ <% end %>
32
+
33
+ <%= form.hidden_field :deleted, disabled: !editable %>
34
+ </div>
@@ -0,0 +1,7 @@
1
+ <% question = form.object %>
2
+
3
+ <script type="text/template" class="decidim-answer-option-template decidim-template" id="<%= template_id %>">
4
+ <%= fields_for "questionnaire[questions][#{question.to_param}][answer_options][]", blank_answer_option do |answer_option_form| %>
5
+ <%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question: question, editable: editable %>
6
+ <% end %>
7
+ </script>
@@ -0,0 +1,63 @@
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-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 tiny button--title" disabled><%= t("empty", scope: "decidim.forms.admin.questionnaires.answers") %></button>
11
+ <% end %>
12
+ </h2>
13
+ </div>
14
+ </div>
15
+
16
+ <div class="questionnaire-questions">
17
+ <div class="row column text-center">
18
+ <button type="button" class="button collapse-all"><%= t("collapse", scope: "decidim.forms.admin.questionnaires.form") %></button>
19
+ <button type="button" class="button expand-all"><%= t("expand", scope: "decidim.forms.admin.questionnaires.form") %></button>
20
+ </div>
21
+
22
+ <% if questionnaire.questions_editable? %>
23
+ <%= fields_for "questionnaire[questions][#{blank_question.to_param}]", blank_question do |question_form| %>
24
+ <script type="text/template" class="decidim-question-template decidim-template" id="question-template">
25
+ <%= render "decidim/meetings/admin/poll/question",
26
+ form: question_form,
27
+ id: tabs_id_for_question(blank_question),
28
+ editable: questionnaire.questions_editable?,
29
+ answer_option_template_selector: "#answer-option-template-dummy" %>
30
+ </script>
31
+ <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-dummy" %>
32
+ <% end %>
33
+ <% else %>
34
+ <div class="callout warning">
35
+ <%= t("already_answered_warning", scope: "decidim.forms.admin.questionnaires.form") %>
36
+ </div>
37
+ <% end %>
38
+
39
+ <div class="questionnaire-questions-list">
40
+ <% @form.questions.each_with_index do |question, index| %>
41
+ <%= fields_for "questionnaire[questions][]", question do |question_form| %>
42
+ <%= render "decidim/meetings/admin/poll/question",
43
+ form: question_form,
44
+ id: tabs_id_for_question(question),
45
+ editable: questionnaire.questions_editable?,
46
+ answer_option_template_selector: "#answer-option-template-#{index}" %>
47
+ <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-#{index}" %>
48
+ <% end %>
49
+ <% end %>
50
+ </div>
51
+
52
+ <% if questionnaire.questions_editable? %>
53
+ <button class="button add-question"><%= t("add_question", scope: "decidim.forms.admin.questionnaires.form") %></button>
54
+ <% end %>
55
+ </div>
56
+
57
+ <%= javascript_pack_tag "decidim_forms_admin", defer: false %>
58
+
59
+ <% if questionnaire.questions_editable? %>
60
+ <script>
61
+ window.Decidim.createEditableForm()
62
+ </script>
63
+ <% end %>
@@ -0,0 +1,96 @@
1
+ <% question = form.object %>
2
+ <% is_expanded = question.errors.any? %>
3
+
4
+ <div class="card questionnaire-question" id="<%= id %>-field">
5
+ <div class="card-divider question-divider">
6
+ <h2 class="card-title">
7
+ <span>
8
+ <% if editable %>
9
+ <%== icon("move") %>
10
+ <% end %>
11
+ <%= dynamic_title(translated_attribute(question.body), class: "question-title-statement", max_length: 50, omission: "...", placeholder: t("question", scope: "decidim.forms.admin.questionnaires.question")) %>
12
+ </span>
13
+
14
+ <button type="button" class="button small secondary button--title question--collapse" data-toggle="<%= id %>-question-card button--collapse-question-<%= id %> button--expand-question-<%= id %>">
15
+ <span id="button--collapse-question-<%= id %>" data-toggler=".hide" class="icon-collapse <%= "hide" unless is_expanded %>">
16
+ <%== icon("caret-top", aria_label: t("collapse", scope: "decidim.forms.admin.questionnaires.question"), role: "img") %>
17
+ </span>
18
+
19
+ <span id="button--expand-question-<%= id %>" data-toggler=".hide" class="icon-expand <%= "hide" if is_expanded %>">
20
+ <%== icon("caret-bottom", aria_label: t("expand", scope: "decidim.forms.admin.questionnaires.question"), role: "img") %>
21
+ </span>
22
+ </button>
23
+
24
+ <% if editable %>
25
+ <button class="button small alert hollow move-up-question button--title">
26
+ <%== "#{icon("arrow-top")} #{t("up", scope: "decidim.forms.admin.questionnaires.question")}" %>
27
+ </button>
28
+
29
+ <button class="button small alert hollow move-down-question button--title">
30
+ <%== "#{icon("arrow-bottom")} #{t("down", scope: "decidim.forms.admin.questionnaires.question")}" %>
31
+ </button>
32
+
33
+ <button class="button small alert hollow remove-question button--title">
34
+ <%= t("remove", scope: "decidim.forms.admin.questionnaires.question") %>
35
+ </button>
36
+ <% end %>
37
+ </h2>
38
+ </div>
39
+
40
+ <div class="card-section collapsible <%= "hide" unless is_expanded %>" data-toggler=".hide" id="<%= id %>-question-card">
41
+ <div class="row column">
42
+ <%=
43
+ form.translated(
44
+ :text_field,
45
+ :body,
46
+ tabs_id: id,
47
+ label: t("statement", scope: "decidim.forms.admin.questionnaires.question"),
48
+ disabled: !editable
49
+ )
50
+ %>
51
+ </div>
52
+
53
+ <div class="row column">
54
+ <%=
55
+ form.select(
56
+ :question_type,
57
+ options_from_collection_for_select(question_types, :first, :last, question.question_type),
58
+ {},
59
+ disabled: !editable
60
+ )
61
+ %>
62
+ </div>
63
+
64
+ <% if question.persisted? %>
65
+ <%= form.hidden_field :id, disabled: !editable %>
66
+ <% end %>
67
+
68
+ <%= form.hidden_field :position, value: question.position || 0, disabled: !editable %>
69
+ <%= form.hidden_field :deleted, disabled: !editable %>
70
+
71
+ <div class="questionnaire-question-answer-options" data-template="<%= answer_option_template_selector %>">
72
+ <div class="questionnaire-question-answer-options-list">
73
+ <% question.answer_options.each do |answer_option| %>
74
+ <%= fields_for "questionnaire[questions][#{question.to_param}][answer_options][]", answer_option do |answer_option_form| %>
75
+ <%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question: question, editable: editable %>
76
+ <% end %>
77
+ <% end %>
78
+ </div>
79
+
80
+ <% if editable %>
81
+ <button class="button add-answer-option"><%= t("add_answer_option", scope: "decidim.forms.admin.questionnaires.question") %></button>
82
+ <% end %>
83
+ </div>
84
+
85
+ <div class="row column questionnaire-question-max-choices">
86
+ <%=
87
+ form.select(
88
+ :max_choices,
89
+ (2..question.number_of_options),
90
+ { include_blank: t("any", scope: "decidim.forms.admin.questionnaires.question") },
91
+ disabled: !editable
92
+ )
93
+ %>
94
+ </div>
95
+ </div>
96
+ </div>
@@ -0,0 +1,9 @@
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 %>
3
+
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 %>
@@ -47,4 +47,4 @@
47
47
  </div>
48
48
  </div>
49
49
 
50
- <%= javascript_include_tag "decidim/meetings/admin/registrations_form" %>
50
+ <%= javascript_pack_tag "decidim_meetings_admin" %>
@@ -2,7 +2,9 @@
2
2
 
3
3
  <div class="wrapper">
4
4
  <div class="row">
5
- <h1 class="section-heading"><%= t(".meetings") %></h1>
5
+ <h1 class="section-heading" id="meetings-count">
6
+ <%= render partial: "decidim/meetings/meetings/count" %>
7
+ </h1>
6
8
 
7
9
  <%= cell "decidim/meetings/meetings_map", search.results %>
8
10
 
@@ -13,7 +15,7 @@
13
15
  <div class="filters__section">
14
16
  <div class="filters__search">
15
17
  <div class="input-group">
16
- <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search") %>
18
+ <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search") %>
17
19
  <div class="input-group-button">
18
20
  <button type="submit" class="button">
19
21
  <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
@@ -33,5 +35,3 @@
33
35
  </div>
34
36
  </div>
35
37
  </div>
36
-
37
- <%= javascript_include_tag("decidim/filters") %>
@@ -1,6 +1,8 @@
1
1
  var $meetings = $('#meetings');
2
+ var $meetingsCount = $('#meetings-count');
2
3
 
3
4
  $meetings.html('<%= j(render partial: "meetings").strip.html_safe %>');
5
+ $meetingsCount.html('<%= j(render partial: "decidim/meetings/meetings/count").strip.html_safe %>');
4
6
 
5
7
  var $dropdownMenu = $('.dropdown.menu', $meetings);
6
8
  $dropdownMenu.foundation();
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= I18n.locale %>" class="no-js">
3
+ <head>
4
+ <title><%= decidim_page_title %></title>
5
+ <%= render partial: "layouts/decidim/head" %>
6
+ <%= javascript_pack_tag "decidim_meetings" %>
7
+ <%= render partial: "layouts/decidim/js_configuration" %>
8
+ </head>
9
+
10
+ <body>
11
+ <header class="meeting-polls__header">
12
+ <% if current_user && poll %>
13
+ <div class="flex--cc">
14
+ <button class="meeting-polls__button meeting-polls__action-list">
15
+ <%= t(".questions") %> <span id="visible-questions-count">(<%= questionnaire.questions.visible.count %>)</span>
16
+ </button>
17
+
18
+ <% if admin_allowed_to?(:update, :poll, meeting: meeting, poll: poll) %>
19
+ <button class="meeting-polls__button meeting-polls__action-administrate"><%= t(".administrate") %></button>
20
+ <% end %>
21
+ </div>
22
+ <% end %>
23
+
24
+ <div>
25
+ <strong class="text-secondary"><%= current_organization.name %></strong> / <strong><%= present(meeting).title(links: true) %></strong>
26
+ </div>
27
+
28
+ <div class="flex--cc">
29
+ <% if current_user %>
30
+ <span>
31
+ <%= link_to current_user.name, decidim.account_path, target: "_blank", "aria-label": t("layouts.decidim.user_menu.account", name: current_user.name) %>
32
+ </span>
33
+ <% end %>
34
+
35
+ <span class="meeting-polls__close">
36
+ <%= link_to meeting_path(meeting), "aria-label": t(".close") do %>
37
+ <%= t(".close") %>
38
+ <%= icon "x", class: "text-small" %>
39
+ <% end %>
40
+ </span>
41
+ </div>
42
+ </header>
43
+
44
+ <main class="meeting-polls__main">
45
+ <aside class="meeting-polls__aside" id="meeting-poll-aside" data-decidim-meetings-poll='{"questionsUrl":"<%= meeting_polls_questions_path(meeting) %>"}'></aside>
46
+ <aside class="meeting-polls__aside" id="admin-meeting-poll-aside" data-decidim-admin-meetings-poll='{"questionsUrl":"<%= meeting_polls_questions_path(meeting, admin: true) %>"}'></aside>
47
+ <%= yield %>
48
+ </main>
49
+ </body>
50
+ </html>
@@ -0,0 +1,12 @@
1
+ <% provide(:title, present(meeting).title) %>
2
+
3
+ <% add_decidim_meta_tags({
4
+ title: present(meeting).title,
5
+ description: present(meeting).description,
6
+ url: meeting_url(meeting.id)
7
+ }) %>
8
+
9
+ <aside class="meeting-polls__aside"></aside>
10
+ <div class="meeting-polls__iframe">
11
+ <%== live_meeting_embed_code %>
12
+ </div>
@@ -3,5 +3,12 @@
3
3
  </div>
4
4
 
5
5
  <div class="field hashtags__container">
6
- <%= proposals_picker(form, :proposals, proposals_picker_meeting_meeting_closes_path(meeting)) %>
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>
7
8
  </div>
9
+
10
+ <% 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>
14
+ <% end %>
@@ -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>
@@ -0,0 +1,26 @@
1
+ <div class="text-center">
2
+ <button class="share-link link text-center" data-open="calendarShare">
3
+ <%= t("add_to_calendar", scope: "decidim.meetings.meetings.calendar_modal" ) %>
4
+ <%= icon "calendar", class: "icon--after", role: "img", "aria-hidden": true %>
5
+ </button>
6
+ </div>
7
+
8
+ <div class="reveal" id="calendarShare" data-reveal>
9
+ <div class="reveal__header">
10
+ <h2 class="reveal__title"><%= t("add_to_calendar", scope: "decidim.meetings.meetings.calendar_modal") %></h2>
11
+ <button class="close-button" data-close aria-label="<%= t("close_window", scope: "decidim.meetings.meetings.calendar_modal") %>" type="button">
12
+ <span aria-hidden="true">&times;</span>
13
+ </button>
14
+ </div>
15
+ <ul>
16
+ <li>
17
+ <%= link_to t("outlook", scope: "decidim.meetings.meetings.calendar_modal"), ics_url %>
18
+ </li>
19
+ <li>
20
+ <%= link_to t("apple", scope: "decidim.meetings.meetings.calendar_modal"), ics_url %>
21
+ </li>
22
+ <li>
23
+ <%= link_to t("google", scope: "decidim.meetings.meetings.calendar_modal"), google_url, target: "_blank" %>
24
+ </li>
25
+ </ul>
26
+ </div>
@@ -4,7 +4,7 @@
4
4
  <div class="filters__section">
5
5
  <div class="filters__search">
6
6
  <div class="input-group">
7
- <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), data: { disable_dynamic_change: true } %>
7
+ <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %>
8
8
  <div class="input-group-button">
9
9
  <button type="submit" class="button" aria-controls="meetings">
10
10
  <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
@@ -33,6 +33,11 @@
33
33
  <p class="help-text"><%= t(".online_meeting_url_help") %></p>
34
34
  </div>
35
35
 
36
+ <div class="field" data-meeting-type="online">
37
+ <%= form.check_box :show_embedded_iframe %>
38
+ <p class="help-text"><%= t(".show_embedded_iframe_help") %></p>
39
+ </div>
40
+
36
41
  <div class="field">
37
42
  <%= form.datetime_field :start_time %>
38
43
  </div>
@@ -82,4 +87,4 @@
82
87
  ) %>
83
88
  </div>
84
89
 
85
- <%= javascript_include_tag "decidim/meetings/meetings_form" %>
90
+ <%= javascript_pack_tag "decidim_meetings" %>
@@ -4,7 +4,7 @@
4
4
  <div class="card card--meeting">
5
5
  <div class="card__content">
6
6
  <%= link_to resource_locator(meeting).path, class: "card__link" do %>
7
- <h5 class="card__title"><%= present(meeting).title %></h5>
7
+ <h5 class="card__title"><%= present(meeting).title(html_escape: true) %></h5>
8
8
  <% end %>
9
9
  <div class="card__datetime">
10
10
  <div class="card__datetime__date">