decidim-meetings 0.25.0.rc4 → 0.26.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings/heading.erb +1 -1
  3. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb +1 -1
  4. data/app/cells/decidim/meetings/content_blocks/{upcoming_events → upcoming_meetings}/show.erb +6 -6
  5. data/app/cells/decidim/meetings/content_blocks/{upcoming_events_cell.rb → upcoming_meetings_cell.rb} +11 -10
  6. data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +1 -1
  7. data/app/cells/decidim/meetings/join_meeting_button_cell.rb +1 -1
  8. data/app/cells/decidim/meetings/meeting_list_item_cell.rb +10 -0
  9. data/app/cells/decidim/meetings/meeting_m_cell.rb +48 -0
  10. data/app/cells/decidim/meetings/meeting_s_cell.rb +22 -0
  11. data/app/cells/decidim/meetings/meetings_map_cell.rb +6 -0
  12. data/app/cells/decidim/meetings/online_meeting_cell.rb +23 -8
  13. data/app/cells/decidim/meetings/online_meeting_link/show.erb +2 -2
  14. data/app/cells/decidim/meetings/online_meeting_link_cell.rb +1 -5
  15. data/app/cells/decidim/meetings/public_participants_list_cell.rb +1 -0
  16. data/app/cells/decidim/meetings/question_responses_cell.rb +1 -1
  17. data/app/commands/decidim/meetings/admin/create_meeting.rb +11 -1
  18. data/app/commands/decidim/meetings/admin/publish_meeting.rb +3 -1
  19. data/app/commands/decidim/meetings/admin/update_meeting.rb +8 -2
  20. data/app/commands/decidim/meetings/create_meeting.rb +14 -2
  21. data/app/commands/decidim/meetings/update_meeting.rb +5 -2
  22. data/app/commands/decidim/meetings/withdraw_meeting.rb +39 -0
  23. data/app/controllers/concerns/decidim/meetings/filterable.rb +33 -0
  24. data/app/controllers/decidim/meetings/directory/application_controller.rb +16 -0
  25. data/app/controllers/decidim/meetings/directory/meetings_controller.rb +31 -20
  26. data/app/controllers/decidim/meetings/live_events_controller.rb +7 -1
  27. data/app/controllers/decidim/meetings/meetings_controller.rb +19 -17
  28. data/app/events/decidim/meetings/close_meeting_event.rb +1 -3
  29. data/app/events/decidim/meetings/create_meeting_event.rb +2 -4
  30. data/app/events/decidim/meetings/meeting_event.rb +37 -0
  31. data/app/events/decidim/meetings/meeting_registrations_enabled_event.rb +1 -3
  32. data/app/events/decidim/meetings/meeting_registrations_over_percentage_event.rb +2 -4
  33. data/app/events/decidim/meetings/registration_code_validated_event.rb +2 -4
  34. data/app/events/decidim/meetings/upcoming_meeting_event.rb +1 -3
  35. data/app/events/decidim/meetings/update_meeting_event.rb +1 -3
  36. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +1 -1
  37. data/app/forms/decidim/meetings/admin/meeting_copy_form.rb +4 -13
  38. data/app/forms/decidim/meetings/admin/meeting_form.rb +34 -46
  39. data/app/forms/decidim/meetings/base_meeting_form.rb +59 -0
  40. data/app/forms/decidim/meetings/close_meeting_form.rb +6 -6
  41. data/app/forms/decidim/meetings/meeting_form.rb +30 -46
  42. data/app/helpers/decidim/meetings/application_helper.rb +13 -1
  43. data/app/helpers/decidim/meetings/directory/application_helper.rb +150 -0
  44. data/app/helpers/decidim/meetings/meeting_cells_helper.rb +4 -1
  45. data/app/helpers/decidim/meetings/meetings_helper.rb +3 -0
  46. data/app/models/decidim/meetings/meeting.rb +53 -1
  47. data/app/packs/src/decidim/meetings/admin/meetings_form.js +27 -11
  48. data/app/packs/src/decidim/meetings/meetings_form.js +19 -0
  49. data/app/packs/src/decidim/meetings/meetings_polls.js +31 -26
  50. data/app/permissions/decidim/meetings/permissions.rb +9 -1
  51. data/app/presenters/decidim/meetings/meeting_edition_presenter.rb +14 -0
  52. data/app/presenters/decidim/meetings/meeting_presenter.rb +13 -6
  53. data/app/services/decidim/meetings/diff_renderer.rb +4 -4
  54. data/app/services/decidim/meetings/directory/meeting_search.rb +53 -0
  55. data/app/services/decidim/meetings/meeting_iframe_embedder.rb +1 -1
  56. data/app/services/decidim/meetings/meeting_search.rb +15 -2
  57. data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +16 -1
  58. data/app/views/decidim/meetings/admin/meeting_copies/new.html.erb +1 -1
  59. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +15 -3
  60. data/app/views/decidim/meetings/directory/meetings/_filters.html.erb +34 -0
  61. data/app/views/decidim/meetings/directory/meetings/index.html.erb +1 -18
  62. data/app/views/decidim/meetings/meetings/_filters.html.erb +2 -0
  63. data/app/views/decidim/meetings/meetings/_filters_small_view.html.erb +3 -3
  64. data/app/views/decidim/meetings/meetings/_form.html.erb +14 -3
  65. data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +1 -1
  66. data/app/views/decidim/meetings/meetings/_meetings.html.erb +18 -0
  67. data/app/views/decidim/meetings/meetings/index.html.erb +1 -0
  68. data/app/views/decidim/meetings/meetings/show.html.erb +12 -13
  69. data/config/locales/ar.yml +2 -9
  70. data/config/locales/ca.yml +87 -22
  71. data/config/locales/cs.yml +83 -13
  72. data/config/locales/de.yml +2 -11
  73. data/config/locales/el.yml +2 -9
  74. data/config/locales/en.yml +41 -13
  75. data/config/locales/es-MX.yml +96 -9
  76. data/config/locales/es-PY.yml +96 -9
  77. data/config/locales/es.yml +136 -8
  78. data/config/locales/eu.yml +230 -11
  79. data/config/locales/fi-plain.yml +82 -13
  80. data/config/locales/fi.yml +83 -13
  81. data/config/locales/fr-CA.yml +114 -11
  82. data/config/locales/fr.yml +118 -14
  83. data/config/locales/ga-IE.yml +213 -0
  84. data/config/locales/gl.yml +30 -11
  85. data/config/locales/hu.yml +2 -9
  86. data/config/locales/id-ID.yml +2 -9
  87. data/config/locales/it.yml +43 -13
  88. data/config/locales/ja.yml +86 -16
  89. data/config/locales/lb-LU.yml +210 -0
  90. data/config/locales/lb.yml +410 -0
  91. data/config/locales/lv.yml +2 -9
  92. data/config/locales/nl.yml +66 -13
  93. data/config/locales/no.yml +2 -9
  94. data/config/locales/pl.yml +36 -11
  95. data/config/locales/pt-BR.yml +4 -14
  96. data/config/locales/pt.yml +153 -9
  97. data/config/locales/ro-RO.yml +193 -101
  98. data/config/locales/ru.yml +0 -8
  99. data/config/locales/sk.yml +2 -9
  100. data/config/locales/sl.yml +0 -3
  101. data/config/locales/sv.yml +108 -9
  102. data/config/locales/tr-TR.yml +2 -9
  103. data/config/locales/val-ES.yml +1 -0
  104. data/config/locales/zh-CN.yml +2 -9
  105. data/db/migrate/20210519133705_add_comments_availability_columns_to_meetings_table.rb +14 -0
  106. data/db/migrate/20210727085318_add_state_field_to_meeting.rb +7 -0
  107. data/db/migrate/20210903143040_add_iframe_access_level_to_decidim_meetings.rb +7 -0
  108. data/db/migrate/20210922140454_transform_show_embedded_iframe_column.rb +15 -0
  109. data/db/migrate/20210928095036_rename_upcoming_events_content_block_to_upcoming_meetings.rb +13 -0
  110. data/lib/decidim/api/meeting_type.rb +2 -1
  111. data/lib/decidim/meetings/component.rb +17 -7
  112. data/lib/decidim/meetings/directory_engine.rb +3 -3
  113. data/lib/decidim/meetings/engine.rb +8 -1
  114. data/lib/decidim/meetings/meeting_serializer.rb +2 -2
  115. data/lib/decidim/meetings/test/factories.rb +24 -3
  116. data/lib/decidim/meetings/test/notifications_handling.rb +39 -0
  117. data/lib/decidim/meetings/test/translated_event.rb +22 -0
  118. data/lib/decidim/meetings/version.rb +1 -1
  119. data/lib/decidim/meetings.rb +5 -0
  120. metadata +38 -20
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ #
6
+ # Decorator for meetings in users context
7
+ #
8
+ class MeetingEditionPresenter < MeetingPresenter
9
+ def sanitized(content)
10
+ organization.rich_text_editor_in_public_views? ? decidim_sanitize_editor(content) : decidim_sanitize(content)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -7,6 +7,7 @@ module Decidim
7
7
  #
