decidim-meetings 0.26.4 → 0.26.7
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/copy_meeting.rb +23 -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/decidim/meetings/admin/meeting_copies_controller.rb +2 -2
- data/app/forms/decidim/meetings/admin/meeting_form.rb +10 -9
- data/app/helpers/decidim/meetings/application_helper.rb +13 -2
- data/app/presenters/decidim/meetings/meeting_presenter.rb +1 -6
- data/app/views/decidim/meetings/admin/meeting_copies/new.html.erb +1 -1
- data/app/views/decidim/meetings/admin/meetings/_form.html.erb +1 -1
- data/app/views/decidim/meetings/admin/registrations/_form.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +1 -1
- data/config/locales/ar.yml +253 -5
- data/config/locales/bg.yml +0 -6
- data/config/locales/ca.yml +17 -10
- data/config/locales/cs.yml +15 -8
- data/config/locales/de.yml +12 -10
- data/config/locales/el.yml +0 -6
- data/config/locales/en.yml +17 -10
- data/config/locales/es-MX.yml +17 -10
- data/config/locales/es-PY.yml +17 -10
- data/config/locales/es.yml +17 -10
- data/config/locales/eu.yml +195 -156
- data/config/locales/fa-IR.yml +1 -0
- data/config/locales/fi-plain.yml +17 -10
- data/config/locales/fi.yml +17 -10
- data/config/locales/fr-CA.yml +16 -9
- data/config/locales/fr.yml +16 -9
- data/config/locales/ga-IE.yml +0 -4
- data/config/locales/gl.yml +0 -9
- data/config/locales/hu.yml +0 -10
- data/config/locales/id-ID.yml +0 -6
- data/config/locales/is-IS.yml +0 -2
- data/config/locales/it.yml +0 -7
- data/config/locales/ja.yml +21 -14
- data/config/locales/ka-GE.yml +1 -0
- data/config/locales/kaa.yml +1 -0
- data/config/locales/lb.yml +0 -6
- data/config/locales/lt.yml +0 -10
- data/config/locales/lv.yml +0 -6
- data/config/locales/nl.yml +0 -10
- data/config/locales/no.yml +0 -10
- data/config/locales/pl.yml +0 -6
- data/config/locales/pt-BR.yml +0 -6
- data/config/locales/pt.yml +0 -7
- data/config/locales/ro-RO.yml +19 -10
- data/config/locales/ru.yml +0 -6
- data/config/locales/sk.yml +0 -6
- data/config/locales/sl.yml +0 -3
- data/config/locales/sv.yml +11 -9
- data/config/locales/tr-TR.yml +0 -6
- data/config/locales/uk.yml +0 -6
- data/config/locales/zh-CN.yml +0 -6
- data/config/locales/zh-TW.yml +654 -0
- data/lib/decidim/meetings/engine.rb +1 -1
- data/lib/decidim/meetings/version.rb +1 -1
- metadata +17 -16
- data/app/forms/decidim/meetings/admin/meeting_copy_form.rb +0 -51
- data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d14f27884cacd322a63c5ea75582f086d3067aadb7259f023eb0418971e61b3
|
4
|
+
data.tar.gz: 5b30c43af75e840f4af15ed9ff59e9eb6ea36776cd907e504c9309b1c728b4cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4585987697c2629a40dabbdcb5509157b9d113e0af231fb8b52d0e73935c72f3790c11ad8212e291d7d188e67190427987238b796b3e1360da3e6947d3181fe8
|
7
|
+
data.tar.gz: 3c86c3b8ccc2fc6b28ba47d33010e93ba75181547457dcd280822ecfd04236d43b88eb80f32fecc2b7634a13aa6c9e460faaca6ad41828529d7225a903cd98e7
|
@@ -44,8 +44,8 @@ module Decidim
|
|
44
44
|
@copied_meeting = Decidim.traceability.create!(
|
45
45
|
Meeting,
|
46
46
|
form.current_user,
|
47
|
-
scope:
|
48
|
-
category:
|
47
|
+
scope: form.scope,
|
48
|
+
category: form.category,
|
49
49
|
title: parsed_title,
|
50
50
|
description: parsed_description,
|
51
51
|
end_time: form.end_time,
|
@@ -60,10 +60,29 @@ module Decidim
|
|
60
60
|
transparent: form.transparent,
|
61
61
|
author: form.current_organization,
|
62
62
|
questionnaire: form.questionnaire,
|
63
|
+
online_meeting_url: form.online_meeting_url,
|
64
|
+
type_of_meeting: form.type_of_meeting,
|
65
|
+
iframe_embed_type: form.iframe_embed_type,
|
66
|
+
iframe_access_level: form.iframe_access_level,
|
67
|
+
comments_enabled: form.comments_enabled,
|
68
|
+
comments_start_time: form.comments_start_time,
|
69
|
+
comments_end_time: form.comments_end_time,
|
70
|
+
registration_type: form.registration_type,
|
71
|
+
registration_url: form.registration_url,
|
72
|
+
**fields_from_meeting
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
def fields_from_meeting
|
77
|
+
{
|
63
78
|
registrations_enabled: meeting.registrations_enabled,
|
64
79
|
available_slots: meeting.available_slots,
|
65
|
-
registration_terms: meeting.registration_terms
|
66
|
-
|
80
|
+
registration_terms: meeting.registration_terms,
|
81
|
+
reserved_slots: meeting.reserved_slots,
|
82
|
+
customize_registration_email: meeting.customize_registration_email,
|
83
|
+
registration_form_enabled: meeting.registration_form_enabled,
|
84
|
+
registration_email_custom_content: meeting.registration_email_custom_content
|
85
|
+
}
|
67
86
|
end
|
68
87
|
|
69
88
|
def copy_services!
|
@@ -53,6 +53,7 @@ module Decidim
|
|
53
53
|
transparent: form.transparent,
|
54
54
|
author: form.current_organization,
|
55
55
|
registration_terms: form.current_component.settings.default_registration_terms,
|
56
|
+
registrations_enabled: form.registrations_enabled,
|
56
57
|
component: form.current_component,
|
57
58
|
questionnaire: Decidim::Forms::Questionnaire.new,
|
58
59
|
customize_registration_email: form.customize_registration_email,
|
@@ -52,6 +52,7 @@ module Decidim
|
|
52
52
|
registration_type: form.registration_type,
|
53
53
|
registration_url: form.registration_url,
|
54
54
|
available_slots: form.available_slots,
|
55
|
+
registrations_enabled: form.registrations_enabled,
|
55
56
|
type_of_meeting: form.clean_type_of_meeting,
|
56
57
|
address: form.address,
|
57
58
|
latitude: form.latitude,
|
@@ -11,13 +11,13 @@ module Decidim
|
|
11
11
|
def new
|
12
12
|
enforce_permission_to :copy, :meeting, meeting: meeting
|
13
13
|
|
14
|
-
@form = form(
|
14
|
+
@form = form(MeetingForm).from_model(meeting)
|
15
15
|
end
|
16
16
|
|
17
17
|
def create
|
18
18
|
enforce_permission_to :copy, :meeting, meeting: meeting
|
19
19
|
|
20
|
-
@form = form(
|
20
|
+
@form = form(MeetingForm).from_params(params, current_component: current_component)
|
21
21
|
|
22
22
|
CopyMeeting.call(@form, meeting) do
|
23
23
|
on(:ok) do
|
@@ -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 :available_slots, Integer, default: 0
|
18
19
|
attribute :customize_registration_email, Boolean
|
@@ -95,15 +96,6 @@ module Decidim
|
|
95
96
|
type_of_meeting.presence
|
96
97
|
end
|
97
98
|
|
98
|
-
def type_of_meeting_select
|
99
|
-
Decidim::Meetings::Meeting::TYPE_OF_MEETING.map do |type|
|
100
|
-
[
|
101
|
-
I18n.t("type_of_meeting.#{type}", scope: "decidim.meetings"),
|
102
|
-
type
|
103
|
-
]
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
99
|
def iframe_access_level_select
|
108
100
|
Decidim::Meetings::Meeting.iframe_access_levels.map do |level, _value|
|
109
101
|
[
|
@@ -122,6 +114,11 @@ module Decidim
|
|
122
114
|
end
|
123
115
|
end
|
124
116
|
|
117
|
+
# Support for copy meeting
|
118
|
+
def questionnaire
|
119
|
+
Decidim::Forms::Questionnaire.new
|
120
|
+
end
|
121
|
+
|
125
122
|
def on_this_platform?
|
126
123
|
registration_type == "on_this_platform"
|
127
124
|
end
|
@@ -139,6 +136,10 @@ module Decidim
|
|
139
136
|
end
|
140
137
|
end
|
141
138
|
|
139
|
+
def registrations_enabled
|
140
|
+
on_this_platform?
|
141
|
+
end
|
142
|
+
|
142
143
|
def embeddable_meeting_url
|
143
144
|
if online_meeting_url.present? && %w(embed_in_meeting_page open_in_live_event_page).include?(iframe_embed_type)
|
144
145
|
embedder_service = Decidim::Meetings::MeetingIframeEmbedder.new(online_meeting_url)
|
@@ -60,12 +60,23 @@ 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.
|
67
73
|
def render_meeting_body(meeting)
|
68
|
-
|
74
|
+
sanitized = render_sanitized_content(meeting, :description)
|
75
|
+
if safe_content?
|
76
|
+
Decidim::ContentProcessor.render_without_format(sanitized).html_safe
|
77
|
+
else
|
78
|
+
Decidim::ContentProcessor.render(sanitized, "div")
|
79
|
+
end
|
69
80
|
end
|
70
81
|
|
71
82
|
def prevent_timeout_seconds
|
@@ -31,12 +31,7 @@ module Decidim
|
|
31
31
|
def description(links: false, extras: true, strip_tags: false, all_locales: false)
|
32
32
|
return unless meeting
|
33
33
|
|
34
|
-
|
35
|
-
renderer = Decidim::ContentRenderers::HashtagRenderer.new(sanitized(content))
|
36
|
-
renderer.render(links: links).html_safe
|
37
|
-
end
|
38
|
-
|
39
|
-
content_handle_locale(new_description, all_locales, extras, links, strip_tags)
|
34
|
+
content_handle_locale(meeting.description, all_locales, extras, links, strip_tags)
|
40
35
|
end
|
41
36
|
|
42
37
|
def location(all_locales: false)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= decidim_form_for(@form, url: meeting_copies_path(meeting), method: :post, html: { class: "form copy_meetings " }) do |f| %>
|
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") } %>
|
2
|
+
<%= render partial: "decidim/meetings/admin/meetings/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">
|
5
5
|
<%= f.submit t("meeting_copies.new.copy", scope: "decidim.admin") %>
|
@@ -114,6 +114,6 @@
|
|
114
114
|
</div>
|
115
115
|
</div>
|
116
116
|
|
117
|
-
<%= render "services", form: form, id: tabs_id_for_service(blank_service) %>
|
117
|
+
<%= render "decidim/meetings/admin/meetings/services", form: form, id: tabs_id_for_service(blank_service) %>
|
118
118
|
|
119
119
|
<%= javascript_pack_tag "decidim_meetings_admin" %>
|
@@ -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>
|