decidim-meetings 0.29.1 → 0.29.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/meetings/dates_and_map/show.erb +5 -3
  3. data/app/cells/decidim/meetings/dates_and_map_cell.rb +1 -1
  4. data/app/cells/decidim/meetings/meeting_l_cell.rb +5 -0
  5. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +1 -1
  6. data/app/forms/decidim/meetings/admin/meeting_agenda_items_form.rb +1 -1
  7. data/app/forms/decidim/meetings/admin/meeting_form.rb +1 -1
  8. data/app/forms/decidim/meetings/admin/meeting_registrations_form.rb +2 -2
  9. data/app/packs/stylesheets/decidim/meetings/_item.scss +5 -17
  10. data/app/permissions/decidim/meetings/permissions.rb +7 -2
  11. data/app/presenters/decidim/meetings/meeting_presenter.rb +1 -5
  12. data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +1 -1
  13. data/app/views/decidim/meetings/shared/_index.js.erb +3 -4
  14. data/config/locales/ar.yml +3 -1
  15. data/config/locales/bg.yml +0 -1
  16. data/config/locales/bn-BD.yml +1 -0
  17. data/config/locales/bs-BA.yml +8 -0
  18. data/config/locales/ca.yml +1 -1
  19. data/config/locales/cs.yml +5 -4
  20. data/config/locales/de.yml +70 -70
  21. data/config/locales/el.yml +3 -1
  22. data/config/locales/es-MX.yml +3 -3
  23. data/config/locales/es-PY.yml +3 -3
  24. data/config/locales/es.yml +4 -4
  25. data/config/locales/eu.yml +35 -35
  26. data/config/locales/fi-plain.yml +2 -2
  27. data/config/locales/fi.yml +12 -12
  28. data/config/locales/fr-CA.yml +4 -4
  29. data/config/locales/fr.yml +4 -4
  30. data/config/locales/ga-IE.yml +3 -0
  31. data/config/locales/gl.yml +7 -3
  32. data/config/locales/hu.yml +5 -3
  33. data/config/locales/id-ID.yml +9 -1
  34. data/config/locales/is-IS.yml +9 -1
  35. data/config/locales/it.yml +8 -3
  36. data/config/locales/ja.yml +2 -2
  37. data/config/locales/lb.yml +4 -1
  38. data/config/locales/lt.yml +2 -3
  39. data/config/locales/lv.yml +9 -1
  40. data/config/locales/nl.yml +3 -1
  41. data/config/locales/no.yml +3 -1
  42. data/config/locales/pl.yml +0 -1
  43. data/config/locales/pt-BR.yml +5 -6
  44. data/config/locales/pt.yml +6 -1
  45. data/config/locales/ro-RO.yml +5 -2
  46. data/config/locales/ru.yml +9 -1
  47. data/config/locales/sk.yml +9 -1
  48. data/config/locales/tr-TR.yml +13 -2
  49. data/config/locales/uk.yml +9 -1
  50. data/config/locales/zh-CN.yml +11 -1
  51. data/config/locales/zh-TW.yml +3 -1
  52. data/decidim-meetings.gemspec +1 -1
  53. data/lib/decidim/api/meeting_type.rb +12 -0
  54. data/lib/decidim/api/meetings_type.rb +1 -3
  55. data/lib/decidim/meetings/engine.rb +2 -0
  56. data/lib/decidim/meetings/meeting_serializer.rb +37 -0
  57. data/lib/decidim/meetings/test/factories.rb +6 -0
  58. data/lib/decidim/meetings/version.rb +1 -1
  59. metadata +17 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e7f819ca23ee377f7c6b3f36c884edeb1db3793de73e78445948e49b62a5bad
4
- data.tar.gz: 6b463bf3658a7c1d0b3d9ca26a25eb800ca7ec70da30b6e11cc7db00f0522f17
3
+ metadata.gz: 1914015424af6badd9b0449162f29d9531f45777617c85abf7afc8bcfc7fc439
4
+ data.tar.gz: a60c1966bd2920683d25767d342118657da641bbf0332d3b19a4a038602810d6
5
5
  SHA512:
6
- metadata.gz: 0c18cde6a37d3e4c56dba6e951c3dd27e4af50f9895156796b7d4908001ca7534099874f6279bbb5cc1b49ebc7106e7d5b9fb0b5c9dfbc5c3fc8626c1ea8be56
7
- data.tar.gz: 67312f06fa33b06598e930f97cd37ef6eabf9218499e725fa4d0e25bd36d181335efd5e772c1c51036d4caad3df1727c0974afb3a9b66d038895dd8df9e48af6
6
+ metadata.gz: b299704d14a16389756ded8685c48e5e5e4283640fe8418e7be764a52f8fa837325d8659b3a9686bef37f60467fe8186942251cf9439b954b1353681984f6491
7
+ data.tar.gz: ffd91e602170b5a2479c63565c01f990daa13ef2db41561b23c4c5c18319a8a3b51ba921bae5dec70f22c0235a0fa3590eb0dde046676e7da92df2769fce70e2
@@ -15,9 +15,11 @@
15
15
  </div>
16
16
  </div>
17
17
 
18
- <%= static_map %>
19
-
20
- <% if online? %>
18
+ <% if display_map? %>
19
+ <%= static_map %>
20
+ <% elsif online? %>
21
21
  <%= cell("decidim/address", meeting, online: true) %>
22
+ <% else %>
23
+ <%= cell("decidim/address", meeting) %>
22
24
  <% end %>
23
25
  </div>
@@ -14,7 +14,7 @@ module Decidim
14
14
  delegate :snippets, to: :controller
15
15
 
16
16
  def static_map
17
- return render :static_map if display_map?
17
+ return render :static_map
18
18
  end
19
19
 
20
20
  def year
@@ -13,6 +13,11 @@ module Decidim
13
13
  "card__calendar-list__reset"
14
14
  end
15
15
 
16
+ # Renders the date in the meeting card list
17
+ def has_image?
18
+ true
19
+ end
20
+
16
21
  def image
17
22
  render
18
23
  end
@@ -7,7 +7,7 @@ module Decidim
7
7
  class CloseMeetingForm < Decidim::Form
8
8
  include TranslatableAttributes
9
9
 
10
- translatable_attribute :closing_report, String
10
+ translatable_attribute :closing_report, Decidim::Attributes::RichText
11
11
  attribute :video_url, String
12
12
  attribute :audio_url, String
13
13
  attribute :closing_visible, Boolean, default: true
@@ -8,7 +8,7 @@ module Decidim
8
8
  include TranslatableAttributes
9
9
 
10
10
  translatable_attribute :title, String
11
- translatable_attribute :description, String
11
+ translatable_attribute :description, Decidim::Attributes::RichText
12
12
 
13
13
  attribute :duration, Integer, default: 0
14
14
  attribute :parent_id, Integer
@@ -23,7 +23,7 @@ module Decidim
23
23
  attribute :iframe_access_level, String
24
24
 
25
25
  translatable_attribute :title, String
26
- translatable_attribute :description, String
26
+ translatable_attribute :description, Decidim::Attributes::RichText
27
27
  translatable_attribute :location, String
28
28
  translatable_attribute :location_hints, String
29
29
 
@@ -15,8 +15,8 @@ module Decidim
15
15
  attribute :available_slots, Integer
16
16
  attribute :reserved_slots, Integer
17
17
 
18
- translatable_attribute :registration_terms, String
19
- translatable_attribute :registration_email_custom_content, String
18
+ translatable_attribute :registration_terms, Decidim::Attributes::RichText
19
+ translatable_attribute :registration_email_custom_content, Decidim::Attributes::RichText
20
20
 
21
21
  validates :registration_terms, translatable_presence: true, if: ->(form) { form.registrations_enabled? }
22
22
  validates :available_slots, :reserved_slots, presence: true, if: ->(form) { form.registrations_enabled? }
@@ -6,29 +6,17 @@
6
6
  }
7
7
 