8
8
  class MeetingPresenter < Decidim::ResourcePresenter
9
9
  include Decidim::ResourceHelper
10
+ include Decidim::SanitizeHelper
10
11
 
11
12
  def meeting
12
13
  __getobj__
@@ -18,13 +19,15 @@ module Decidim
18
19
  super meeting.title, links, html_escape, all_locales
19
20
  end
20
21
 
21
- def description(links: false, all_locales: false)
22
+ def description(links: false, extras: true, strip_tags: false, all_locales: false)
22
23
  return unless meeting
23
24
 
24
- handle_locales(meeting.description, all_locales) do |content|
25
- renderer = Decidim::ContentRenderers::HashtagRenderer.new(decidim_sanitize(content))
25
+ new_description = handle_locales(meeting.description, all_locales) do |content|
26
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(sanitized(content))
26
27
  renderer.render(links: links).html_safe
27
28
  end
29
+
30
+ content_handle_locale(new_description, all_locales, extras, links, strip_tags)
28
31
  end
29
32
 
30
33
  def location(all_locales: false)
@@ -55,7 +58,7 @@ module Decidim
55
58
  return unless meeting
56
59
 
57
60
  handle_locales(meeting.closing_report, all_locales) do |content|
58
- renderer = Decidim::ContentRenderers::HashtagRenderer.new(decidim_sanitize(content))
61
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(sanitized(content))
59
62
  renderer.render(links: links).html_safe
