decidim-meetings 0.28.5 → 0.29.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of decidim-meetings might be problematic. Click here for more details.

Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/meetings/attending_organizations_list_cell.rb +1 -1
  3. data/app/cells/decidim/meetings/cancel_registration_meeting_button_cell.rb +1 -2
  4. data/app/cells/decidim/meetings/dates_and_map/show.erb +3 -5
  5. data/app/cells/decidim/meetings/dates_and_map_cell.rb +1 -1
  6. data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +1 -2
  7. data/app/cells/decidim/meetings/join_meeting_button/remaining_slots.erb +1 -0
  8. data/app/cells/decidim/meetings/join_meeting_button_cell.rb +0 -3
  9. data/app/cells/decidim/meetings/meeting_card_metadata_cell.rb +0 -3
  10. data/app/cells/decidim/meetings/meeting_cell.rb +0 -1
  11. data/app/cells/decidim/meetings/meeting_l_cell.rb +4 -7
  12. data/app/cells/decidim/meetings/meeting_url/show.erb +5 -5
  13. data/app/cells/decidim/meetings/meeting_url_cell.rb +0 -1
  14. data/app/cells/decidim/meetings/online_meeting_link_cell.rb +0 -2
  15. data/app/cells/decidim/meetings/question_responses/show.erb +7 -3
  16. data/app/cells/decidim/meetings/question_responses_cell.rb +0 -2
  17. data/app/commands/decidim/meetings/admin/copy_meeting.rb +2 -2
  18. data/app/commands/decidim/meetings/admin/create_agenda.rb +9 -37
  19. data/app/commands/decidim/meetings/admin/create_meeting.rb +28 -61
  20. data/app/commands/decidim/meetings/admin/destroy_meeting.rb +4 -33
  21. data/app/commands/decidim/meetings/admin/update_agenda.rb +7 -35
  22. data/app/commands/decidim/meetings/admin/update_meeting.rb +30 -68
  23. data/app/commands/decidim/meetings/admin/update_question_status.rb +1 -1
  24. data/app/commands/decidim/meetings/admin/update_questionnaire.rb +19 -11
  25. data/app/commands/decidim/meetings/admin/update_registrations.rb +20 -46
  26. data/app/commands/decidim/meetings/create_answer.rb +5 -4
  27. data/app/commands/decidim/meetings/create_meeting.rb +38 -62
  28. data/app/commands/decidim/meetings/join_meeting.rb +18 -19
  29. data/app/commands/decidim/meetings/update_meeting.rb +6 -7
  30. data/app/commands/decidim/meetings/withdraw_meeting.rb +1 -1
  31. data/app/controllers/concerns/decidim/meetings/admin/invites/filterable.rb +33 -0
  32. data/app/controllers/decidim/meetings/admin/agenda_controller.rb +1 -1
  33. data/app/controllers/decidim/meetings/admin/invites_controller.rb +6 -6
  34. data/app/controllers/decidim/meetings/admin/meetings_controller.rb +2 -2
  35. data/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb +12 -0
  36. data/app/controllers/decidim/meetings/application_controller.rb +1 -1
  37. data/app/controllers/decidim/meetings/live_events_controller.rb +1 -1
  38. data/app/controllers/decidim/meetings/meetings_controller.rb +3 -33
  39. data/app/controllers/decidim/meetings/polls/answers_controller.rb +10 -2
  40. data/app/controllers/decidim/meetings/registrations_controller.rb +3 -3
  41. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +1 -1
  42. data/app/forms/decidim/meetings/admin/meeting_agenda_items_form.rb +1 -1
  43. data/app/forms/decidim/meetings/admin/meeting_form.rb +1 -1
  44. data/app/forms/decidim/meetings/admin/meeting_registrations_form.rb +3 -3
  45. data/app/forms/decidim/meetings/admin/question_form.rb +8 -4
  46. data/app/forms/decidim/meetings/answer_form.rb +4 -4
  47. data/app/forms/decidim/meetings/meeting_form.rb +1 -1
  48. data/app/helpers/decidim/meetings/application_helper.rb +1 -5
  49. data/app/mailers/decidim/meetings/close_meeting_reminder_mailer.rb +1 -1
  50. data/app/models/decidim/meetings/meeting.rb +10 -4
  51. data/app/models/decidim/meetings/poll.rb +8 -0
  52. data/app/models/decidim/meetings/question.rb +1 -0
  53. data/app/models/decidim/meetings/questionnaire.rb +0 -6
  54. data/app/packs/src/decidim/meetings/admin/meetings_form.js +3 -3
  55. data/app/packs/src/decidim/meetings/meetings_form.js +3 -3
  56. data/app/packs/src/decidim/meetings/meetings_polls.js +5 -0
  57. data/app/packs/src/decidim/meetings/poll.component.js +32 -4
  58. data/app/packs/stylesheets/decidim/meetings/_item.scss +126 -6
  59. data/app/packs/stylesheets/decidim/meetings/_live_event.scss +0 -94
  60. data/app/permissions/decidim/meetings/permissions.rb +22 -7
  61. data/app/presenters/decidim/meetings/meeting_presenter.rb +10 -3
  62. data/app/services/decidim/meetings/calendar/component_calendar.rb +1 -1
  63. data/app/services/decidim/meetings/calendar/meeting_to_event.rb +1 -1
  64. data/app/services/decidim/meetings/close_meeting_reminder_generator.rb +1 -1
  65. data/app/services/decidim/meetings/meeting_iframe_embedder.rb +2 -2
  66. data/app/views/decidim/meetings/_calendar_modal.html.erb +1 -1
  67. data/app/views/decidim/meetings/admin/agenda/_agenda_item.html.erb +3 -3
  68. data/app/views/decidim/meetings/admin/agenda/_agenda_item_child.html.erb +3 -3
  69. data/app/views/decidim/meetings/admin/agenda/_agenda_item_fields.html.erb +3 -3
  70. data/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +3 -1
  71. data/app/views/decidim/meetings/admin/invites/_form.html.erb +4 -4
  72. data/app/views/decidim/meetings/admin/invites/index.html.erb +4 -34
  73. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +8 -8
  74. data/app/views/decidim/meetings/admin/meetings/_service.html.erb +3 -3
  75. data/app/views/decidim/meetings/admin/meetings/index.html.erb +2 -2
  76. data/app/views/decidim/meetings/admin/poll/_answer_option.html.erb +1 -1
  77. data/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb +1 -1
  78. data/app/views/decidim/meetings/admin/poll/_form.html.erb +26 -25
  79. data/app/views/decidim/meetings/admin/poll/_question.html.erb +18 -16
  80. data/app/views/decidim/meetings/admin/poll/edit.html.erb +4 -6
  81. data/app/views/decidim/meetings/admin/registrations/edit.html.erb +2 -4
  82. data/app/views/decidim/meetings/close_meeting_reminder_mailer/close_meeting_reminder.html.erb +1 -1
  83. data/app/views/decidim/meetings/layouts/live_event.html.erb +1 -15
  84. data/app/views/decidim/meetings/meetings/_datetime.html.erb +4 -4
  85. data/app/views/decidim/meetings/meetings/_form.html.erb +17 -17
  86. data/app/views/decidim/meetings/meetings/_meeting.html.erb +2 -1
  87. data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +2 -2
  88. data/app/views/decidim/meetings/meetings/_meeting_aside.html.erb +3 -1
  89. data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +1 -1
  90. data/app/views/decidim/meetings/meetings/_meeting_poll_actions.html.erb +15 -0
  91. data/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb +6 -10
  92. data/app/views/decidim/meetings/polls/answers/_single_option.html.erb +4 -10
  93. data/app/views/decidim/meetings/polls/answers/admin.html.erb +34 -0
  94. data/app/views/decidim/meetings/polls/answers/index.html.erb +36 -0
  95. data/app/views/decidim/meetings/polls/questions/_closed_question.html.erb +8 -2
  96. data/app/views/decidim/meetings/polls/questions/_index_admin.html.erb +27 -24
  97. data/app/views/decidim/meetings/polls/questions/_published_question.html.erb +14 -11
  98. data/app/views/decidim/meetings/polls/questions/_question.html.erb +1 -1
  99. data/app/views/decidim/meetings/polls/questions/index.js.erb +3 -3
  100. data/app/views/decidim/meetings/polls/questions/index_admin.js.erb +3 -3
  101. data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +1 -1
  102. data/app/views/devise/mailer/join_meeting.html.erb +3 -1
  103. data/app/views/devise/mailer/join_meeting.text.erb +3 -1
  104. data/config/locales/ar.yml +1 -13
  105. data/config/locales/bg.yml +45 -12
  106. data/config/locales/ca.yml +45 -13
  107. data/config/locales/cs.yml +28 -16
  108. data/config/locales/de.yml +114 -82
  109. data/config/locales/el.yml +1 -13
  110. data/config/locales/en.yml +44 -12
  111. data/config/locales/es-MX.yml +47 -15
  112. data/config/locales/es-PY.yml +47 -15
  113. data/config/locales/es.yml +48 -16
  114. data/config/locales/eu.yml +79 -47
  115. data/config/locales/fi-plain.yml +46 -14
  116. data/config/locales/fi.yml +56 -24
  117. data/config/locales/fr-CA.yml +48 -16
  118. data/config/locales/fr.yml +48 -16
  119. data/config/locales/ga-IE.yml +0 -8
  120. data/config/locales/gl.yml +3 -11
  121. data/config/locales/hu.yml +3 -12
  122. data/config/locales/id-ID.yml +1 -12
  123. data/config/locales/is-IS.yml +1 -12
  124. data/config/locales/it.yml +3 -16
  125. data/config/locales/ja.yml +47 -15
  126. data/config/locales/lb.yml +1 -7
  127. data/config/locales/lt.yml +3 -12
  128. data/config/locales/lv.yml +1 -12
  129. data/config/locales/nl.yml +1 -13
  130. data/config/locales/no.yml +1 -12
  131. data/config/locales/pl.yml +45 -12
  132. data/config/locales/pt-BR.yml +23 -17
  133. data/config/locales/pt.yml +1 -14
  134. data/config/locales/ro-RO.yml +2 -15
  135. data/config/locales/ru.yml +1 -12
  136. data/config/locales/sk.yml +1 -12
  137. data/config/locales/sv.yml +108 -206
  138. data/config/locales/tr-TR.yml +2 -17
  139. data/config/locales/uk.yml +1 -12
  140. data/config/locales/zh-CN.yml +1 -15
  141. data/config/locales/zh-TW.yml +1 -13
  142. data/db/migrate/20240130135858_add_withdrawn_fields_on_meetings.rb +23 -0
  143. data/decidim-meetings.gemspec +2 -2
  144. data/lib/decidim/api/meeting_type.rb +3 -12
  145. data/lib/decidim/api/meetings_type.rb +3 -1
  146. data/lib/decidim/meetings/component.rb +2 -2
  147. data/lib/decidim/meetings/engine.rb +5 -3
  148. data/lib/decidim/meetings/meeting_serializer.rb +3 -38
  149. data/lib/decidim/meetings/seeds.rb +13 -18
  150. data/lib/decidim/meetings/test/factories.rb +1 -7
  151. data/lib/decidim/meetings/test/notifications_handling.rb +1 -1
  152. data/lib/decidim/meetings/version.rb +1 -1
  153. data/lib/tasks/decidim_meetings.rake +1 -1
  154. metadata +24 -22
  155. data/app/views/decidim/meetings/admin/agenda/show.html.erb +0 -0
  156. data/config/locales/bn-BD.yml +0 -1
  157. data/config/locales/bs-BA.yml +0 -8