8
8
  &__calendar {
9
- @apply w-14 flex flex-col justify-start rounded bg-background text-center;
9
+ @apply order-first flex flex-col min-w-48 rounded bg-background text-center md:w-14;
10
10
 
11
11
  &:only-child &-month {
12
12
  @apply rounded-t;
13
13
  }
14
14
 
15
15
  &-container {
16
- @apply grid grid-cols-[auto_1fr] md:grid-cols-[auto_1fr_1fr] items-center gap-0 md:gap-x-5 border-4 border-background rounded md:h-[140px] overflow-hidden;
16
+ @apply flex flex-wrap flex-col md:flex-row gap-2 border-4 border-background rounded;
17
17
 
18
- > *:nth-child(2) {
19
- @apply p-4 md:p-0;
20
-
21
- &:not(:last-child) {
22
- @apply col-span-2 md:col-auto order-2 md:order-1;
23
- }
24
-
25
- &:last-child {
26
- @apply md:col-span-2 pr-4;
27
- }
28
- }
29
-
30
- > *:nth-child(3) {
31
- @apply order-1 md:order-2 h-[135px] md:h-full;
18
+ ul {
19
+ @apply flex-1 p-2;
32
20
  }
33
21
  }
34
22
 
@@ -55,7 +43,7 @@
55
43
  }
56
44
 
57
45
  &__lg {
58
- @apply w-fit justify-center [&>*]:px-2 min-w-24 h-[8.5rem];
46
+ @apply flex min-w-48;
59
47
  }
60
48
 
61
49
  &__lg &-month {
@@ -4,12 +4,17 @@ module Decidim
4
4
  module Meetings
5
5
  class Permissions < Decidim::DefaultPermissions
6
6
  def permissions
7
- return permission_action unless user
8
-
9
7
  # Delegate the admin permission checks to the admin permissions class
10
8
  return Decidim::Meetings::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin
11
9
  return permission_action if permission_action.scope != :public
12
10
 
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
+
13
18
  case permission_action.subject
14
19
  when :answer
15
20
  case permission_action.action
@@ -74,7 +74,7 @@ module Decidim
74
74
  return unless meeting
75
75
 
76
76
  handle_locales(meeting.registration_email_custom_content, all_locales) do |content|
77
- renderer = Decidim::ContentRenderers::HashtagRenderer.new(sanitized(content))
77
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(decidim_sanitize_editor_admin(content))
78
78
  renderer.render(links:).html_safe
79
79
  end
80
80
  end
@@ -135,10 +135,6 @@ module Decidim
135
135
 
136
136
  proposals.map.with_index { |proposal, index| "#{index + 1}) #{proposal.title}\n" }
137
137
  end
138
-
139
- def sanitized(content)
140
- decidim_sanitize_editor(content)
141
- end
142
138
  end
143
139
  end
144
140
  end
@@ -6,5 +6,5 @@
6
6
  <% if @meeting.customize_registration_email? %>
7
7
  <p><%= present(@meeting).registration_email_custom_content %></p>
8
8
  <% end %>
9
-
9
+ <br>
10
10
  <p class="email-instructions"><%= t(".details") %></p>
@@ -4,13 +4,12 @@ $meetings.html('<%= j(render partial: "decidim/meetings/shared/meetings", locals
4
4
  var $urlCalendarUrl = $('#urlCalendarUrl');
5
5
  $urlCalendarUrl.val("<%= short_url(route_name: "calendar", params: { filter: params.fetch(:filter, {}).try(:to_unsafe_hash) }) %>");
6
6
 
7
- var meeting_frame = document.getElementById("meeting_frame");
8
- meeting_frame.dataset.filteredPath = "<%= request.fullpath %>"
9
-
10
7
  var $map = $("#map");
11
8
  var controller = $map.data("map-controller");
12
9
  if (controller) {
13
10
  var markerData = JSON.parse('<%= escape_javascript meetings_data_for_map(search.result).to_json.html_safe %>');
14
11
  controller.clearMarkers();
15
- controller.addMarkers(markerData);
12
+ if (markerData.length > 0){
13
+ controller.addMarkers(markerData);
14
+ }
16
15
  }
@@ -205,7 +205,6 @@ ar:
205
205
  attachment_collections: المجلدات
206
206
  attachments: مرفقات
207
207
  close: قريب
208
- confirm_destroy: هل أنت متأكد أنك تريد حذف هذا الاجتماع؟
209
208
  destroy: حذف
210
209
  edit: تعديل
211
210
  invalid_destroy:
@@ -465,6 +464,9 @@ ar:
465
464
  see_all: عرض كافة الاجتماعات
466
465
  see_all_withdrawn: عرض جميع الاجتماعات المسحوبة
467
466
  text_banner: أنت تستعرض قائمة الاجتماعات التي تم سحبها من قبل مؤلفيها. %{go_back_link}.
467
+ meeting:
468
+ close_meeting: اجتماع قريب
469
+ edit_meeting: تعديل الاجتماعات
468
470
  meetings:
469
471
  upcoming_meetings_warning: حاليًا ، لا توجد اجتماعات مجدولة ، ولكن يمكنك هنا العثور على جميع الاجتماعات السابقة المدرجة.
470
472
  new:
@@ -235,7 +235,6 @@ bg:
235
235
  attachment_collections: Папки
236
236
  attachments: Прикачени файлове
237
237
  close: Затвори
238
- confirm_destroy: Наистина ли искате да изтриете тази среща?
239
238
  destroy: Изтрий
240
239
  edit: Редактирай
241
240
  invalid_destroy:
@@ -0,0 +1 @@
1
+ bn:
@@ -0,0 +1,8 @@
1
+ ---
2
+ bs:
3
+ decidim:
4
+ meetings:
5
+ admin:
6
+ registrations:
7
+ form:
8
+ recommendation_message: Zbog vaše privatnosti preporučujemo da obrišete ovaj prijavni formular kada vam više ne treba, obično 3 meseca nakon što se sastanak završio.
@@ -533,7 +533,7 @@ ca:
533
533
  see_all_withdrawn: Veure totes les trobades cancel·lades
534
534
  text_banner: Estàs veient un llistat de trobades cancel·lades per les seves autores. %{go_back_link}.
535
535
  meeting:
536
- close_meeting: Tancar la trobada
536
+ close_meeting: Tancar trobada
537
537
  edit_close_meeting: Editar l'informe de la trobada
538
538
  edit_meeting: Editar la trobada
539
539
  join_meeting: Unir-se a la trobada
@@ -116,7 +116,7 @@ cs:
116
116
  'false': Minulé
117
117
  'true': Nadcházející
118
118
  scope_id_eq:
119
- label: Oblast působnosti
119
+ label: Rozsah
120
120
  with_any_origin:
121
121
  label: Původ
122
122
  values:
@@ -153,6 +153,7 @@ cs:
153
153
  actions:
154
154
  comment: Komentář
155
155
  join: Přidat se
156
+ reply_poll: Odpověď ankety
156
157
  name: Setkání
157
158
  settings:
158
159
  global:
@@ -165,7 +166,7 @@ cs:
165
166
  maps_enabled: Mapy povoleny
166
167
  registration_code_enabled: Registrační kód povolen
167
168
  resources_permissions_enabled: Nastavení oprávnění lze nastavit pro každou schůzku
168
- scope_id: Oblast působnosti
169
+ scope_id: Rozsah
169
170
  scopes_enabled: Oblasti působnosti povoleny
170
171
  terms_and_conditions_url_for_meeting_creators: URL pro Zásady a podmínky ke schůzce tvůrců
171
172
  step:
@@ -240,7 +241,7 @@ cs:
240
241
  attachment_collections: Složky
241
242
  attachments: Přílohy
242
243
  close: Zavřít
243
- confirm_destroy: Opravdu chcete tuto schůzku smazat?
244
+ confirm_destroy: Opravdu chcete smazat tuto schůzi?
244
245
  destroy: Odstranit
245
246
  edit: Upravit
246
247
  invalid_destroy:
@@ -546,7 +547,7 @@ cs:
546
547
  see_all_withdrawn: Zobrazit všechny stažené schůzky
547
548
  text_banner: Zobrazujete seznam schůzek stažených jejich autory. %{go_back_link}.
548
549
  meeting:
549
- close_meeting: Ukončit schůzku
550
+ close_meeting: Zavřete schůzku
550
551
  edit_close_meeting: Upravit zprávu schůzky
551
552
  edit_meeting: Upravit schůzku
552
553
  join_meeting: Připojit se ke schůzce