decidim-meetings 0.31.6 → 0.31.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/decidim/meetings/admin/attachment_collections_controller.rb +2 -0
- data/app/controllers/decidim/meetings/admin/attachments_controller.rb +2 -0
- data/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb +5 -3
- data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +6 -0
- data/app/controllers/decidim/meetings/calendars_controller.rb +4 -0
- data/app/controllers/decidim/meetings/directory/meetings_controller.rb +2 -0
- data/app/controllers/decidim/meetings/live_events_controller.rb +2 -0
- data/app/controllers/decidim/meetings/meetings_controller.rb +11 -0
- data/app/controllers/decidim/meetings/polls/questions_controller.rb +2 -0
- data/app/controllers/decidim/meetings/registrations_controller.rb +5 -3
- data/app/controllers/decidim/meetings/versions_controller.rb +2 -0
- data/app/forms/decidim/meetings/admin/meeting_agenda_form.rb +3 -3
- data/app/models/decidim/meetings/meeting.rb +1 -1
- data/app/permissions/decidim/meetings/meeting_permissions.rb +3 -1
- data/app/views/decidim/meetings/_calendar_modal.html.erb +18 -18
- data/app/views/decidim/meetings/admin/poll/_question.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_registration_code_modal.html.erb +1 -1
- data/config/locales/cs.yml +1 -0
- data/config/locales/de.yml +4 -1
- data/config/locales/eu.yml +100 -100
- data/config/locales/gl.yml +496 -27
- data/config/locales/sv.yml +3 -0
- data/lib/decidim/meetings/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e897fff27ccb0638be49d2b715babbc69d305fb7ba3982e081908d9fcd1b34d8
|
|
4
|
+
data.tar.gz: 329071b0ef486cdd1bcad21b4c3d003c681e666a1ede2b7762dbb96b3f526a82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cdc2c8995712f405c8f2f5fbfa7462fd24ff2070c3c6749e3e6247cc3892573d37531753844f475ff76cba6ba5d013ed14416f99bf3b48bd53a7ff1bf3a47073
|
|
7
|
+
data.tar.gz: c72b045dd0cea7d9411bf4cd0eab36d8a09fea67450a7d8fc8c60eb81e9467b84df7f3029b833a065358c89cd351ef89fcb112b56ae02f65cd2d72249f3e3fbd
|
|
@@ -8,6 +8,8 @@ module Decidim
|
|
|
8
8
|
class AttachmentCollectionsController < Admin::ApplicationController
|
|
9
9
|
include Decidim::Admin::Concerns::HasAttachmentCollections
|
|
10
10
|
|
|
11
|
+
protected
|
|
12
|
+
|
|
11
13
|
def after_destroy_path
|
|
12
14
|
meeting_attachment_collections_path(meeting, meeting.component, current_participatory_space)
|
|
13
15
|
end
|
|
@@ -52,11 +52,13 @@ module Decidim
|
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
protected
|
|
56
|
+
|
|
55
57
|
def response_options
|
|
56
58
|
respond_to do |format|
|
|
57
59
|
format.json do
|
|
58
60
|
question_id = params["id"]
|
|
59
|
-
question =
|
|
61
|
+
question = questionnaire.questions.find_by(id: question_id)
|
|
60
62
|
render json: question.response_options.map { |response_option| ResponseOptionPresenter.new(response_option).as_json } if question.present?
|
|
61
63
|
end
|
|
62
64
|
end
|
|
@@ -81,7 +83,7 @@ module Decidim
|
|
|
81
83
|
private
|
|
82
84
|
|
|
83
85
|
def questionnaire
|
|
84
|
-
@questionnaire ||= Decidim::Meetings::Questionnaire.
|
|
86
|
+
@questionnaire ||= poll.questionnaire || Decidim::Meetings::Questionnaire.new(questionnaire_for:)
|
|
85
87
|
end
|
|
86
88
|
|
|
87
89
|
def blank_question
|
|
@@ -111,7 +113,7 @@ module Decidim
|
|
|
111
113
|
end
|
|
112
114
|
|
|
113
115
|
def poll
|
|
114
|
-
@poll ||= Poll.
|
|
116
|
+
@poll ||= meeting.poll || Decidim::Meetings::Poll.new(meeting:)
|
|
115
117
|
end
|
|
116
118
|
end
|
|
117
119
|
end
|
|
@@ -7,6 +7,8 @@ module Decidim
|
|
|
7
7
|
class RegistrationFormController < Admin::ApplicationController
|
|
8
8
|
include Decidim::Forms::Admin::Concerns::HasQuestionnaire
|
|
9
9
|
|
|
10
|
+
protected
|
|
11
|
+
|
|
10
12
|
def questionnaire_for
|
|
11
13
|
meeting
|
|
12
14
|
end
|
|
@@ -27,6 +29,10 @@ module Decidim
|
|
|
27
29
|
"decidim/meetings/admin/registration_form/edit_questions"
|
|
28
30
|
end
|
|
29
31
|
|
|
32
|
+
def response_options_url(params)
|
|
33
|
+
url_for(params.merge(controller: "registration_form", action: "response_options", format: :json, meeting_id: meeting.id))
|
|
34
|
+
end
|
|
35
|
+
|
|
30
36
|
private
|
|
31
37
|
|
|
32
38
|
def i18n_questions_flashes_scope
|
|
@@ -14,10 +14,14 @@ module Decidim
|
|
|
14
14
|
skip_around_action :use_organization_time_zone
|
|
15
15
|
|
|
16
16
|
def show
|
|
17
|
+
enforce_permission_to :read, :calendar
|
|
18
|
+
|
|
17
19
|
render plain: CalendarRenderer.for(current_component, filter_params), content_type: "type/calendar"
|
|
18
20
|
end
|
|
19
21
|
|
|
20
22
|
def meeting_calendar
|
|
23
|
+
enforce_permission_to(:read, :meeting, meeting:)
|
|
24
|
+
|
|
21
25
|
send_data CalendarRenderer.for(meeting), content_type: "type/calendar", filename: "#{meeting.reference}.ics"
|
|
22
26
|
end
|
|
23
27
|
|
|
@@ -14,6 +14,8 @@ module Decidim
|
|
|
14
14
|
def show
|
|
15
15
|
raise ActionController::RoutingError, "Not Found" unless meeting
|
|
16
16
|
|
|
17
|
+
enforce_permission_to(:read, :meeting, meeting:)
|
|
18
|
+
|
|
17
19
|
return if allowed_for_current_user?
|
|
18
20
|
|
|
19
21
|
flash[:alert] = I18n.t("meeting.not_allowed", scope: "decidim.meetings")
|
|
@@ -48,6 +48,8 @@ module Decidim
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def index
|
|
51
|
+
enforce_permission_to :read, :meeting
|
|
52
|
+
|
|
51
53
|
return unless search.result.blank? && params.dig("filter", "date") != %w(past)
|
|
52
54
|
|
|
53
55
|
@past_meetings ||= search_with(filter_params.merge(with_any_date: %w(past)))
|
|
@@ -206,6 +208,7 @@ module Decidim
|
|
|
206
208
|
return unless params[:previous_space]
|
|
207
209
|
|
|
208
210
|
previous_space_class, previous_space_id = params[:previous_space].split("#")
|
|
211
|
+
return unless valid_participatory_space_class?(previous_space_class)
|
|
209
212
|
|
|
210
213
|
@previous_space = previous_space_class.constantize.find_by(id: previous_space_id)
|
|
211
214
|
@previous_space
|
|
@@ -213,6 +216,14 @@ module Decidim
|
|
|
213
216
|
nil
|
|
214
217
|
end
|
|
215
218
|
|
|
219
|
+
def valid_participatory_space_class?(class_name)
|
|
220
|
+
return false if class_name.blank?
|
|
221
|
+
|
|
222
|
+
Decidim.participatory_space_manifests.any? do |manifest|
|
|
223
|
+
manifest.model_class_name == class_name
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
216
227
|
def conference_context?
|
|
217
228
|
return false unless Decidim.module_installed?(:conferences)
|
|
218
229
|
return false if current_participatory_space.blank?
|
|
@@ -100,9 +100,7 @@ module Decidim
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
meeting.waitlist_enabled? && !meeting.has_available_slots? && !meeting.has_registration_for?(current_user)
|
|
105
|
-
end
|
|
103
|
+
protected
|
|
106
104
|
|
|
107
105
|
def allow_responses?
|
|
108
106
|
return false unless meeting.registrations_enabled? && meeting.registration_form_enabled?
|
|
@@ -126,6 +124,10 @@ module Decidim
|
|
|
126
124
|
|
|
127
125
|
private
|
|
128
126
|
|
|
127
|
+
def should_join_waitlist?
|
|
128
|
+
meeting.waitlist_enabled? && !meeting.has_available_slots? && !meeting.has_registration_for?(current_user)
|
|
129
|
+
end
|
|
130
|
+
|
|
129
131
|
def meeting
|
|
130
132
|
@meeting ||= Meeting.where(component: current_component).find(params[:meeting_id])
|
|
131
133
|
end
|
|
@@ -6,6 +6,8 @@ module Decidim
|
|
|
6
6
|
class VersionsController < Decidim::Meetings::ApplicationController
|
|
7
7
|
include Decidim::ResourceVersionsConcern
|
|
8
8
|
|
|
9
|
+
private
|
|
10
|
+
|
|
9
11
|
def versioned_resource
|
|
10
12
|
@versioned_resource ||= Meeting.not_hidden.where(component: current_component).find(params[:meeting_id])
|
|
11
13
|
end
|
|
@@ -35,12 +35,12 @@ module Decidim
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def agenda_duration
|
|
38
|
-
@agenda_duration ||= agenda_items.sum(&:duration)
|
|
38
|
+
@agenda_duration ||= agenda_items.reject(&:deleted?).sum(&:duration)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def agenda_items_duration_too_long
|
|
42
|
-
agenda_items.each do |agenda_item|
|
|
43
|
-
children_duration = agenda_item.agenda_item_children.sum(&:duration)
|
|
42
|
+
agenda_items.reject(&:deleted?).each do |agenda_item|
|
|
43
|
+
children_duration = agenda_item.agenda_item_children.reject(&:deleted?).sum(&:duration)
|
|
44
44
|
|
|
45
45
|
if children_duration > agenda_item.duration
|
|
46
46
|
difference = children_duration - agenda_item.duration
|
|
@@ -140,7 +140,7 @@ module Decidim
|
|
|
140
140
|
|
|
141
141
|
scope :visible, -> { where("decidim_meetings_meetings.private_meeting != ? OR decidim_meetings_meetings.transparent = ?", true, true) }
|
|
142
142
|
|
|
143
|
-
scope :authored_by, ->(author) { where(
|
|
143
|
+
scope :authored_by, ->(author) { where(author:) }
|
|
144
144
|
|
|
145
145
|
scope_search_multi :with_any_type, TYPE_OF_MEETING.keys
|
|
146
146
|
|
|
@@ -10,7 +10,9 @@ module Decidim
|
|
|
10
10
|
def target_subject = :meeting
|
|
11
11
|
|
|
12
12
|
def can_read?
|
|
13
|
-
|
|
13
|
+
return true if meeting.nil?
|
|
14
|
+
|
|
15
|
+
user_has_any_role?(user, meeting.participatory_space, broad_check: true) || (!meeting.hidden? && meeting.current_user_can_visit_meeting?(user))
|
|
14
16
|
end
|
|
15
17
|
|
|
16
18
|
def meeting
|
|
@@ -4,26 +4,26 @@
|
|
|
4
4
|
</button>
|
|
5
5
|
|
|
6
6
|
<%= decidim_modal id: "calendarShare", class: "meeting-list__modal" do %>
|
|
7
|
-
<div
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<h3 id="dialog-title-calendarShare" class="h3"><%= t(".calendar_url") %></h3>
|
|
7
|
+
<div data-dialog-container>
|
|
8
|
+
<%= icon "share-forward-2-line" %>
|
|
9
|
+
<h2 id="dialog-title-calendarShare" tabindex="-1" data-dialog-title><%= t(".calendar_url") %></h2>
|
|
11
10
|
|
|
12
|
-
<
|
|
13
|
-
|
|
11
|
+
<div class="space-y-8">
|
|
12
|
+
<p id="dialog-desc-calendarShare" class="meeting-list__modal-text"><%= t(".copy_calendar_url_description") %></p>
|
|
13
|
+
<p class="meeting-list__modal-text"><%= t(".copy_calendar_url_explanation") %></p>
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
<div class="meeting-list__modal-input">
|
|
16
|
+
<input id="urlCalendarUrl" type="text" title="<%= t(".calendar_url") %>" value="<%= "#{path}" %>" readonly>
|
|
17
|
+
<button
|
|
18
|
+
data-controller="clipboard-copy"
|
|
19
|
+
data-clipboard-copy="#urlCalendarUrl"
|
|
20
|
+
data-clipboard-copy-label="<%= t(".copy_calendar_url_copied") %>"
|
|
21
|
+
data-clipboard-copy-message="<%= t(".copy_calendar_url_message") %>"
|
|
22
|
+
aria-label="<%= t(".copy_calendar_url_clarification") %>">
|
|
23
|
+
<%= icon "file-copy-line" %>
|
|
24
|
+
<span class="sr-only"><%= t(".copy_calendar_url") %></span>
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
26
27
|
</div>
|
|
27
28
|
</div>
|
|
28
|
-
</div>
|
|
29
29
|
<% end %>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</span>
|
|
15
15
|
|
|
16
16
|
<span class="ml-auto flex flex-row-reverse items-center gap-2">
|
|
17
|
-
<button id="<%= id %>-button" type="button" class="question--collapse
|
|
17
|
+
<button id="<%= id %>-button" type="button" class="question--collapse" data-controls="panel-<%= id %>-question-card" data-open="<%= is_expanded %>">
|
|
18
18
|
<span class="icon-collapse">
|
|
19
19
|
<%== icon "arrow-up-s-line", aria_label: t("collapse", scope: "decidim.forms.admin.questionnaires.question"), role: "img" %>
|
|
20
20
|
</span>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div data-dialog-container>
|
|
3
3
|
<div data-dialog-title>
|
|
4
4
|
<%= icon "qr-code-line" %>
|
|
5
|
-
<h2 class="h4" tabindex="-1"><%= t("registration_and_qr_code", scope: "decidim.meetings.meetings.show") %></h2>
|
|
5
|
+
<h2 id="dialog-title-registration-qr-code-dialog" class="h4" tabindex="-1"><%= t("registration_and_qr_code", scope: "decidim.meetings.meetings.show") %></h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="content">
|
|
8
8
|
<div>
|
data/config/locales/cs.yml
CHANGED
|
@@ -173,6 +173,7 @@ cs:
|
|
|
173
173
|
announcement: Oznámení
|
|
174
174
|
clear_all: Vymazat vše
|
|
175
175
|
comments_enabled: Komentáře povoleny
|
|
176
|
+
comments_max_length: Maximální počet znaků na komentář (ponechte 0 pro výchozí hodnotu)
|
|
176
177
|
creation_enabled_for_participants: Účastníci mohou vytvářet schůzky
|
|
177
178
|
default_registration_terms: Výchozí podmínky registrace
|
|
178
179
|
define_taxonomy_filters: Před použitím tohoto nastavení prosím definujte některé filtry pro tento participační prostor.
|
data/config/locales/de.yml
CHANGED
|
@@ -144,6 +144,7 @@ de:
|
|
|
144
144
|
success: Veranstaltung erfolgreich dupliziert.
|
|
145
145
|
new:
|
|
146
146
|
copy: Kopieren
|
|
147
|
+
title: Veranstaltung duplizieren
|
|
147
148
|
tooltips:
|
|
148
149
|
cannot_close_meetings: Diese Veranstaltung kann nicht abgeschlossen werden, da sie von einem Teilnehmenden erstellt wurde
|
|
149
150
|
cannot_duplicate_meetings: Dieses Meeting kann nicht dupliziert werden, da es von einem Teilnehmenden erstellt wurde
|
|
@@ -166,6 +167,7 @@ de:
|
|
|
166
167
|
announcement: Ankündigung
|
|
167
168
|
clear_all: Alles löschen
|
|
168
169
|
comments_enabled: Kommentare aktiviert
|
|
170
|
+
comments_max_length: Maximale Zeichenanzahl pro Kommentar (0 für Standardwert)
|
|
169
171
|
creation_enabled_for_participants: Teilnehmende können Veranstaltungen erstellen
|
|
170
172
|
default_registration_terms: Standard-Registrierungsbedingungen
|
|
171
173
|
define_taxonomy_filters: Bitte definieren Sie einige Filter für diesen partizipativen Bereich, bevor Sie diese Einstellung verwenden.
|
|
@@ -350,6 +352,7 @@ de:
|
|
|
350
352
|
non_user: Nicht existierender Benutzer
|
|
351
353
|
select_user: Nutzer wählen
|
|
352
354
|
index:
|
|
355
|
+
invite_attendee: Teilnehmende einladen
|
|
353
356
|
invites: Lädt ein
|
|
354
357
|
registrations_disabled: Sie können keine Teilnehmende einladen, weil Registrierungen deaktiviert sind.
|
|
355
358
|
meeting_closes:
|
|
@@ -804,7 +807,7 @@ de:
|
|
|
804
807
|
longitude: Der Längengrad des Veranstaltungsorts
|
|
805
808
|
online_meeting_url: Die URL der Online-Veranstaltung
|
|
806
809
|
organizations: Die Organisationen, die an dieser Veranstaltung teilnehmen
|
|
807
|
-
participatory_space: Zu welchem Bereich diese Veranstaltung gehört (z.B. Beteiligungsprozesse oder
|
|
810
|
+
participatory_space: Zu welchem Bereich diese Veranstaltung gehört (z.B. Beteiligungsprozesse oder Versammlungen)
|
|
808
811
|
private_meeting: Um anzugeben, ob die Veranstaltung privat ist oder nicht
|
|
809
812
|
published: Wann die Veranstaltung veröffentlicht wurde
|
|
810
813
|
reference: Die eindeutige Bezeichnung der Ressource auf dieser Plattform
|