60
63
  end
61
64
  end
@@ -64,7 +67,7 @@ module Decidim
64
67
  return unless meeting
65
68
 
66
69
  handle_locales(meeting.registration_email_custom_content, all_locales) do |content|
67
- renderer = Decidim::ContentRenderers::HashtagRenderer.new(decidim_sanitize(content))
70
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(sanitized(content))
68
71
  renderer.render(links: links).html_safe
69
72
  end
70
73
  end
@@ -97,7 +100,7 @@ module Decidim
97
100
  resource_locator(meeting).path
98
101
  end
99
102
 
100
- def avatar_url
103
+ def avatar_url(_variant = nil)
101
104
  ActionController::Base.helpers.asset_pack_path("media/images/decidim_meetings.svg")
102
105
  end
103
106
 
@@ -125,6 +128,10 @@ module Decidim
125
128
 
126
129
  proposals.map.with_index { |proposal, index| "#{index + 1}) #{proposal.title}\n" }
127
130
  end
131
+
132
+ def sanitized(content)
133
+ decidim_sanitize_editor(content)
134
+ end
128
135
  end
129
136
  end
130
137
  end
@@ -5,11 +5,11 @@ module Decidim
5
5
  class DiffRenderer < BaseDiffRenderer
6
6
  def attribute_types
7
7
  {
8
- title: :string,
9
- description: :html,
8
+ title: :i18n,
9
+ description: :i18n_html,
10
10
  address: :string,
11
- location: :string,
12
- location_hints: :string,
11
+ location: :i18n,
12
+ location_hints: :i18n,
13
13
  start_time: :date,
14
14
  end_time: :date,
15
15
  decidim_user_group_id: :user_group,
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ module Directory
6
+ class MeetingSearch < Decidim::Meetings::MeetingSearch
7
+ text_search_fields :title, :description
8
+
9
+ def search_space
10
+ return query if options[:space].blank? || options[:space] == "all"
11
+
12
+ query.joins(:component).where(decidim_components: { participatory_space_type: options[:space].collect(&:classify) })
13
+ end
14
+
15
+ private
16
+
17
+ # Private: Creates an array of category ids.
18
+ # It contains categories' subcategories ids as well.
19
+ def all_category_ids
20
+ cat_ids = fetch_category_ids
21
+
22
+ component.flat_map do |comp|
23
+ comp
24
+ .categories
25
+ .where(id: cat_ids)
26
+ .or(comp.categories.where(parent_id: cat_ids))
27
+ .pluck(:id).tap { |ids| ids.prepend(nil) if category_ids.include?("without") }
28
+ end
29
+ end
30
+
31
+ # take a param list like ["2", "10", "Decidim__Assembly4", "Decidim__Assembly2"]
32
+ # return a param list like [47, 48, 43, 44, 45, 46, 41, 42, 27, 28, 32, 31, 29, 30, 26, 25]
33
+ def fetch_category_ids
34
+ cat_ids = category_ids.without("without")
35
+
36
+ additional_ids = cat_ids.select { |a| a =~ /Decidim__/ }
37
+
38
+ additional_ids = parse_category_ids(additional_ids)
39
+ cat_ids.collect(&:to_i).without(0).push(*additional_ids)
40
+ end
41
+
42
+ # this function expects an array of the following format : [ "Decidim__Assembly4", "Decidim__Assembly2"]
43
+ # It will transform each parameter into an array of class_name and id [["Decidim::Assembly", "4"], ["Decidim::Assembly", "2"]]
44
+ # After we rebuild the find query and retrun the category_ids for each participatory space
45
+ def parse_category_ids(additional_ids)
46
+ additional_ids = additional_ids.map { |a| a.gsub("__", "::").gsub(/(\d+)/, '.\1').split(".") }
47
+ additional_ids = additional_ids.map { |v| v.first.safe_constantize.send(:find, v.last.to_i).category_ids }
48
+ additional_ids.flatten
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -48,7 +48,7 @@ module Decidim
48
48
 
49
49
  private
50
50
 
51
- EMBEDDABLE_SERVICES = %( www.youtube.com www.twitch.tv )
51
+ EMBEDDABLE_SERVICES = %( www.youtube.com www.twitch.tv meet.jit.si )
52
52
 
53
53
  attr_accessor :online_meeting_service_url
54
54
 
@@ -13,8 +13,10 @@ module Decidim
13
13
  # page - The page number to paginate the results.
14
14
  # per_page - The number of meetings to return per page.
15
15
  def initialize(options = {})
16
- scope = options.fetch(:scope, Meeting.published)
17
- super(scope, options)
16
+ options[:scope] = options.fetch(:scope, Meeting.published)
17
+ options[:scope] = options[:state] == "withdrawn" ? options[:scope].withdrawn : options[:scope].except_withdrawn
18
+ options[:scope] = options[:scope].includes(:component, :attachments)
19
+ super(options[:scope], options)
18
20
  end
19
21
 
20
22
  # Handle the date filter
@@ -47,6 +49,17 @@ module Decidim
47
49
  query
48
50
  end
49
51
  end
52
+
53
+ # Handle the state filter
54
+ def search_state
55
+ return query.withdrawn if state == "withdrawn"
56
+
57
+ query.except_withdrawn
58
+ end
59
+
60
+ def results
61
+ super.includes(attachments: :file_attachment, component: { participatory_space: :organization })
62
+ end
50
63
  end
51
64
  end
52
65
  end
@@ -13,10 +13,17 @@
13
13
  </div>
14
14
 
15
15
  <div class="row column">
16
+ <%= form.select :type_of_meeting,
17
+ @form.type_of_meeting_select,
18
+ { include_blank: t(".select_a_meeting_type") },
19
+ { multiple: false } %>
20
+ </div>
21
+
22
+ <div class="row column field" data-meeting-type="in_person">
16
23
  <%= form.geocoding_field :address %>
17
24
  </div>
18
25
 
19
- <div class="row column">
26
+ <div class="row column field" data-meeting-type="in_person">
20
27
  <%= form.translated :text_area, :location %>
21
28
  </div>
22
29
 
@@ -24,6 +31,14 @@
24
31
  <%= form.translated :text_area, :location_hints %>
25
32
  </div>
26
33
 
34
+ <div class="row column field" data-meeting-type="online">
35
+ <%= form.text_field :online_meeting_url %>
36
+ </div>
37
+
38
+ <div class="row column field" data-meeting-type="online">
39
+ <%= form.check_box :show_embedded_iframe %>
40
+ </div>
41
+
27
42
  <div class="row">
28
43
  <div class="columns xlarge-6">
29
44
  <%= form.datetime_field :start_time %>
@@ -1,4 +1,4 @@
1
- <%= decidim_form_for(@form, url: meeting_copies_path(meeting), method: :post, html: { class: "form copy_meetings" }) do |f| %>
1
+ <%= decidim_form_for(@form, url: meeting_copies_path(meeting), method: :post, html: { class: "form copy_meetings " }) do |f| %>
2
2
  <%= render partial: "form", object: f, locals: { title: t("meeting_copies.new.title", scope: "decidim.admin"), select: t("meeting_copies.new.select", scope: "decidim.admin") } %>
3
3
 
4
4
  <div class="button--double form-general-submit">
@@ -38,9 +38,20 @@
38
38
  <p class="help-text"><%= t(".online_meeting_url_help") %></p>
39
39
  </div>
40
40
 
41
- <div class="field" data-meeting-type="online">
42
- <%= form.check_box :show_embedded_iframe %>
43
- <p class="help-text"><%= t(".show_embedded_iframe_help") %></p>
41
+ <div class="iframe-fields">
42
+ <div class="row column field iframe-fields--embed-type" id="meeting_iframe_embed_type" data-meeting-type="online">
43
+ <%= form.select :iframe_embed_type,
44
+ @form.iframe_embed_type_select,
45
+ { multiple: false } %>
46
+ <p class="help-text"><%= t(".show_embedded_iframe_help") %></p>
47
+ </div>
48
+
49
+ <div class="row column field iframe-fields--access-level" data-meeting-type="online-access-level">
50
+ <%= form.select :iframe_access_level,
51
+ @form.iframe_access_level_select,
52
+ { include_blank: t(".select_an_iframe_access_level") },
53
+ { multiple: false } %>
54
+ </div>
44
55
  </div>
45
56
 
46
57
  <div class="row">
@@ -99,6 +110,7 @@
99
110
  <p class="help-text"><%= t(".registration_email_help") %></p>
100
111
  </div>
101
112
 
113
+ <%= render partial: "decidim/comments/admin/shared/availability_fields", locals: { form: form } %>
102
114
  </div>
103
115
  </div>
104
116
 
@@ -0,0 +1,34 @@
1
+ <%= render partial: "decidim/shared/filter_form_help", locals: { skip_to_id: "meetings" } %>
2
+
3
+ <%= filter_form_for filter do |form| %>
4
+ <div class="filters__section">
5
+ <div class="filters__search">
6
+ <div class="input-group">
7
+ <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t("decidim.meetings.meetings.filters.search"), title: t("decidim.meetings.meetings.filters.search"), "aria-label": t("decidim.meetings.meetings.filters.search"), data: { disable_dynamic_change: true } %>
8
+ <div class="input-group-button">
9
+ <button type="submit" class="button" aria-controls="meetings">
10
+ <%= icon "magnifying-glass", aria_label: t("decidim.meetings.meetings.filters.search"), role: "img" %>
11
+ </button>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+
17
+ <% unless @forced_past_meetings %>
18
+ <%= form.check_boxes_tree :date, filter_date_values, legend_title: t("decidim.meetings.meetings.filters.date") %>
19
+ <% end %>
20
+
21
+ <%= form.check_boxes_tree :type, filter_type_values, legend_title: t("decidim.meetings.meetings.filters.type") %>
22
+
23
+ <%= form.check_boxes_tree :scope_id, directory_filter_scopes_values, legend_title: t("decidim.meetings.meetings.filters.scope") %>
24
+
25
+ <%= form.check_boxes_tree :category_id, directory_filter_categories_values, legend_title: t("decidim.meetings.meetings.filters.category") %>
26
+
27
+ <%= form.check_boxes_tree :origin, directory_filter_origin_values, legend_title: t("decidim.meetings.meetings.filters.origin") %>
28
+
29
+ <%= form.check_boxes_tree :space, directory_meeting_spaces_values, legend_title: t("decidim.meetings.directory.meetings.index.space_type") %>
30
+
31
+ <% if current_user %>
32
+ <%= form.collection_radio_buttons :activity, activity_filter_values, :first, :last, { legend_title: t("decidim.meetings.meetings.filters.activity") }, "aria-controls": "meetings" %>
33
+ <% end %>
34
+ <% end %>
@@ -10,24 +10,7 @@
10
10
 
11
11
  <div class="columns mediumlarge-4 large-3">
12
12
  <div class="card card--secondary show-for-mediumlarge">
13
- <%= render partial: "decidim/shared/filter_form_help", locals: { skip_to_id: "meetings" } %>
14
- <%= filter_form_for filter, meetings_directory.root_path do |form| %>
15
- <div class="filters__section">
16
- <div class="filters__search">
17
- <div class="input-group">
18
- <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search") %>
19
- <div class="input-group-button">
20
- <button type="submit" class="button">
21
- <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
22
- </button>
23
- </div>
24
- </div>
25
- </div>
26
- </div>
27
-
28
- <%= form.collection_radio_buttons :date, [["upcoming", t(".upcoming")], ["past", t(".past")]], :first, :last, legend_title: t(".date") %>
29
- <%= form.collection_radio_buttons :space, @meeting_spaces, :first, :last, legend_title: t(".space_type") %>
30
- <% end %>
13
+ <%= render partial: "filters" %>
31
14
  </div>
32
15
  </div>
33
16
  <div id="meetings" class="columns mediumlarge-8 large-9">
@@ -14,6 +14,8 @@
14
14
  </div>
15
15
  </div>
16
16
 
17
+ <%= form.hidden_field "state", value: params.dig("filter", "state") %>
18
+
17
19
  <% unless @forced_past_meetings %>
18
20
  <%= form.check_boxes_tree :date, filter_date_values, legend_title: t(".date") %>
19
21
  <% end %>
@@ -1,13 +1,13 @@
1
1
  <div class="filters-controls hide-for-mediumlarge">
2
- <button data-open="filter-box" class="filters-controls__trigger">
2
+ <button data-open="filter-box" class="filters-controls__trigger" aria-controls="filter-box" aria-haspopup="dialog">
3
3
  <%= t ".filter" %>
4
4
  <%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(".unfold"), role: "img" %>
5
5
  </button>
6
6
  </div>
7
7
 
8
- <div class="reveal" id="filter-box" data-reveal>
8
+ <div class="reveal" id="filter-box" data-reveal role="dialog" aria-modal="true" aria-labelledby="filter-box-label">
9
9
  <div class="reveal__header">
10
- <h3 class="reveal__title"><%= t ".filter_by" %>:</h3>
10
+ <h3 id="filter-box-label" class="reveal__title"><%= t ".filter_by" %>:</h3>
11
11
  <button class="close-button" data-close aria-label="<%= t(".close_modal") %>" type="button">
12
12
  <span aria-hidden="true">&times;</span>
13
13
  </button>
@@ -33,9 +33,20 @@
33
33
  <p class="help-text"><%= t(".online_meeting_url_help") %></p>
34
34
  </div>
35
35
 
36
- <div class="field" data-meeting-type="online">
37
- <%= form.check_box :show_embedded_iframe %>
38
- <p class="help-text"><%= t(".show_embedded_iframe_help") %></p>
36
+ <div class="iframe-fields">
37
+ <div class="field" data-meeting-type="online">
38
+ <%= form.select :iframe_embed_type,
39
+ @form.iframe_embed_type_select,
40
+ { multiple: false } %>
41
+ <p class="help-text"><%= t(".show_embedded_iframe_help") %></p>
42
+ </div>
43
+
44
+ <div class="field iframe-fields--access-level" id="meeting_iframe_embed_type" data-meeting-type="online-access-level">
45
+ <%= form.select :iframe_access_level,
46
+ @form.iframe_access_level_select,
47
+ { include_blank: t(".select_an_iframe_access_level") },
48
+ { multiple: false } %>
49
+ </div>
39
50
  </div>
40
51
 
41
52
  <div class="field">
@@ -14,7 +14,7 @@
14
14
  <%= meeting.start_time.strftime("%H:%M") %> - <%= meeting.end_time.strftime("%H:%M") %>
15
15
  </div>
16
16
  </div>
17
- <%= decidim_sanitize( present(meeting).description ) %>
17
+ <%= decidim_sanitize_editor(present(meeting).description) %>
18
18
  </div>
19
19
  </div>
20
20
  </div>
@@ -1,3 +1,11 @@
1
+ <% if params.dig("filter", "state").present? && params["filter"]["state"] == "withdrawn" %>
2
+ <div class="callout warning">
3
+ <%= t("decidim.meetings.meetings.index.text_banner",
4
+ go_back_link: link_to(t("decidim.meetings.meetings.index.click_here"), meetings_path("filter[state]" => nil)),
5
+ ).html_safe %>
6
+ </div>
7
+ <% end %>
8
+
1
9
  <% if @forced_past_meetings %>
2
10
  <div class="callout warning">
3
11
  <%= t ".upcoming_meetings_warning" %>
@@ -23,3 +31,13 @@
23
31
  <% end %>
24
32
  </div>
25
33
  <%= decidim_paginate meetings, order_start_time: params[:order_start_time], scope_id: params[:scope_id] %>
34
+
35
+ <div class="row">
36
+ <div class="text-right">
37
+ <% if params.dig("filter", "state").present? && params["filter"]["state"] == "withdrawn" %>
38
+ <%= link_to t("decidim.meetings.meetings.index.see_all"), meetings_path("filter[state]" => nil) %>
39
+ <% else %>
40
+ <%= link_to t("decidim.meetings.meetings.index.see_all_withdrawn"), meetings_path("filter[state]" => "withdrawn") %>
41
+ <% end %>
42
+ </div>
43
+ </div>
@@ -27,6 +27,7 @@
27
27
  </div>
28
28
  </div>
29
29
  <div id="meetings" class="columns mediumlarge-8 large-9" aria-live="polite">
30
+
30
31
  <%= render partial: "meetings" %>
31
32
  </div>
32
33
  </div>
@@ -37,20 +37,14 @@ edit_link(
37
37
  <% end %>
38
38
 
39
39
  <% if allowed_to?(:close, :meeting, meeting: meeting) %>
40
- <%= link_to t(".close_meeting"), edit_meeting_meeting_close_path(meeting_id: meeting.id, id: meeting.id), class: "button hollow expanded button-sc button--icon follow-button" %>
40
+ <% caption = meeting.closed? ? t(".edit_close_meeting") : t(".close_meeting") %>
41
+ <%= link_to caption, edit_meeting_meeting_close_path(meeting_id: meeting.id, id: meeting.id), class: "button hollow expanded button-sc button--icon follow-button" %>
41
42
  <% end %>
42
43
 
43
44
  <div class="card extra">
44
45
  <div class="card__content">
45
- <div class="extra__date">
46
- <%= l meeting.start_time, format: "%d" %>
47
- <span class="extra__month"><%= l meeting.start_time, format: "%B" %>
48
- <%= l(meeting.start_time, format: "%Y") if meeting.start_time.year != Date.current.year %>
49
- </span>
50
- </div>
51
- <div class="extra__time">
52
- <%= meeting.start_time.strftime("%H:%M") %> - <%= meeting.end_time.strftime("%H:%M") %>
53
- </div>
46
+ <%= cell("decidim/date_range", { start: meeting.start_time, end: meeting.end_time }) %>
47
+
54
48
  <%= cell "decidim/meetings/join_meeting_button", meeting, big_button: true, show_remaining_slots: true %>
55
49
  <%= render partial: "decidim/shared/follow_button", locals: { followable: meeting, large: false } %>
56
50
  </div>
@@ -125,13 +119,18 @@ edit_link(
125
119
  <%= t("transparent", scope: "decidim.meetings.types") %>
126
120
  </span>
127
121
  <% end %>
128
- <%= decidim_sanitize(present(meeting).description(links: true)) %>
122
+ <% if meeting.withdrawn? %>
123
+ <span class="<%= meeting_type_badge_css_class("withdraw") %> label proposal-status">
124
+ <%= t("withdraw", scope: "decidim.meetings.types") %>
125
+ </span>
126
+ <% end %>
127
+ <%= render_meeting_body(@meeting) %>
129
128
 
130
129
  <% if meeting.maps_enabled? && !meeting.online_meeting? %>
131
130
  <%= render partial: "decidim/shared/static_map", locals: { icon_name: "meetings", geolocalizable: meeting } %>
132
131
  <% end %>
133
132
 
134
- <% unless meeting.in_person_meeting? %>
133
+ <% unless meeting.in_person_meeting? || meeting.withdrawn? %>
135
134
  <%= cell "decidim/meetings/online_meeting_link", meeting %>
136
135
  <% end %>
137
136
 
@@ -163,7 +162,7 @@ edit_link(
163
162
  <% if meeting.closed? && meeting.closing_visible? %>
164
163
  <div class="section">
165
164
  <h3 class="section-heading"><%= t(".meeting_minutes") %></h3>
166
- <%= decidim_sanitize translated_attribute meeting.closing_report %>
165
+ <%= decidim_sanitize_editor translated_attribute meeting.closing_report %>
167
166
  </div>
168
167
  <% end %>
169
168
 
@@ -305,20 +305,13 @@ ar:
305
305
  export_calendar: تصدير التقويم
306
306
  conference_venues: أماكن المؤتمر
307
307
  content_blocks:
308
- upcoming_events:
309
- name: الأحداث القادمة
310
- upcoming_events: الاجتماعات القادمة
311
- view_all_events: عرض الكل
308
+ upcoming_meetings:
309
+ view_all_meetings: عرض الكل
312
310
  directory:
313
311
  meetings:
314
312
  index:
315
- all: الكل
316
- date: تاريخ
317
313
  meetings: اجتماعات
318
- past: الماضي
319
- search: بحث
320
314
  space_type: الفضاء التشاركي
321
- upcoming: القادمة
322
315
  last_activity:
323
316
  new_meeting_at_html: "<span>اجتماع جديد في %{link}</span>"
324
317
  mailer: