decidim-meetings 0.27.2 → 0.27.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/commands/decidim/meetings/admin/create_meeting.rb +1 -0
- data/app/commands/decidim/meetings/admin/publish_meeting.rb +1 -1
- data/app/commands/decidim/meetings/admin/update_meeting.rb +1 -0
- data/app/controllers/concerns/decidim/meetings/component_filterable.rb +31 -0
- data/app/controllers/decidim/meetings/calendars_controller.rb +5 -1
- data/app/controllers/decidim/meetings/directory/meetings_controller.rb +1 -1
- data/app/controllers/decidim/meetings/meetings_controller.rb +1 -14
- data/app/forms/decidim/meetings/admin/meeting_form.rb +5 -0
- data/app/helpers/decidim/meetings/application_helper.rb +7 -1
- data/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -0
- data/app/views/decidim/meetings/admin/meetings/index.html.erb +1 -0
- data/app/views/decidim/meetings/admin/meetings/new.html.erb +1 -0
- data/app/views/decidim/meetings/admin/registrations/_form.html.erb +1 -1
- data/app/views/decidim/meetings/directory/meetings/_meetings.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_meetings.html.erb +1 -1
- data/config/environment.rb +0 -0
- data/config/locales/ar.yml +271 -1
- data/config/locales/ca.yml +3 -1
- data/config/locales/cs.yml +5 -3
- data/config/locales/de.yml +34 -6
- data/config/locales/el.yml +246 -4
- data/config/locales/en.yml +2 -0
- data/config/locales/es-MX.yml +4 -5
- data/config/locales/es-PY.yml +4 -5
- data/config/locales/es.yml +5 -3
- data/config/locales/eu.yml +18 -18
- data/config/locales/fa-IR.yml +1 -0
- data/config/locales/fi-plain.yml +5 -6
- data/config/locales/fi.yml +2 -3
- data/config/locales/fr-CA.yml +4 -5
- data/config/locales/fr.yml +3 -1
- data/config/locales/ga-IE.yml +3 -1
- data/config/locales/gl.yml +4 -4
- data/config/locales/hu.yml +3 -3
- data/config/locales/id-ID.yml +6 -1
- data/config/locales/is-IS.yml +5 -2
- data/config/locales/it.yml +5 -4
- data/config/locales/ja.yml +7 -8
- data/config/locales/kaa.yml +8 -0
- data/config/locales/lb.yml +9 -3
- data/config/locales/lt.yml +2 -5
- data/config/locales/lv.yml +6 -1
- data/config/locales/nl.yml +1 -4
- data/config/locales/no.yml +2 -2
- data/config/locales/pl.yml +5 -3
- data/config/locales/pt-BR.yml +7 -4
- data/config/locales/pt.yml +4 -2
- data/config/locales/ro-RO.yml +14 -5
- data/config/locales/ru.yml +8 -1
- data/config/locales/sk.yml +6 -1
- data/config/locales/sv.yml +3 -6
- data/config/locales/tr-TR.yml +6 -4
- data/config/locales/uk.yml +8 -1
- data/config/locales/zh-CN.yml +5 -3
- data/config/locales/zh-TW.yml +665 -0
- data/lib/decidim/meetings/version.rb +1 -1
- metadata +22 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82da38a1aee360d967117d670596806b11330effeb6c09822419cba4fa2485ba
|
4
|
+
data.tar.gz: 3535abcc9cc00433e882a19d38cf046c0ef7ce80e491df08ad1e6160a8e7aa3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f29b5b1640ab33b03b8d3b795fc3720ff7efc136afb218f8ba91fe4cf0a4ec1cb06d56596ff89d6c31f8eb8027e487096c7aa165284422eeda9b44fc5d72500f
|
7
|
+
data.tar.gz: f85547fa23f5ec7c264fb19f5d3c63bee03bb807fd546ebf76ff6c3968daaaf380d843a0ef4ec1e3cc0c9fea681ba305ab5b7a317abc5caf88472c62fccbc95b
|
@@ -52,6 +52,7 @@ module Decidim
|
|
52
52
|
transparent: form.transparent,
|
53
53
|
author: form.current_organization,
|
54
54
|
registration_terms: form.current_component.settings.default_registration_terms,
|
55
|
+
registrations_enabled: form.registrations_enabled,
|
55
56
|
component: form.current_component,
|
56
57
|
questionnaire: Decidim::Forms::Questionnaire.new,
|
57
58
|
iframe_embed_type: form.iframe_embed_type,
|
@@ -51,6 +51,7 @@ module Decidim
|
|
51
51
|
online_meeting_url: form.online_meeting_url,
|
52
52
|
registration_type: form.registration_type,
|
53
53
|
registration_url: form.registration_url,
|
54
|
+
registrations_enabled: form.registrations_enabled,
|
54
55
|
type_of_meeting: form.clean_type_of_meeting,
|
55
56
|
address: form.address,
|
56
57
|
latitude: form.latitude,
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_support/concern"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
module Meetings
|
7
|
+
# A controller concern to specify default filter parameters for the
|
8
|
+
# controller resources within a meetings component.
|
9
|
+
module ComponentFilterable
|
10
|
+
extend ActiveSupport::Concern
|
11
|
+
|
12
|
+
included do
|
13
|
+
private
|
14
|
+
|
15
|
+
def default_filter_params
|
16
|
+
{
|
17
|
+
search_text_cont: "",
|
18
|
+
with_any_date: "upcoming",
|
19
|
+
activity: "all",
|
20
|
+
with_availability: "",
|
21
|
+
with_any_scope: default_filter_scope_params,
|
22
|
+
with_any_category: default_filter_category_params,
|
23
|
+
with_any_state: nil,
|
24
|
+
with_any_origin: default_filter_origin_params,
|
25
|
+
with_any_type: default_filter_type_params
|
26
|
+
}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -5,13 +5,17 @@ module Decidim
|
|
5
5
|
# Exposes the meeting resources as an .ics file so users can import them
|
6
6
|
# to their favorite calendar app
|
7
7
|
class CalendarsController < Decidim::Meetings::ApplicationController
|
8
|
+
include FilterResource
|
9
|
+
include Filterable
|
10
|
+
include ComponentFilterable
|
11
|
+
|
8
12
|
layout false
|
9
13
|
helper_method :meetings
|
10
14
|
before_action :set_default_request_format
|
11
15
|
skip_around_action :use_organization_time_zone
|
12
16
|
|
13
17
|
def show
|
14
|
-
render plain: CalendarRenderer.for(current_component,
|
18
|
+
render plain: CalendarRenderer.for(current_component, filter_params), content_type: "type/calendar"
|
15
19
|
end
|
16
20
|
|
17
21
|
def meeting_calendar
|
@@ -20,7 +20,7 @@ module Decidim
|
|
20
20
|
helper_method :meetings, :search
|
21
21
|
|
22
22
|
def calendar
|
23
|
-
render plain: CalendarRenderer.for(current_organization,
|
23
|
+
render plain: CalendarRenderer.for(current_organization, filter_params), content_type: "type/calendar"
|
24
24
|
end
|
25
25
|
|
26
26
|
private
|
@@ -6,6 +6,7 @@ module Decidim
|
|
6
6
|
class MeetingsController < Decidim::Meetings::ApplicationController
|
7
7
|
include FilterResource
|
8
8
|
include Filterable
|
9
|
+
include ComponentFilterable
|
9
10
|
include Flaggable
|
10
11
|
include Withdrawable
|
11
12
|
include FormFactory
|
@@ -129,20 +130,6 @@ module Decidim
|
|
129
130
|
def meeting_form
|
130
131
|
form(Decidim::Meetings::MeetingForm)
|
131
132
|
end
|
132
|
-
|
133
|
-
def default_filter_params
|
134
|
-
{
|
135
|
-
search_text_cont: "",
|
136
|
-
with_any_date: "upcoming",
|
137
|
-
activity: "all",
|
138
|
-
with_availability: "",
|
139
|
-
with_any_scope: default_filter_scope_params,
|
140
|
-
with_any_category: default_filter_category_params,
|
141
|
-
with_any_state: nil,
|
142
|
-
with_any_origin: default_filter_origin_params,
|
143
|
-
with_any_type: default_filter_type_params
|
144
|
-
}
|
145
|
-
end
|
146
133
|
end
|
147
134
|
end
|
148
135
|
end
|
@@ -13,6 +13,7 @@ module Decidim
|
|
13
13
|
attribute :private_meeting, Boolean
|
14
14
|
attribute :transparent, Boolean
|
15
15
|
attribute :registration_type, String
|
16
|
+
attribute :registrations_enabled, Boolean, default: false
|
16
17
|
attribute :registration_url, String
|
17
18
|
attribute :customize_registration_email, Boolean
|
18
19
|
attribute :iframe_embed_type, String, default: "none"
|
@@ -132,6 +133,10 @@ module Decidim
|
|
132
133
|
end
|
133
134
|
end
|
134
135
|
|
136
|
+
def registrations_enabled
|
137
|
+
on_this_platform?
|
138
|
+
end
|
139
|
+
|
135
140
|
def embeddable_meeting_url
|
136
141
|
if online_meeting_url.present? && %w(embed_in_meeting_page open_in_live_event_page).include?(iframe_embed_type)
|
137
142
|
embedder_service = Decidim::Meetings::MeetingIframeEmbedder.new(online_meeting_url)
|
@@ -60,7 +60,13 @@ module Decidim
|
|
60
60
|
# frontend, the meeting body is considered as safe content; that's unless
|
61
61
|
# the meeting comes from a collaborative_draft or a participatory_text.
|
62
62
|
def safe_content?
|
63
|
-
rich_text_editor_in_public_views? ||
|
63
|
+
rich_text_editor_in_public_views? || safe_content_admin?
|
64
|
+
end
|
65
|
+
|
66
|
+
# For admin entered content, the meeting body can contain certain extra
|
67
|
+
# tags, such as iframes.
|
68
|
+
def safe_content_admin?
|
69
|
+
@meeting.official?
|
64
70
|
end
|
65
71
|
|
66
72
|
# If the content is safe, HTML tags are sanitized, otherwise, they are stripped.
|
@@ -22,5 +22,5 @@
|
|
22
22
|
<%= card_for meeting, context: { show_space: true } %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
|
-
<%= decidim_paginate meetings, order_start_time: params[:order_start_time],
|
25
|
+
<%= decidim_paginate meetings, order_start_time: params[:order_start_time], with_any_scope: params[:with_any_scope] %>
|
26
26
|
<% end %>
|
@@ -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_editor
|
17
|
+
<%= decidim_sanitize_editor present(meeting).description(strip_tags: true) %>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
20
|
</div>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<%= card_for meeting %>
|
36
36
|
<% end %>
|
37
37
|
</div>
|
38
|
-
<%= decidim_paginate meetings, order_start_time: params[:order_start_time],
|
38
|
+
<%= decidim_paginate meetings, order_start_time: params[:order_start_time], with_any_scope: params[:with_any_scope] %>
|
39
39
|
|
40
40
|
<div class="row">
|
41
41
|
<div class="text-right">
|
File without changes
|