decidim-meetings 0.28.3 → 0.28.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) 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/_calendar_modal.html.erb +1 -1
  13. data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +1 -1
  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 +4 -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 +3 -3
  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/sv.yml +192 -105
  49. data/config/locales/tr-TR.yml +13 -2
  50. data/config/locales/uk.yml +9 -1
  51. data/config/locales/zh-CN.yml +11 -1
  52. data/config/locales/zh-TW.yml +3 -1
  53. data/decidim-meetings.gemspec +1 -1
  54. data/lib/decidim/api/meeting_type.rb +12 -0
  55. data/lib/decidim/api/meetings_type.rb +1 -3
  56. data/lib/decidim/meetings/engine.rb +2 -0
  57. data/lib/decidim/meetings/meeting_serializer.rb +37 -0
  58. data/lib/decidim/meetings/seeds.rb +16 -1
  59. data/lib/decidim/meetings/test/factories.rb +6 -0
  60. data/lib/decidim/meetings/version.rb +1 -1
  61. metadata +17 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0085a8f2f8df80b300246b11a3248dc8b9891e11699a49ec6beb81e65bf2e93
4
- data.tar.gz: 4d5b5be680be38f726f4f12a19bba8c0da23feba1e2bb878d68015791770fded
3
+ metadata.gz: 20662cea40901317d4c4765081acf7f6787583e752f6a8935497c40c82a92493
4
+ data.tar.gz: 4c3ea479c4c0020e0004e875d9ff50bd82b33fffa6476e1c80558b0cd3ece5b7
5
5
  SHA512:
6
- metadata.gz: d9639caeb5db1426d878a2243a06a8a3e7b999d96cc491aedf76a3b60d45ddbf5362bb4fdc18d46e245d6658e360eac3b6b46e27761fc5555d7008d20ee19c8d
7
- data.tar.gz: e84aa50842bb51384579aea8438e00a1872efffd830791601ead617503dbb19592450407447b98b6c146695e285254c247ea03f8cdbe57d821a7f90e67aa13ca
6
+ metadata.gz: a149064e3f37cfd335dff4f8484c75e52e189402fc0cb62ebdd82305c22dd9204b8f6f685bee9382232338295e1e294b49f8e4e6992c85b74ac74332181246c9
7
+ data.tar.gz: 7fb532e3e413c1739cadf239cc04de633bd939a6c30bd23b84be497c5e87924a4c0dfbfc10eea20f8b234e76fd2a45423cad71cbc24244beeb5084d3568c46ef
@@ -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
+ render :static_map
18
18
  end
19
19
 
20
20
  def year
@@ -15,6 +15,11 @@ module Decidim
15
15
  "card__calendar-list__reset"
16
16
  end
17
17
 
18
+ # Renders the date in the meeting card list
19
+ def has_image?
20
+ true
21
+ end
22
+
18
23
  def image
19
24
  render
20
25
  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
@@ -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">
1
+ <button class="button button__sm button__transparent-secondary mt-6 md:mt-12 md:self-start" data-dialog-open="calendarShare" role=menuitem>
2
2
  <%= t(".export_calendar") %>
3
3
  <%= icon "download-cloud-2-line", class: "fill-current" %>
4
4
  </button>
@@ -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>
@@ -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:
@@ -472,6 +471,9 @@ ar:
472
471
  see_all: عرض كافة الاجتماعات
473
472
  see_all_withdrawn: عرض جميع الاجتماعات المسحوبة
474
473
  text_banner: أنت تستعرض قائمة الاجتماعات التي تم سحبها من قبل مؤلفيها. %{go_back_link}.
474
+ meeting:
475
+ close_meeting: اجتماع قريب
476
+ edit_meeting: تعديل الاجتماعات
475
477
  meetings:
476
478
  upcoming_meetings_warning: حاليًا ، لا توجد اجتماعات مجدولة ، ولكن يمكنك هنا العثور على جميع الاجتماعات السابقة المدرجة.
477
479
  new:
@@ -217,7 +217,6 @@ bg:
217
217
  attachment_collections: Папки
218
218
  attachments: Прикачени файлове
219
219
  close: Затвори
220
- confirm_destroy: Наистина ли искате да изтриете тази среща?
221
220
  destroy: Изтрий
222
221
  edit: Редактирай
223
222
  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.
@@ -516,7 +516,7 @@ ca:
516
516
  see_all_withdrawn: Veure totes les trobades cancel·lades
517
517
  text_banner: Estàs veient un llistat de trobades cancel·lades per les seves autores. %{go_back_link}.
518
518
  meeting:
519
- close_meeting: Tancar la trobada
519
+ close_meeting: Tancar trobada
520
520
  edit_close_meeting: Editar l'informe de la trobada
521
521
  edit_meeting: Editar la trobada
522
522
  join_meeting: Unir-se a la trobada
@@ -111,7 +111,7 @@ cs:
111
111
  'false': Minulé
112
112
  'true': Nadcházející
113
113
  scope_id_eq:
114
- label: Oblast působnosti
114
+ label: Rozsah
115
115
  with_any_origin:
116
116
  label: Původ
117
117
  values:
@@ -148,7 +148,7 @@ cs:
148
148
  maps_enabled: Mapy povoleny
149
149
  registration_code_enabled: Registrační kód povolen
150
150
  resources_permissions_enabled: Nastavení oprávnění lze nastavit pro každou schůzku
151
- scope_id: Oblast působnosti
151
+ scope_id: Rozsah
152
152
  scopes_enabled: Oblasti působnosti povoleny
153
153
  terms_and_conditions_url_for_meeting_creators: URL pro Zásady a podmínky ke schůzce tvůrců
154
154
  step:
@@ -223,7 +223,7 @@ cs:
223
223
  attachment_collections: Složky
224
224
  attachments: Přílohy
225
225
  close: Zavřít
226
- confirm_destroy: Opravdu chcete tuto schůzku smazat?
226
+ confirm_destroy: Opravdu chcete smazat tuto schůzi?
227
227
  destroy: Odstranit
228
228
  edit: Upravit
229
229
  invalid_destroy:
@@ -530,7 +530,7 @@ cs:
530
530
  see_all_withdrawn: Zobrazit všechny stažené schůzky
531
531
  text_banner: Zobrazujete seznam schůzek stažených jejich autory. %{go_back_link}.
532
532
  meeting:
533
- close_meeting: Ukončit schůzku
533
+ close_meeting: Zavřete schůzku
534
534
  edit_close_meeting: Upravit zprávu schůzky
535
535
  edit_meeting: Upravit schůzku
536
536
  join_meeting: Připojit se ke schůzce