decidim-meetings 0.28.1 → 0.28.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/meetings/join_meeting_button/registration_modal.erb +1 -1
  3. data/app/cells/decidim/meetings/meeting_l/image.erb +3 -3
  4. data/app/cells/decidim/meetings/meeting_l_cell.rb +0 -4
  5. data/app/helpers/decidim/meetings/application_helper.rb +5 -1
  6. data/app/models/decidim/meetings/meeting.rb +5 -1
  7. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +0 -4
  8. data/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb +1 -1
  9. data/app/presenters/decidim/meetings/meeting_presenter.rb +2 -5
  10. data/app/services/decidim/meetings/close_meeting_reminder_generator.rb +11 -5
  11. data/app/views/decidim/meetings/admin/registrations/edit.html.erb +3 -1
  12. data/app/views/decidim/meetings/meetings/_meeting_aside.html.erb +0 -1
  13. data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +1 -1
  14. data/config/locales/ar.yml +0 -1
  15. data/config/locales/bg.yml +650 -0
  16. data/config/locales/ca.yml +1 -1
  17. data/config/locales/de.yml +1 -1
  18. data/config/locales/el.yml +0 -1
  19. data/config/locales/gl.yml +0 -1
  20. data/config/locales/hu.yml +0 -1
  21. data/config/locales/it.yml +0 -1
  22. data/config/locales/lt.yml +0 -1
  23. data/config/locales/nl.yml +0 -1
  24. data/config/locales/no.yml +0 -1
  25. data/config/locales/pl.yml +96 -0
  26. data/config/locales/pt-BR.yml +0 -1
  27. data/config/locales/pt.yml +0 -1
  28. data/config/locales/ro-RO.yml +0 -1
  29. data/config/locales/sv.yml +5 -4
  30. data/config/locales/tr-TR.yml +3 -0
  31. data/config/locales/zh-TW.yml +0 -1
  32. data/lib/decidim/meetings/seeds.rb +0 -3
  33. data/lib/decidim/meetings/version.rb +1 -1
  34. metadata +18 -19
  35. data/app/presenters/decidim/meetings/log/resource_presenter.rb +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2938d2f32497611f571869b77a695164b51a47bcac475980697e0fb05b5ee681
4
- data.tar.gz: 7eeb90d0095cfd435bc7e1a27bfebff6d9d48eacfb98fa3fcf12fa7f72d6a46e
3
+ metadata.gz: d0085a8f2f8df80b300246b11a3248dc8b9891e11699a49ec6beb81e65bf2e93
4
+ data.tar.gz: 4d5b5be680be38f726f4f12a19bba8c0da23feba1e2bb878d68015791770fded
5
5
  SHA512:
6
- metadata.gz: 4bd4972aefef8559a1b546210dd95d71d1db90e64406ab796ad6314a3d92a8c6dfbde876394fe68b62194a492f1a4374687b1ae50325cd131e37ef600c5e0076
7
- data.tar.gz: 9d2d4b400fb87da7ee84d7d8ef1c39e78a8882be1b53465b72c76adbf551af0590fabb312a458235fcf953a5b4f0e3d6b7191e4c8a0a38a0aae2489e92ccaf9d
6
+ metadata.gz: d9639caeb5db1426d878a2243a06a8a3e7b999d96cc491aedf76a3b60d45ddbf5362bb4fdc18d46e245d6658e360eac3b6b46e27761fc5555d7008d20ee19c8d
7
+ data.tar.gz: e84aa50842bb51384579aea8438e00a1872efffd830791601ead617503dbb19592450407447b98b6c146695e285254c247ea03f8cdbe57d821a7f90e67aa13ca
@@ -8,7 +8,7 @@
8
8
  <div class="form__wrapper">
9
9
  <%= cell("decidim/represent_user_group", form) %>
10
10
  <%= cell("decidim/public_participation", form) %>
11
- <span class="meeting__registration-modal__terms"><%= registration_terms_text %></span>
11
+ <div class="meeting__registration-modal__terms"><%= registration_terms_text %></div>
12
12
  </div>
13
13
  </div>
14
14
  </div>
@@ -1,5 +1,5 @@
1
1
  <time class="card__calendar" datetime="<%= meeting.start_time.iso8601 %>">
2
- <div class="card__calendar-month"><%= l(meeting.start_time, format: "%b") %></div>
3
- <div class="card__calendar-day"><%= l(meeting.start_time, format: "%d") %></div>
4
- <div class="card__calendar-year"><%= l(meeting.start_time, format: "%Y") %></div>
2
+ <span class="card__calendar-month"><%= l(meeting.start_time, format: "%b") %></span>
3
+ <span class="card__calendar-day"><%= l(meeting.start_time, format: "%d") %></span>
4
+ <span class="card__calendar-year"><%= l(meeting.start_time, format: "%Y") %></span>
5
5
  </time>
@@ -11,10 +11,6 @@ module Decidim
11
11
 
12
12
  alias meeting model
13
13
 
14
- def has_image?
15
- true
16
- end
17
-
18
14
  def extra_class
19
15
  "card__calendar-list__reset"
20
16
  end
@@ -59,7 +59,11 @@ module Decidim
59
59
 
60
60
  # If the content is safe, HTML tags are sanitized, otherwise, they are stripped.
61
61
  def render_meeting_body(meeting)
62
- sanitized = render_sanitized_content(meeting, :description)
62
+ render_meeting_sanitize_field(meeting, :description)
63
+ end
64
+
65
+ def render_meeting_sanitize_field(meeting, field)
66
+ sanitized = render_sanitized_content(meeting, field)
63
67
  if safe_content?
64
68
  Decidim::ContentProcessor.render_without_format(sanitized).html_safe
65
69
  else
@@ -170,7 +170,7 @@ module Decidim
170
170
  end
171
171
 
172
172
  def can_be_joined_by?(user)
173
- !closed? && registrations_enabled? && can_participate?(user)
173
+ !started? && registrations_enabled? && can_participate?(user)
174
174
  end
175
175
 
176
176
  def can_register_invitation?(user)
@@ -182,6 +182,10 @@ module Decidim
182
182
  closed_at.present?
183
183
  end
184
184
 
185
+ def started?
186
+ start_time < Time.current
187
+ end
188
+
185
189
  def past?
186
190
  end_time < Time.current
187
191
  end
@@ -15,10 +15,6 @@ module Decidim
15
15
  class MeetingPresenter < Decidim::Log::BasePresenter
16
16
  private
17
17
 
18
- def resource_presenter
19
- @resource_presenter ||= Decidim::Meetings::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"])
20
- end
21
-
22
18
  def diff_fields_mapping
23
19
  {
24
20
  address: :string,
@@ -10,7 +10,7 @@ module Decidim
10
10
  def present
11
11
  return unless value
12
12
 
13
- renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.translated_attribute(value))
13
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.decidim_escape_translated(value))
14
14
  renderer.render(links: false).html_safe
15
15
  end
16
16
  end
@@ -64,13 +64,10 @@ module Decidim
64
64
  end
65
65
  end
66
66
 
67
- def closing_report(links: false, all_locales: false)
67
+ def closing_report(links: false, extras: false, strip_tags: false, all_locales: false)
68
68
  return unless meeting
69
69
 
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
70
+ content_handle_locale(meeting.closing_report, all_locales, extras, links, strip_tags)
74
71
  end
75
72
 
76
73
  def registration_email_custom_content(links: false, all_locales: false)
@@ -38,11 +38,9 @@ module Decidim
38
38
 
39
39
  def send_reminders(component)
40
40
  intervals = Array(reminder_manifest.settings.attributes[:reminder_times].default)
41
- space_admins = Decidim::ParticipatoryProcessUserRole.where(decidim_participatory_process_id: component.participatory_space_id, role: "admin").collect(&:user)
42
- space_admins = (global_admins + space_admins).uniq
43
41
  intervals.each do |interval|
44
42
  finder_query(component.id, interval).find_each do |meeting|
45
- authors = meeting.official? ? space_admins : [meeting.author]
43
+ authors = meeting.official? ? space_admins(component) : [meeting.author]
46
44
  authors.each do |author|
47
45
  send_notif = author.notification_settings.fetch("close_meeting_reminder", "1")
48
46
  next unless send_notif == "1"
@@ -60,8 +58,16 @@ module Decidim
60
58
  end
61
59
  end
62
60
 
63
- def global_admins
64
- @global_admins ||= Decidim::User.where(admin: true).all
61
+ def space_admins(component)
62
+ @space_admins ||= begin
63
+ space_admins = if component.participatory_space.respond_to?(:user_roles)
64
+ component.participatory_space.user_roles(:admin).collect(&:user)
65
+ else
66
+ []
67
+ end
68
+ global_admins = component.organization.admins
69
+ (global_admins + space_admins).uniq
70
+ end
65
71
  end
66
72
  end
67
73
  end
@@ -12,7 +12,9 @@
12
12
  <div class="dropdown-pane" id="export-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
13
13
  <ul class="vertical menu add-components">
14
14
  <% %w(CSV JSON Excel).each do |format| %>
15
- <li class="exports--format--<%= format.downcase %> exports--registrations"><%= link_to t("decidim.admin.exports.export_as", name: t("decidim.#{current_component.manifest.name}.admin.exports.registrations"), export_format: format), export_meeting_registrations_path(meeting_id: meeting, format:) %></li>
15
+ <%= link_to export_meeting_registrations_path(meeting_id: meeting, format:) do %>
16
+ <li class="exports--format--<%= format.downcase %> exports--registrations"><%= t("decidim.admin.exports.export_as", name: t("decidim.#{current_component.manifest.name}.admin.exports.registrations"), export_format: format) %></li>
17
+ <% end %>
16
18
  <% end %>
17
19
  </ul>
18
20
  </div>
@@ -32,7 +32,6 @@
32
32
  data: { confirm: t("withdraw_confirmation_html", scope: "decidim.meetings.meetings.show") }
33
33
  ) do %>
34
34
  <span><%= t("withdraw_meeting", scope:"decidim.meetings.meetings.show") %></span>
35
- <%= icon "pencil-line" %>
36
35
  <% end %>
37
36
  <% end %>
38
37
  </section>
@@ -5,7 +5,7 @@
5
5
  </div>
6
6
 
7
7
  <div class="meeting__agenda-item">
8
- <div class="meeting__agenda-item__description editor-content mb-4"><%= decidim_sanitize_editor translated_attribute meeting.closing_report %></div>
8
+ <div class="meeting__agenda-item__description editor-content mb-4"><%= render_meeting_sanitize_field(meeting, :closing_report) %></div>
9
9
 
10
10
  <% if meeting.video_url.presence %>
11
11
  <div class="flex items-center gap-2 mt-2">
@@ -396,7 +396,6 @@ ar:
396
396
  new_meeting: 'اجتماع جديد:'
397
397
  layouts:
398
398
  live_event:
399
- administrate: إدارة
400
399
  close: إغلاق
401
400
  questions: الأسئلة
402
401
  mailer: