decidim-meetings 0.29.1 → 0.29.3

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.
Files changed (66) 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/models/decidim/meetings/meeting.rb +0 -5
  10. data/app/packs/stylesheets/decidim/meetings/_item.scss +5 -17
  11. data/app/permissions/decidim/meetings/permissions.rb +7 -2
  12. data/app/presenters/decidim/meetings/meeting_presenter.rb +1 -5
  13. data/app/views/decidim/meetings/meetings/index.html.erb +9 -0
  14. data/app/views/decidim/meetings/meetings/new.html.erb +1 -0
  15. data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +1 -1
  16. data/app/views/decidim/meetings/shared/_index.js.erb +3 -4
  17. data/app/views/decidim/meetings/shared/_meetings.html.erb +1 -1
  18. data/config/locales/ar.yml +3 -7
  19. data/config/locales/bg.yml +0 -12
  20. data/config/locales/bn-BD.yml +1 -0
  21. data/config/locales/bs-BA.yml +8 -0
  22. data/config/locales/ca-IT.yml +693 -0
  23. data/config/locales/ca.yml +8 -6
  24. data/config/locales/cs.yml +5 -11
  25. data/config/locales/de.yml +121 -119
  26. data/config/locales/el.yml +3 -7
  27. data/config/locales/en.yml +3 -1
  28. data/config/locales/es-MX.yml +14 -12
  29. data/config/locales/es-PY.yml +15 -13
  30. data/config/locales/es.yml +16 -14
  31. data/config/locales/eu.yml +60 -58
  32. data/config/locales/fi-plain.yml +5 -8
  33. data/config/locales/fi.yml +15 -18
  34. data/config/locales/fr-CA.yml +7 -6
  35. data/config/locales/fr.yml +7 -6
  36. data/config/locales/ga-IE.yml +3 -0
  37. data/config/locales/gl.yml +7 -8
  38. data/config/locales/hu.yml +6 -10
  39. data/config/locales/id-ID.yml +9 -6
  40. data/config/locales/is-IS.yml +12 -1
  41. data/config/locales/it.yml +10 -9
  42. data/config/locales/ja.yml +5 -3
  43. data/config/locales/lb.yml +7 -7
  44. data/config/locales/lt.yml +2 -9
  45. data/config/locales/lv.yml +9 -6
  46. data/config/locales/nl.yml +4 -8
  47. data/config/locales/no.yml +3 -6
  48. data/config/locales/pl.yml +0 -12
  49. data/config/locales/pt-BR.yml +5 -12
  50. data/config/locales/pt.yml +6 -7
  51. data/config/locales/ro-RO.yml +7 -4
  52. data/config/locales/ru.yml +9 -6
  53. data/config/locales/sk.yml +10 -7
  54. data/config/locales/sv.yml +2 -8
  55. data/config/locales/tr-TR.yml +13 -8
  56. data/config/locales/uk.yml +12 -6
  57. data/config/locales/zh-CN.yml +11 -7
  58. data/config/locales/zh-TW.yml +3 -7
  59. data/decidim-meetings.gemspec +1 -1
  60. data/lib/decidim/api/meeting_type.rb +12 -0
  61. data/lib/decidim/api/meetings_type.rb +1 -3
  62. data/lib/decidim/meetings/engine.rb +8 -1
  63. data/lib/decidim/meetings/meeting_serializer.rb +37 -0
  64. data/lib/decidim/meetings/test/factories.rb +6 -0
  65. data/lib/decidim/meetings/version.rb +1 -1
  66. metadata +18 -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: 83f87b5cd7bb6bfa8815a553aa6ee3458de50f18fb23125f4f1fd74276df10c7
4
+ data.tar.gz: aa7bf01e86f4598639efb15133a2c38606a2a6d4fd85a4150f3ed94243d19dbf
5
5
  SHA512:
6
- metadata.gz: 0c18cde6a37d3e4c56dba6e951c3dd27e4af50f9895156796b7d4908001ca7534099874f6279bbb5cc1b49ebc7106e7d5b9fb0b5c9dfbc5c3fc8626c1ea8be56
7
- data.tar.gz: 67312f06fa33b06598e930f97cd37ef6eabf9218499e725fa4d0e25bd36d181335efd5e772c1c51036d4caad3df1727c0974afb3a9b66d038895dd8df9e48af6
6
+ metadata.gz: 1b32be7c6fb29dcead2914aaadec8c6b7605d1d25b6c915b956bb900a6fd804e759ba61dff1702cd93c01f4a9c7ccb1c827858dccc3b2392f71310f52a558211
7
+ data.tar.gz: c54bbf3929161a0970f67054ad96d4938a3d03c8342c72631529bb16d61eedb7e77600f2c303036291ea25671de12bf476dac8aafd1666e7153d5ffa85833b27
@@ -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? }
@@ -317,11 +317,6 @@ module Decidim
317
317
  )
318
318
  end
319
319
 
320
- # Public: Overrides the `reported_content_url` Reportable concern method.
321
- def reported_content_url
322
- ResourceLocatorPresenter.new(self).url
323
- end
324
-
325
320
  # Public: Overrides the `reported_attributes` Reportable concern method.
326
321
  def reported_attributes
327
322
  [:description]