@@ -18,8 +18,6 @@
18
18
  &__aside {
19
19
  @apply flex-none bg-background-2;
20
20
 
21
- counter-reset: question;
22
-
23
21
  &.is-open {
24
22
  @apply w-1/5 [&+div]:w-4/5;
25
23
 
@@ -33,96 +31,4 @@
33
31
  }
34
32
  }
35
33
  }
36
-
37
- &__question {
38
- @apply bg-white;
39
-
40
- summary {
41
- @apply p-4 cursor-pointer font-bold text-secondary text-md transition border-b border-b-background hover:bg-background;
42
-
43
- transition: background-color 0.2s ease-in-out;
44
-
45
- &::after {
46
- counter-increment: question;
47
- content: "#" counter(question);
48
- }
49
-
50
- & ~ * {
51
- @apply p-4;
52
-
53
- // dynamic content
54
- > :first-child {
55
- @apply font-bold;
56
- }
57
-
58
- label {
59
- @apply flex items-baseline cursor-pointer;
60
- }
61
-
62
- label + label {
63
- @apply mt-4;
64
- }
65
- // end dynamic content
66
- }
67
- }
68
-
69
- &[open] .meeting-polls__answer--bar > * {
70
- opacity: 1;
71
- transform: translateX(0);
72
- }
73
-
74
- &.is-new {
75
- animation: animateHighlight 5s ease-in-out forwards;
76
- }
77
-
78
- @keyframes animateHighlight {
79
- 0%,
80
- 80% {
81
- background-color: rgba(var(--warning-rgb), 0.1);
82
- }
83
- }
84
- }
85
-
86
- &__question--admin {
87
- summary ~ * {
88
- @apply border-t border-t-background p-4 bg-background-2;
89
-
90
- a {
91
- @apply my-4 block text-sm underline;
92
- }
93
-
94
- > :first-child {
95
- @apply font-normal;
96
- }
97
- }
98
- }
99
-
100
- &__answer {
101
- @apply flex items-center gap-2;
102
-
103
- &--value {
104
- @apply w-1/5 font-bold;
105
- }
106
-
107
- &--bar {
108
- @apply w-4/5 h-2.5 overflow-hidden;
109
-
110
- > * {
111
- @apply bg-primary h-full opacity-0;
112
- }
113
- }
114
- }
115
-
116
- // vertical flow
117
- label + &__answer + label {
118
- @apply mt-6;
119
- }
120
-
121
- &__admin-label {
122
- @apply p-4 bg-secondary text-white font-bold text-sm;
123
- }
124
-
125
- &__admin-action {
126
- @apply py-2 flex items-center border-t-background [&>*]:flex-none first:[&>*]:w-2/5 last:[&>*]:w-3/5;
127
- }
128
34
  }
@@ -4,17 +4,12 @@ module Decidim
4
4
  module Meetings
5
5
  class Permissions < Decidim::DefaultPermissions
6
6
  def permissions
7
+ return permission_action unless user
8
+
7
9
  # Delegate the admin permission checks to the admin permissions class
8
10
  return Decidim::Meetings::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin
9
11
  return permission_action if permission_action.scope != :public
10
12
 
11
- if permission_action.subject == :meeting && permission_action.action == :read
12
- toggle_allow(!meeting&.hidden? && meeting&.current_user_can_visit_meeting?(user))
13
- return permission_action
14
- end
15
-
16
- return permission_action unless user
17
-
18
13
  case permission_action.subject
19
14
  when :answer
20
15
  case permission_action.action
@@ -44,6 +39,13 @@ module Decidim
44
39
  toggle_allow(can_close_meeting?)
45
40
  when :register
46
41
  toggle_allow(can_register_invitation_meeting?)
42
+ when :reply_poll
43
+ toggle_allow(can_reply_poll?)
44
+ end
45
+ when :poll
46
+ case permission_action.action
47
+ when :update
48
+ toggle_allow(can_update_poll?)
47
49
  end
48
50
  else
49
51
  return permission_action
@@ -117,6 +119,19 @@ module Decidim
117
119
  authorized?(:register, resource: meeting)
118
120
  end
119
121
 
122
+ def can_reply_poll?
123
+ meeting.present? &&
124
+ meeting.poll.present? &&
125
+ authorized?(:reply_poll, resource: meeting)
126
+ end
127
+
128
+ def can_update_poll?
129
+ user.present? &&
130
+ user.admin? &&
131
+ meeting.present? &&
132
+ meeting.poll.present?
133
+ end
134
+
120
135
  def can_answer_question?
121
136
  question.present? && user.present? && !question.answered_by?(user)
122
137
  end
@@ -64,17 +64,20 @@ module Decidim
64
64
  end
65
65
  end
66
66
 
67
- def closing_report(links: false, extras: false, strip_tags: false, all_locales: false)
67
+ def closing_report(links: false, all_locales: false)
68
68
  return unless meeting
69
69
 
70
- content_handle_locale(meeting.closing_report, all_locales, extras, links, strip_tags)
70
+ handle_locales(meeting.closing_report, all_locales) do |content|
71
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(sanitized(content))
72
+ renderer.render(links:).html_safe
73
+ end
71
74
  end
72
75
 
73
76
  def registration_email_custom_content(links: false, all_locales: false)
74
77
  return unless meeting
75
78
 
76
79
  handle_locales(meeting.registration_email_custom_content, all_locales) do |content|
77
- renderer = Decidim::ContentRenderers::HashtagRenderer.new(decidim_sanitize_editor_admin(content))
80
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(sanitized(content))
78
81
  renderer.render(links:).html_safe
79
82
  end
80
83
  end
@@ -135,6 +138,10 @@ module Decidim
135
138
 
136
139
  proposals.map.with_index { |proposal, index| "#{index + 1}) #{proposal.title}\n" }
137
140
  end
141
+
142
+ def sanitized(content)
143
+ decidim_sanitize_editor(content)
144
+ end
138
145
  end
139
146
  end
140
147
  end
@@ -31,7 +31,7 @@ module Decidim
31
31
  #
32
32
  # Returns a collection of Meetings filtered based on provided params.
33
33
  def filtered_meetings
34
- meetings.not_hidden.published.except_withdrawn.ransack(@filters).result
34
+ meetings.not_hidden.published.not_withdrawn.ransack(@filters).result
35
35
  end
36
36
  end
37
37
  end
@@ -22,7 +22,7 @@ module Decidim
22
22
  class MeetingToEvent
23
23
  include ActionView::Helpers::SanitizeHelper
24
24
 
25
- # Initializes the converteer for the given meeting.
25
+ # Initializes the converter for the given meeting.
26
26
  #
27
27
  # meeting - the Meeting to convert
28
28
  def initialize(meeting)
@@ -27,7 +27,7 @@ module Decidim
27
27
  Decidim::Meetings::Meeting
28
28
  .published
29
29
  .not_hidden
