decidim-meetings 0.27.1 → 0.27.3
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/concerns/decidim/meetings/component_filterable.rb +31 -0
- data/app/controllers/decidim/meetings/admin/meeting_copies_controller.rb +2 -2
- 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 +10 -9
- data/app/helpers/decidim/meetings/application_helper.rb +7 -1
- 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 +272 -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 +211 -155
- 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 +4 -6
- data/config/locales/pt-BR.yml +0 -6
- data/config/locales/pt.yml +0 -7
- data/config/locales/ro-RO.yml +17 -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 +668 -0
- data/lib/decidim/meetings/engine.rb +1 -1
- data/lib/decidim/meetings/version.rb +1 -1
- metadata +18 -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: 22996c6eba8e4d08a0fea3fd677846567792c2b1826ad33027bf4023a183653a
|
4
|
+
data.tar.gz: 5cef864fb91bb45baa72ccb274e5d36fabfc31ef8ecacccf7abfe051ea4e4a43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34e99ce49db7f4ece052065032ac934fb119959581dbf120a3efc833e86633c279b47afe85ec659e2494f1be2bcebb3e7c884ebd0b10347b24a93323b555b55
|
7
|
+
data.tar.gz: c2847c2c7b6c6f1dfac880c3594cb4a4a475f3a054ae0a508bc83f45f3fbbf8c5174a9b9301da98da78e7970feea34e539002d5bfa8ac9a1ef6ef9d4dcb7ff80
|
@@ -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!
|
@@ -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
|
@@ -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
|
@@ -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"
|
@@ -92,15 +93,6 @@ module Decidim
|
|
92
93
|
type_of_meeting.presence
|
93
94
|
end
|
94
95
|
|
95
|
-
def type_of_meeting_select
|
96
|
-
Decidim::Meetings::Meeting::TYPE_OF_MEETING.map do |type|
|
97
|
-
[
|
98
|
-
I18n.t("type_of_meeting.#{type}", scope: "decidim.meetings"),
|
99
|
-
type
|
100
|
-
]
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
96
|
def iframe_access_level_select
|
105
97
|
Decidim::Meetings::Meeting.iframe_access_levels.map do |level, _value|
|
106
98
|
[
|
@@ -119,6 +111,11 @@ module Decidim
|
|
119
111
|
end
|
120
112
|
end
|
121
113
|
|
114
|
+
# Support for copy meeting
|
115
|
+
def questionnaire
|
116
|
+
Decidim::Forms::Questionnaire.new
|
117
|
+
end
|
118
|
+
|
122
119
|
def on_this_platform?
|
123
120
|
registration_type == "on_this_platform"
|
124
121
|
end
|
@@ -136,6 +133,10 @@ module Decidim
|
|
136
133
|
end
|
137
134
|
end
|
138
135
|
|
136
|
+
def registrations_enabled
|
137
|
+
on_this_platform?
|
138
|
+
end
|
139
|
+
|
139
140
|
def embeddable_meeting_url
|
140
141
|
if online_meeting_url.present? && %w(embed_in_meeting_page open_in_live_event_page).include?(iframe_embed_type)
|
141
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.
|
@@ -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") %>
|
@@ -102,6 +102,6 @@
|
|
102
102
|
</div>
|
103
103
|
</div>
|
104
104
|
|
105
|
-
<%= render "services", form: form, id: tabs_id_for_service(blank_service) %>
|
105
|
+
<%= render "decidim/meetings/admin/meetings/services", form: form, id: tabs_id_for_service(blank_service) %>
|
106
106
|
|
107
107
|
<%= 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>
|