@@ -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
@@ -1,3 +1,12 @@
1
+ <% add_decidim_meta_tags(
2
+ description: translated_attribute(current_component.participatory_space.try(:description)),
3
+ title: t("decidim.components.pagination.page_title",
4
+ component_name: translated_attribute(current_component.name),
5
+ current_page: meetings.current_page,
6
+ total_pages: meetings.total_pages ),
7
+ url: meetings_url,
8
+ resource: current_component) %>
9
+
1
10
  <%= render partial: "decidim/meetings/shared/index", locals: {
2
11
  display_map: Decidim::Map.available?(:geocoding, :dynamic) && current_component.settings.maps_enabled? && search.result.not_online.exists?,
3
12
  display_announcement: true,
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("title", scope: "decidim.meetings.meetings.new")) %>
1
2
  <%= render layout: "layouts/decidim/shared/layout_center" do %>
2
3
  <div class="text-center py-10">
3
4
  <h1 class="title-decorator inline-block text-left">
@@ -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
  }
@@ -11,7 +11,7 @@
11
11
  <% if meetings.length.zero? %>
12
12
  <%= cell("decidim/announcement", t("decidim.meetings.meetings.meetings.no_meetings_warning"), callout_class: "warning" ) %>
13
13
  <% else %>
14
- <h2 class="h5 md:h3 decorator"><%= t("meetings_count", scope: "decidim.meetings.meetings.count", count: meetings.total_count) %></h2>
14
+ <h2 class="h5 md:h3 decorator" aria-live="polite" aria-atomic="true"><%= t("meetings_count", scope: "decidim.meetings.meetings.count", count: meetings.total_count) %></h2>
15
15
 
16
16
  <%= cell("decidim/announcement", t("decidim.meetings.meetings.meetings.upcoming_meetings_warning"), callout_class: "warning" ) if @forced_past_meetings %>
17
17
 
@@ -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:
@@ -311,8 +310,6 @@ ar:
311
310
  registrations:
312
311
  edit:
313
312
  save: حفظ
314
- validate: التحقق من صحة
315
- validate_registration_code: التحقق من صحة رمز التسجيل
316
313
  form:
317
314
  available_slots_help: اتركه إلى 0 إذا كان لديك فتحات غير محدودة المتاحة.
318
315
  invites: دعوات
@@ -331,9 +328,6 @@ ar:
331
328
  update:
332
329
  invalid: حدثت مشكلة أثناء حفظ إعدادات التسجيل.
333
330
  success: تم حفظ إعدادات تسجيل الاجتماع بنجاح.
334
- validate_registration_code:
335
- invalid: رمز التسجيل هذا غير صالح.
336
- success: تم التحقق من صحة رمز التسجيل بنجاح.
337
331
  admin_log:
338
332
  invite:
339
333
  create: "%{user_name} دعا %{attendee_name} للانضمام إلى اجتماع %{resource_name} في الفضاء %{space_name}"
@@ -465,12 +459,14 @@ ar:
465
459
  see_all: عرض كافة الاجتماعات
466
460
  see_all_withdrawn: عرض جميع الاجتماعات المسحوبة
467
461
  text_banner: أنت تستعرض قائمة الاجتماعات التي تم سحبها من قبل مؤلفيها. %{go_back_link}.
462
+ meeting:
463
+ close_meeting: اجتماع قريب
464
+ edit_meeting: تعديل الاجتماعات
468
465
  meetings:
469
466
  upcoming_meetings_warning: حاليًا ، لا توجد اجتماعات مجدولة ، ولكن يمكنك هنا العثور على جميع الاجتماعات السابقة المدرجة.
470
467
  new:
471
468
  back: العودة
472
469
  create: إنشاء
473
- title: إنشاء اجتماعك
474
470
  registration_confirm:
475
471
  cancel: إلغاء
476
472
  confirm: تؤكد
@@ -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:
@@ -374,8 +373,6 @@ bg:
374
373
  registrations:
375
374
  edit:
376
375
  save: Запази
377
- validate: Потвърди
378
- validate_registration_code: Валидиране на регистрационния код
379
376
  form:
380
377
  available_slots_help: Оставете 0, ако разполагате с неограничен брой места.
381
378
  invites: Покани
@@ -391,9 +388,6 @@ bg:
391
388
  update:
392
389
  invalid: Възникна проблем при запазването на настройките за регистрация.
393
390
  success: Настройките за регистрация бяха запазени успешно.
394
- validate_registration_code:
395
- invalid: Регистрационният код е невалиден.
396
- success: Регистрационният код беше валидиран успешно.
397
391
  admin_log:
398
392
  invite:
399
393
  create: "%{user_name} покани %{attendee_name} да се присъедини към срещата %{resource_name} в пространството %{space_name}"
@@ -545,7 +539,6 @@ bg:
545
539
  new:
546
540
  back: Назад
547
541
  create: Създаване
548
- title: Създайте среща
549
542
  registration_confirm:
550
543
  cancel: Отказ
551
544
  confirm: Потвърждаване
@@ -598,12 +591,7 @@ bg:
598
591
  title: Заглавие
599
592
  polls:
600
593
  answers:
601
- index:
602
- administrate: Администриране
603
- title: Анкета
604
594
  index_admin:
605
- back_to_meeting: Назад към срещата
606
- title: Администриране на анкета
607
595
  view_poll: Вижте анкетата
608
596
  questions:
609
597
  closed_question:
@@ -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.