30
- .except_withdrawn
30
+ .not_withdrawn
31
31
  .where(
32
32
  "decidim_component_id = ? AND end_time >= ? AND end_time <= ? AND closed_at IS NULL",
33
33
  component_id,
@@ -5,7 +5,7 @@ require "cgi"
5
5
  module Decidim
6
6
  module Meetings
7
7
  # This class handles the streaming url to be included in the iframe present
8
- # in the live event. For some services it is required to transforma a bit
8
+ # in the live event. For some services it is required to transform a bit
9
9
  # the structure of the URL.
10
10
  class MeetingIframeEmbedder
11
11
  # Public: Initializes the service.
@@ -55,7 +55,7 @@ module Decidim
55
55
  @embeddable_services ||= Meetings.embeddable_services
56
56
  end
57
57
 
58
- # Youtube transformation consists on:
58
+ # YouTube transformation consists on:
59
59
  # 1. extract the video id from the parameter v
60
60
  # 2. Create a new URL using the domain youtube-nocookie.com, converting it to an embed
61
61
  # and appending the video id
@@ -1,4 +1,4 @@
1
- <button class="button button__sm button__transparent-secondary mt-6 md:mt-12 md:self-start" data-dialog-open="calendarShare" role=menuitem>
1
+ <button class="button button__sm button__transparent-secondary mt-6 md:mt-12 md:self-start" data-dialog-open="calendarShare">
2
2
  <%= t(".export_calendar") %>
3
3
  <%= icon "download-cloud-2-line", class: "fill-current" %>
4
4
  </button>
@@ -6,15 +6,15 @@
6
6
  <%== "#{icon("drag-move-2-fill")} #{t(".agenda_item")}" %>
7
7
  </span>
8
8
 
9
- <button class="button button__sm button__transparent-secondary small alert hollow move-up-agenda-item button--title">
9
+ <button class="button button__sm button__transparent-secondary small alert move-up-agenda-item button--title">
10
10
  <%== "#{icon("arrow-up-line")} #{t(".up")}" %>
11
11
  </button>
12
12
 
13
- <button class="button button__sm button__transparent-secondary small alert hollow move-down-agenda-item button--title">
13
+ <button class="button button__sm button__transparent-secondary small alert move-down-agenda-item button--title">
14
14
  <%== "#{icon("arrow-down-line")} #{t(".down")}" %>
15
15
  </button>
16
16
 
17
- <button class="button button__sm button__transparent-secondary small alert hollow remove-agenda-item button--title">
17
+ <button class="button button__sm button__transparent-secondary small alert remove-agenda-item button--title">
18
18
  <%= t(".remove") %>
19
19
  </button>
20
20
  </h2>
@@ -6,15 +6,15 @@
6
6
  <%== "#{icon("drag-move-2-fill")} #{t(".agenda_item_child")}" %>
7
7
  </span>
8
8
 
9
- <button class="button button__sm button__transparent-secondary small alert hollow move-up-agenda-item-child button--title">
9
+ <button class="button button__sm button__transparent-secondary small alert move-up-agenda-item-child button--title">
10
10
  <%== "#{icon("arrow-up-line")} #{t(".up")}" %>
11
11
  </button>
12
12
 
13
- <button class="button button__sm button__transparent-secondary small alert hollow move-down-agenda-item-child button--title">
13
+ <button class="button button__sm button__transparent-secondary small alert move-down-agenda-item-child button--title">
14
14
  <%== "#{icon("arrow-down-line")} #{t(".down")}" %>
15
15
  </button>
16
16
 
17
- <button class="button button__sm button__transparent-secondary small alert hollow remove-agenda-item-child button--title">
17
+ <button class="button button__sm button__transparent-secondary small alert remove-agenda-item-child button--title">
18
18
  <%= t(".remove") %>
19
19
  </button>
20
20
  </h2>
@@ -1,14 +1,14 @@
1
1
  <div class="grid-x">
2
- <div class="cell auto">
2
+ <div class="cell">
3
3
  <%= form.translated :text_field, :title, tabs_id:, aria: { label: :title } %>
4
4
  </div>
5
- <div class="cell small-2">
5
+ <div class="cell">
6
6
  <%= form.number_field :duration, tabs_id:, min: 0 %>
7
7
  </div>
8
8
  </div>
9
9
 
10
10
  <div class="grid-x">
11
- <div class="cell auto">
11
+ <div class="cell">
12
12
  <%= form.translated :editor, :description, tabs_id:, rows: 6, aria: { label: :description } %>
13
13
  </div>
14
14
  </div>
@@ -1,7 +1,9 @@
1
1
  <p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", email: @user.name) %></p>
2
2
 
3
3
  <p class="email-instructions">
4
- <%= t ".invited_you_to_join_a_meeting", invited_by: @invited_by.name, application: @user.organization.name %>
4
+ <%= t ".invited_you_to_join_a_meeting",
5
+ invited_by: @invited_by.name,
6
+ application: translated_attribute(@user.organization.name) %>
5
7
  </p>
6
8
 
7
9
  <p class="email-button email-button__cta cta-decline">
@@ -12,7 +12,7 @@
12
12
  <div id="panel-attendee" class="card-section">
13
13
 
14
14
  <div class="row column">
15
- <fieldset class="check-radio-collection">
15
+ <fieldset>
16
16
  <%= form.collection_radio_buttons(:existing_user, [[t(".non_user"), false], [t(".existing_user"), true]], :last, :first) %>
17
17
  </fieldset>
18
18
  </div>
@@ -22,14 +22,14 @@
22
22
  </div>
23
23
 
24
24
  <div class="row column">
25
- <div class="auto cell attendee-fields--new-user">
25
+ <div class="cell attendee-fields--new-user">
26
26
  <%= form.text_field :name, disabled: %>
27
27
  </div>
28
- <div class="auto cell attendee-fields--new-user">
28
+ <div class="cell attendee-fields--new-user">
29
29
  <%= form.text_field :email, disabled: %>
30
30
  </div>
31
31
 
32
- <div class="auto cell attendee-fields--user-picker">
32
+ <div class="cell attendee-fields--user-picker">
33
33
  <% prompt_options = { url: decidim_admin.users_organization_url, placeholder: t(".select_user") } %>
34
34
  <%= form.autocomplete_select(:user_id, form.object.user.presence, { multiple: false, class: "autocomplete-field--results-inline" }, prompt_options) do |user|
35
35
  { value: user.id, label: "#{user.name} (@#{user.nickname})" }
@@ -18,38 +18,8 @@
18
18
  <% end %>
19
19
  <% end %>
20
20
 
21
- <%# NOTE: this old filters section should be refactorized in order to use the shared admin_filter_selector method
22
- it would require the definition of concerns similar to decidim-conferences/app/controllers/concerns/decidim/conferences/admin/filterable.rb %>
23
- <div class="filters__section mt-4">
24
- <div class="fcell">
25
- <ul class="dropdown menu" data-dropdown-menu data-click-open="true" data-close-on-click-inside="false">
26
- <li class="is-dropdown-submenu-parent">
27
- <a href="#" class="dropdown button">
28
- <%= t("filter_label", scope: "decidim.admin.filters") %>
29
- <%= icon "arrow-down-s-line", class: "dropdown-filter-icon" %>
30
- </a>
31
- <ul class="menu is-dropdown-submenu">
32
- <li><%= link_to t(".filter.sent"), url_for(status: "sent", q: @query) %></li>
33
- <li><%= link_to t(".filter.accepted"), url_for(status: "accepted", q: @query) %></li>
34
- <li><%= link_to t(".filter.rejected"), url_for(status: "rejected", q: @query) %></li>
35
- <li><%= link_to t(".filter.all"), url_for(q: @query) %></li>
36
- </ul>
37
- </li>
38
- </ul>
39
- </div>
40
- <div class="fcell search">
41
- <%= form_tag "", method: :get do %>
42
- <div class="input-group">
43
- <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
44
- <%= hidden_field_tag :state, @state %>
45
- <div class="input-group-button">
46
- <button type="submit" class="text-secondary" aria-label="<%= t("decidim.search.term_input_placeholder") %>">
47
- <%= icon "search-line", class: "fill-secondary w-4 h-4" %>
48
- </button>
49
- </div>
50
- </div>
51
- <% end %>
52
- </div>
21
+ <div class="mt-4">
22
+ <%= admin_filter_selector %>
53
23
  </div>
54
24
 
55
25
  <div class="card" id="meeting-invites">
@@ -67,7 +37,7 @@
67
37
  </tr>
68
38
  </thead>
69
39
  <tbody>
70
- <% invites.each do |invite| %>
40
+ <% @invites.each do |invite| %>
71
41
  <% presenter = Decidim::Meetings::InvitePresenter.new(invite) %>
72
42
  <tr data-id="<%= invite.id %>">
73
43
  <td>
@@ -90,6 +60,6 @@
90
60
  </table>
91
61
  </div>
92
62
  </div>
93
- <%= decidim_paginate invites %>
63
+ <%= decidim_paginate @invites %>
94
64
  </div>
95
65
  </div>
@@ -1,11 +1,11 @@
1
1
  <div class="form__wrapper">
2
2
  <div class="card pt-4">
3
3
  <div class="card-section">
4
- <div class="row column hashtags__container">
4
+ <div class="row column">
5
5
  <%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true, aria: { label: :title } %>
6
6
  </div>
7
7
 
8
- <div class="row column hashtags__container">
8
+ <div class="row column">
9
9
  <%= form.translated :editor, :description, hashtaggable: true, aria: { label: :description } %>
10
10
  </div>
11
11
 
@@ -16,11 +16,11 @@
16
16
  { multiple: false } %>
17
17
  </div>
18
18
 
19
- <div class="row column field" data-meeting-type="in_person">
19
+ <div class="row column" data-meeting-type="in_person">
20
20
  <%= form.geocoding_field :address, help_text: t(".address_help") %>
21
21
  </div>
22
22
 
23
- <div class="row column field" data-meeting-type="in_person">
23
+ <div class="row column" data-meeting-type="in_person">
24
24
  <%= form.translated :text_area, :location, help_text: t(".location_help") %>
25
25
  </div>
26
26
 
@@ -28,12 +28,12 @@
28
28
  <%= form.translated :text_area, :location_hints, help_text: t(".location_hints_help") %>
29
29
  </div>
30
30
 
31
- <div class="row column field" data-meeting-type="online">
31
+ <div class="row column" data-meeting-type="online">
32
32
  <%= form.text_field :online_meeting_url, help_text: t(".online_meeting_url_help") %>
33
33
  </div>
34
34
 
35
35
  <div class="iframe-fields">
36
- <div class="row column field iframe-fields--embed-type" id="meeting_iframe_embed_type" data-meeting-type="online">
36
+ <div class="row column iframe-fields--embed-type" id="meeting_iframe_embed_type" data-meeting-type="online">
37
37
  <%= form.select :iframe_embed_type,
38
38
  @form.iframe_embed_type_select,
39
39
  {
@@ -42,7 +42,7 @@
42
42
  } %>
43
43
  </div>
44
44
 
45
- <div class="row column field iframe-fields--access-level" data-meeting-type="online-access-level">
45
+ <div class="row column iframe-fields--access-level" data-meeting-type="online-access-level">
46
46
  <%= form.select :iframe_access_level,
47
47
  @form.iframe_access_level_select,
48
48
  { include_blank: t(".select_an_iframe_access_level") },
@@ -80,7 +80,7 @@
80
80
 
81
81
  <div class="row column" id="meeting_registration_url">
82
82
  <%= form.text_field :registration_url, help_text: t(".registration_url_help") %>
83
- <%= cell("decidim/announcement", t(".disclaimer", organization: current_component.organization.name), callout_class: "alert" ) %>
83
+ <%= cell("decidim/announcement", t(".disclaimer", organization: organization_name(current_component.organization)), callout_class: "alert" ) %>
84
84
  </div>
85
85
 
86
86
  <div class="row column" id="private_meeting">
@@ -6,17 +6,17 @@
6
6
  <span><%= t(".service") %></span>
7
7
 
8
8
  <div class="ml-auto flex gap-x-4">
9
- <button class="button button__sm button__transparent-secondary small alert hollow move-up-service button--title">
9
+ <button class="button button__sm button__transparent-secondary small alert move-up-service button--title">
10
10
  <%= icon "arrow-up-line" %>
11
11
  <%= t(".up") %>
12
12
  </button>
13
13
 
14
- <button class="button button__sm button__transparent-secondary small alert hollow move-down-service button--title">
14
+ <button class="button button__sm button__transparent-secondary small alert move-down-service button--title">
15
15
  <%= icon "arrow-down-line" %>
16
16
  <%= t(".down") %>
17
17
  </button>
18
18
 
19
- <button class="button button__sm button__transparent-secondary small alert hollow remove-service button--title">
19
+ <button class="button button__sm button__transparent-secondary small alert remove-service button--title">
20
20
  <%= t(".remove") %>
21
21
  </button>
22
22
  </div>
@@ -37,7 +37,7 @@
37
37
  <%= sort_link(query, :scope_name, t("models.proposal.fields.scope", scope: "decidim.proposals") ) %>
38
38
  </th>
39
39
  <% end %>
40
- <th class="actions"><%= t("actions.title", scope: "decidim.meetings") %></th>
40
+ <th><%= t("actions.title", scope: "decidim.meetings") %></th>
41
41
  </tr>
42
42
  </thead>
43
43
  <tbody>
@@ -138,7 +138,7 @@
138
138
  <% else %>
139
139
  <%=
140
140
  content_tag(:button,
141
- class: ["action-icon", "action-icon--remove", "destroy-meeting-alert"],
141
+ :class => ["action-icon", "action-icon--remove", "destroy-meeting-alert"],
142
142
  "data-invalid-destroy-message" => t("actions.invalid_destroy.proposals_count", count: present(meeting).authored_proposals.size, scope: "decidim.meetings"),
143
143
  "data-proposal-titles" => present(meeting).formatted_proposals_titles) do
144
144
  content_tag(:span,
@@ -5,7 +5,7 @@
5
5
  <h2 class="card-title">
6
6
  <span><%= t("answer_option", scope: "decidim.forms.admin.questionnaires.answer_option") %></span>
7
7
  <% if editable %>
8
- <button class="button button__sm button__transparent-secondary small alert hollow remove-answer-option button--title mb-2">
8
+ <button class="button button__sm button__transparent-secondary small alert remove-answer-option button--title mb-2">
9
9
  <%= icon("delete-bin-line") %>
10
10
  <%= t("remove", scope: "decidim.forms.admin.questionnaires.answer_option") %>
11
11
  </button>
@@ -2,6 +2,6 @@
2
2
 
3
3
  <script type="text/template" class="decidim-answer-option-template decidim-template" id="<%= template_id %>">
4
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:, editable: %>
5
+ <%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question:, editable: question.editable? %>
6
6
  <% end %>
7
7
  </script>
@@ -4,19 +4,24 @@
4
4
  <button type="button" class="button button__sm button__secondary expand-all"><%= t("expand", scope: "decidim.forms.admin.questionnaires.form") %></button>
5
5
  </div>
6
6
 
7
- <% if questionnaire.questions_editable? %>
8
- <%= fields_for "questionnaire[questions][#{blank_question.to_param}]", blank_question do |question_form| %>
9
- <script type="text/template" class="decidim-question-template decidim-template" id="question-template">
10
- <%= render "decidim/meetings/admin/poll/question",
11
- form: question_form,
12
- id: tabs_id_for_question(blank_question),
13
- editable: questionnaire.questions_editable?,
14
- answer_option_template_selector: "#answer-option-template-dummy" %>
15
- </script>
16
- <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-dummy" %>
17
- <% end %>
18
- <% else %>
19
- <%= cell("decidim/announcement", t("already_answered_warning", scope: "decidim.forms.admin.questionnaires.form"), callout_class: "warning" ) %>
7
+ <% announcement_body = capture do %>
8
+ <ul>
9
+ <% t("announcement_html", admin_link: Decidim::EngineRouter.main_proxy(meeting.component).admin_meeting_polls_answers_path(meeting), scope: "decidim.meetings.admin.poll.form").each do |item| %>
10
+ <li> <%= item %></li>
11
+ <% end %>
12
+ </ul>
13
+ <% end %>
14
+ <%= cell("decidim/announcement", { body: announcement_body }, callout_class: "info") %>
15
+
16
+ <%= fields_for "questionnaire[questions][#{blank_question.to_param}]", blank_question do |question_form| %>
17
+ <script type="text/template" class="decidim-question-template decidim-template" id="question-template">
18
+ <%= render "decidim/meetings/admin/poll/question",
19
+ form: question_form,
20
+ id: tabs_id_for_question(blank_question),
21
+ editable: true,
22
+ answer_option_template_selector: "#answer-option-template-dummy" %>
23
+ </script>
24
+ <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: true, template_id: "answer-option-template-dummy" %>
20
25
  <% end %>
21
26
 
22
27
  <div class="questionnaire-questions-list flex flex-col py-6 gap-6 last:pb-0">
@@ -25,24 +30,20 @@
25
30
  <%= render "decidim/meetings/admin/poll/question",
26
31
  form: question_form,
27
32
  id: tabs_id_for_question(question),
28
- editable: questionnaire.questions_editable?,
33
+ editable: question.editable?,
29
34
  answer_option_template_selector: "#answer-option-template-#{index}" %>
30
- <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-#{index}" %>
35
+ <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: question.editable?, template_id: "answer-option-template-#{index}" %>
31
36
  <% end %>
32
37
  <% end %>
33
38
  </div>
34
39
 
35
- <% if questionnaire.questions_editable? %>
36
- <button class="button button__sm button__secondary add-question"><%= t("add_question", scope: "decidim.forms.admin.questionnaires.form") %></button>
37
- <% end %>
40
+ <button class="button button__sm button__secondary add-question"><%= t("add_question", scope: "decidim.forms.admin.questionnaires.form") %></button>
38
41
  </div>
39
42
 
40
43
  <%= append_javascript_pack_tag "decidim_forms_admin" %>
41
44
 
42
- <% if questionnaire.questions_editable? %>
43
- <script>
44
- document.addEventListener("DOMContentLoaded", function () {
45
- window.Decidim.createEditableForm()
46
- })
47
- </script>
48
- <% end %>
45
+ <script>
46
+ document.addEventListener("DOMContentLoaded", function () {
47
+ window.Decidim.createEditableForm()
48
+ })
49
+ </script>