decidim-meetings 0.29.1 → 0.30.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/meetings/cancel_registration_meeting_button/cancelation_modal.erb +1 -1
- data/app/cells/decidim/meetings/cancel_registration_meeting_button/show.erb +3 -1
- data/app/cells/decidim/meetings/cancel_registration_meeting_button_cell.rb +1 -1
- data/app/cells/decidim/meetings/dates_and_map/show.erb +6 -4
- data/app/cells/decidim/meetings/dates_and_map_cell.rb +1 -1
- data/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +1 -1
- data/app/cells/decidim/meetings/join_meeting_button/show.erb +5 -2
- data/app/cells/decidim/meetings/meeting_card_metadata_cell.rb +3 -3
- data/app/cells/decidim/meetings/meeting_l_cell.rb +17 -0
- data/app/commands/decidim/meetings/admin/copy_meeting.rb +1 -2
- data/app/commands/decidim/meetings/admin/create_meeting.rb +8 -2
- data/app/commands/decidim/meetings/admin/update_meeting.rb +8 -2
- data/app/commands/decidim/meetings/create_meeting.rb +2 -2
- data/app/commands/decidim/meetings/update_meeting.rb +2 -3
- data/app/controllers/concerns/decidim/meetings/admin/filterable.rb +9 -5
- data/app/controllers/concerns/decidim/meetings/component_filterable.rb +1 -2
- data/app/controllers/decidim/meetings/admin/meetings_controller.rb +14 -22
- data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +8 -0
- data/app/controllers/decidim/meetings/directory/meetings_controller.rb +2 -4
- data/app/controllers/decidim/meetings/meetings_controller.rb +40 -6
- data/app/forms/decidim/meetings/admin/close_meeting_form.rb +1 -1
- data/app/forms/decidim/meetings/admin/meeting_agenda_items_form.rb +1 -1
- data/app/forms/decidim/meetings/admin/meeting_form.rb +17 -31
- data/app/forms/decidim/meetings/admin/meeting_registrations_form.rb +2 -2
- data/app/forms/decidim/meetings/base_meeting_form.rb +6 -0
- data/app/forms/decidim/meetings/meeting_form.rb +2 -30
- data/app/helpers/decidim/meetings/admin/application_helper.rb +11 -1
- data/app/helpers/decidim/meetings/application_helper.rb +35 -1
- data/app/helpers/decidim/meetings/directory/application_helper.rb +9 -48
- data/app/helpers/decidim/meetings/meetings_helper.rb +5 -0
- data/app/models/decidim/meetings/invite.rb +10 -0
- data/app/models/decidim/meetings/meeting.rb +23 -1
- data/app/models/decidim/meetings/meeting_link.rb +25 -0
- data/app/packs/entrypoints/decidim_meetings_admin.js +1 -0
- data/app/packs/src/decidim/meetings/admin/meetings_components_form.js +77 -0
- data/app/packs/src/decidim/meetings/admin/meetings_form.js +8 -0
- data/app/packs/stylesheets/decidim/meetings/_item.scss +5 -17
- data/app/permissions/decidim/meetings/admin/permissions.rb +1 -1
- data/app/permissions/decidim/meetings/permissions.rb +20 -11
- data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +1 -1
- data/app/presenters/decidim/meetings/meeting_presenter.rb +14 -6
- data/app/queries/decidim/meetings/filtered_meetings.rb +2 -2
- data/app/queries/decidim/meetings/metrics/meeting_followers_metric_measure.rb +2 -2
- data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +6 -6
- data/app/serializers/decidim/meetings/base_download_your_data_serializer.rb +32 -0
- data/app/serializers/decidim/meetings/download_your_data_invite_serializer.rb +6 -26
- data/app/serializers/decidim/meetings/download_your_data_meeting_serializer.rb +15 -0
- data/app/serializers/decidim/meetings/download_your_data_registration_serializer.rb +6 -24
- data/app/views/decidim/meetings/admin/meetings/_component.html.erb +15 -0
- data/app/views/decidim/meetings/admin/meetings/_form.html.erb +7 -9
- data/app/views/decidim/meetings/admin/meetings/_linked_spaces.html.erb +53 -0
- data/app/views/decidim/meetings/admin/meetings/_meeting-tr.html.erb +42 -0
- data/app/views/decidim/meetings/admin/meetings/_meeting_actions.html.erb +70 -0
- data/app/views/decidim/meetings/admin/meetings/_meetings-thead.html.erb +26 -0
- data/app/views/decidim/meetings/admin/meetings/index.html.erb +16 -142
- data/app/views/decidim/meetings/admin/meetings/manage_trash.html.erb +23 -0
- data/app/views/decidim/meetings/admin/registration_form/edit_questions.html.erb +44 -0
- data/app/views/decidim/meetings/admin/registrations/edit.html.erb +1 -0
- data/app/views/decidim/meetings/directory/meetings/index.html.erb +1 -2
- data/app/views/decidim/meetings/live_events/show.html.erb +5 -5
- data/app/views/decidim/meetings/meetings/_form.html.erb +4 -8
- data/app/views/decidim/meetings/meetings/_meeting.html.erb +51 -26
- data/app/views/decidim/meetings/meetings/_meeting_actions.html.erb +34 -0
- data/app/views/decidim/meetings/meetings/_meeting_aside.html.erb +20 -59
- data/app/views/decidim/meetings/meetings/_meeting_poll_actions.html.erb +2 -5
- data/app/views/decidim/meetings/meetings/_schema_org_event_meeting.html.erb +3 -0
- data/app/views/decidim/meetings/meetings/index.html.erb +10 -2
- data/app/views/decidim/meetings/meetings/show.html.erb +5 -5
- data/app/views/decidim/meetings/polls/answers/index.html.erb +5 -5
- data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +1 -1
- data/app/views/decidim/meetings/shared/_filters.html.erb +1 -13
- data/app/views/decidim/meetings/shared/_index.html.erb +1 -1
- data/app/views/decidim/meetings/shared/_index.js.erb +5 -5
- data/app/views/decidim/meetings/shared/_meetings_aside.html.erb +2 -2
- data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +1 -1
- data/config/locales/ar.yml +17 -15
- data/config/locales/bg.yml +5 -26
- data/config/locales/bn-BD.yml +1 -0
- data/config/locales/bs-BA.yml +8 -0
- data/config/locales/ca.yml +137 -25
- data/config/locales/cs.yml +139 -28
- data/config/locales/de.yml +172 -92
- data/config/locales/el.yml +1 -20
- data/config/locales/en.yml +133 -21
- data/config/locales/es-MX.yml +137 -25
- data/config/locales/es-PY.yml +137 -25
- data/config/locales/es.yml +137 -25
- data/config/locales/eu.yml +167 -55
- data/config/locales/fi-plain.yml +138 -26
- data/config/locales/fi.yml +150 -38
- data/config/locales/fr-CA.yml +79 -26
- data/config/locales/fr.yml +79 -26
- data/config/locales/ga-IE.yml +0 -10
- data/config/locales/gl.yml +1 -8
- data/config/locales/hu.yml +1 -17
- data/config/locales/id-ID.yml +1 -5
- data/config/locales/is-IS.yml +0 -4
- data/config/locales/it.yml +1 -12
- data/config/locales/ja.yml +96 -26
- data/config/locales/lb.yml +0 -8
- data/config/locales/lt.yml +1 -24
- data/config/locales/lv.yml +1 -5
- data/config/locales/nl.yml +1 -15
- data/config/locales/no.yml +1 -14
- data/config/locales/pl.yml +5 -22
- data/config/locales/pt-BR.yml +1 -22
- data/config/locales/pt.yml +1 -12
- data/config/locales/ro-RO.yml +32 -16
- data/config/locales/ru.yml +1 -5
- data/config/locales/sk.yml +1 -5
- data/config/locales/sv.yml +74 -26
- data/config/locales/tr-TR.yml +1 -8
- data/config/locales/uk.yml +0 -4
- data/config/locales/zh-CN.yml +1 -8
- data/config/locales/zh-TW.yml +1 -19
- data/db/migrate/20181107175558_add_questionnaire_to_existing_meetings.rb +1 -1
- data/db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb +1 -1
- data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +1 -1
- data/db/migrate/20210310120731_add_followable_counter_cache_to_meetings.rb +1 -1
- data/db/migrate/20240712104245_create_decidim_meetings_meeting_link.rb +12 -0
- data/db/migrate/20240828103603_add_deleted_at_to_decidim_meetings_meetings.rb +8 -0
- data/decidim-meetings.gemspec +2 -2
- data/lib/decidim/api/agenda_item_type.rb +6 -7
- data/lib/decidim/api/agenda_type.rb +3 -4
- data/lib/decidim/api/meeting_type.rb +44 -40
- data/lib/decidim/api/meetings_type.rb +5 -8
- data/lib/decidim/api/service_type.rb +1 -1
- data/lib/decidim/meetings/admin_engine.rb +9 -1
- data/lib/decidim/meetings/component.rb +14 -4
- data/lib/decidim/meetings/download_your_data_user_answers_serializer.rb +13 -7
- data/lib/decidim/meetings/engine.rb +2 -0
- data/lib/decidim/meetings/meeting_serializer.rb +86 -38
- data/lib/decidim/meetings/schema_org_event_meeting_serializer.rb +151 -0
- data/lib/decidim/meetings/seeds.rb +2 -4
- data/lib/decidim/meetings/test/factories.rb +14 -0
- data/lib/decidim/meetings/test/translated_event.rb +3 -3
- data/lib/decidim/meetings/version.rb +1 -1
- data/lib/decidim/meetings.rb +1 -0
- metadata +35 -22
- data/app/cells/decidim/meetings/meetings_map/show.erb +0 -16
- data/app/cells/decidim/meetings/meetings_map_cell.rb +0 -32
- data/app/commands/decidim/meetings/admin/destroy_meeting.rb +0 -21
- data/app/helpers/decidim/meetings/map_helper.rb +0 -21
- data/app/views/decidim/meetings/meetings/_actions.html.erb +0 -6
@@ -14,10 +14,10 @@ module Decidim
|
|
14
14
|
meetings = Decidim::Meetings::Meeting.where(component: @resource).joins(:component)
|
15
15
|
|
16
16
|
meetings_followers = Decidim::Follow.where(followable: meetings).joins(:user)
|
17
|
-
.where(
|
17
|
+
.where(decidim_follows: { created_at: ..end_time })
|
18
18
|
cumulative_users = meetings_followers.pluck(:decidim_user_id)
|
19
19
|
|
20
|
-
meetings_followers = meetings_followers.where(
|
20
|
+
meetings_followers = meetings_followers.where(decidim_follows: { created_at: start_time.. })
|
21
21
|
quantity_users = meetings_followers.pluck(:decidim_user_id)
|
22
22
|
|
23
23
|
{
|
@@ -13,9 +13,9 @@ module Decidim
|
|
13
13
|
next if cumulative_value.zero?
|
14
14
|
|
15
15
|
quantity_value = quantity[key] || 0
|
16
|
-
|
16
|
+
taxonomy_id, space_type, space_id = key
|
17
17
|
record = Decidim::Metric.find_or_initialize_by(day: @day.to_s, metric_type: @metric_name,
|
18
|
-
organization: @organization,
|
18
|
+
organization: @organization, decidim_taxonomy_id: taxonomy_id,
|
19
19
|
participatory_space_type: space_type, participatory_space_id: space_id)
|
20
20
|
record.assign_attributes(cumulative: cumulative_value, quantity: quantity_value)
|
21
21
|
record.save!
|
@@ -31,16 +31,16 @@ module Decidim
|
|
31
31
|
manifest.participatory_spaces.call(@organization).public_spaces
|
32
32
|
end
|
33
33
|
@query = Decidim::Meetings::Meeting.where(component: visible_components_from_spaces(spaces)).joins(:component)
|
34
|
-
.left_outer_joins(:
|
35
|
-
@query = @query.where(
|
36
|
-
@query = @query.group("
|
34
|
+
.left_outer_joins(:taxonomizations).visible
|
35
|
+
@query = @query.where(decidim_meetings_meetings: { created_at: ..end_time })
|
36
|
+
@query = @query.group("decidim_taxonomizations.taxonomy_id",
|
37
37
|
:participatory_space_type,
|
38
38
|
:participatory_space_id)
|
39
39
|
@query
|
40
40
|
end
|
41
41
|
|
42
42
|
def quantity
|
43
|
-
@quantity ||= query.where(
|
43
|
+
@quantity ||= query.where(decidim_meetings_meetings: { created_at: start_time.. }).count
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Meetings
|
5
|
+
class BaseDownloadYourDataSerializer < Decidim::Exporters::Serializer
|
6
|
+
# This is the Base class for Invite and Registrations models for the download your data feature
|
7
|
+
def serialize
|
8
|
+
{
|
9
|
+
id: resource.id,
|
10
|
+
created_at: resource.created_at,
|
11
|
+
updated_at: resource.updated_at,
|
12
|
+
meeting: {
|
13
|
+
title: resource.meeting.title,
|
14
|
+
url: Decidim::ResourceLocatorPresenter.new(resource.meeting).url,
|
15
|
+
description: resource.meeting.description,
|
16
|
+
start_time: resource.meeting.start_time,
|
17
|
+
end_time: resource.meeting.end_time,
|
18
|
+
address: resource.meeting.address,
|
19
|
+
location: resource.meeting.location,
|
20
|
+
location_hints: resource.meeting.location_hints,
|
21
|
+
reference: resource.meeting.reference,
|
22
|
+
attendees_count: resource.meeting.attendees_count,
|
23
|
+
attending_organizations: resource.meeting.attending_organizations,
|
24
|
+
closed_at: resource.meeting.closed_at,
|
25
|
+
closing_report: resource.meeting.closing_report,
|
26
|
+
published_at: resource.meeting.published_at
|
27
|
+
}
|
28
|
+
}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -2,34 +2,14 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Meetings
|
5
|
-
class DownloadYourDataInviteSerializer <
|
5
|
+
class DownloadYourDataInviteSerializer < BaseDownloadYourDataSerializer
|
6
6
|
# Serializes an invite for download your data
|
7
7
|
def serialize
|
8
|
-
{
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
user: {
|
14
|
-
name: resource.user.name,
|
15
|
-
email: resource.user.email
|
16
|
-
},
|
17
|
-
meeting: {
|
18
|
-
title: resource.meeting.title,
|
19
|
-
description: resource.meeting.description,
|
20
|
-
start_time: resource.meeting.start_time,
|
21
|
-
end_time: resource.meeting.end_time,
|
22
|
-
address: resource.meeting.address,
|
23
|
-
location: resource.meeting.location,
|
24
|
-
location_hints: resource.meeting.location_hints,
|
25
|
-
reference: resource.meeting.reference,
|
26
|
-
attendees_count: resource.meeting.attendees_count,
|
27
|
-
attending_organizations: resource.meeting.attending_organizations,
|
28
|
-
closed_at: resource.meeting.closed_at,
|
29
|
-
closing_report: resource.meeting.closing_report,
|
30
|
-
published_at: resource.meeting.published_at
|
31
|
-
}
|
32
|
-
}
|
8
|
+
super.merge({
|
9
|
+
sent_at: resource.sent_at,
|
10
|
+
accepted_at: resource.accepted_at,
|
11
|
+
rejected_at: resource.rejected_at
|
12
|
+
})
|
33
13
|
end
|
34
14
|
end
|
35
15
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Meetings
|
5
|
+
class DownloadYourDataMeetingSerializer < Decidim::Meetings::MeetingSerializer
|
6
|
+
# Serializes a Meeting for download your data feature
|
7
|
+
#
|
8
|
+
# Remove the author information as it is the same of the user that
|
9
|
+
# requested the data
|
10
|
+
def serialize
|
11
|
+
super.except!(:author)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -2,32 +2,14 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Meetings
|
5
|
-
class DownloadYourDataRegistrationSerializer <
|
5
|
+
class DownloadYourDataRegistrationSerializer < BaseDownloadYourDataSerializer
|
6
6
|
# Serializes a registration for download your data
|
7
7
|
def serialize
|
8
|
-
{
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
email: resource.user.email
|
14
|
-
},
|
15
|
-
meeting: {
|
16
|
-
title: resource.meeting.title,
|
17
|
-
description: resource.meeting.description,
|
18
|
-
start_time: resource.meeting.start_time,
|
19
|
-
end_time: resource.meeting.end_time,
|
20
|
-
address: resource.meeting.address,
|
21
|
-
location: resource.meeting.location,
|
22
|
-
location_hints: resource.meeting.location_hints,
|
23
|
-
reference: resource.meeting.reference,
|
24
|
-
attendees_count: resource.meeting.attendees_count,
|
25
|
-
attending_organizations: resource.meeting.attending_organizations,
|
26
|
-
closed_at: resource.meeting.closed_at,
|
27
|
-
closing_report: resource.meeting.closing_report,
|
28
|
-
published_at: resource.meeting.published_at
|
29
|
-
}
|
30
|
-
}
|
8
|
+
super.merge({
|
9
|
+
code: resource.code,
|
10
|
+
validated_at: resource.validated_at,
|
11
|
+
public_participation: resource.public_participation
|
12
|
+
})
|
31
13
|
end
|
32
14
|
end
|
33
15
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="title">
|
3
|
+
<span class="js-component-title text-md">
|
4
|
+
<%= link_to component.hierarchy_title, main_component_path(component) if component %>
|
5
|
+
</span>
|
6
|
+
<%= hidden_field_tag "meeting[component_ids][]", component&.id %>
|
7
|
+
</td>
|
8
|
+
<td>
|
9
|
+
<%= with_tooltip(t(".unlink"), class: :top) do %>
|
10
|
+
<button type="button" class="js-remove-component cursor text-secondary text-md font-semibold">
|
11
|
+
<%= icon "unlink" %>
|
12
|
+
</button>
|
13
|
+
<% end %>
|
14
|
+
</td>
|
15
|
+
</tr>
|
@@ -59,17 +59,14 @@
|
|
59
59
|
<%= form.datetime_field :end_time %>
|
60
60
|
</div>
|
61
61
|
</div>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
62
|
+
|
63
|
+
<% if @form.taxonomy_filters&.any? %>
|
64
|
+
<% @form.taxonomy_filters.each do |filter| %>
|
65
|
+
<div class="row column">
|
66
|
+
<%= filter_taxonomy_items_select_field form, :taxonomies, filter %>
|
66
67
|
</div>
|
67
68
|
<% end %>
|
68
|
-
|
69
|
-
<div class="columns">
|
70
|
-
<%= form.categories_select :decidim_category_id, current_participatory_space.categories, include_blank: "", disable_parents: false %>
|
71
|
-
</div>
|
72
|
-
</div>
|
69
|
+
<% end %>
|
73
70
|
|
74
71
|
<div class="row column">
|
75
72
|
<%= form.select :registration_type,
|
@@ -95,6 +92,7 @@
|
|
95
92
|
</div>
|
96
93
|
</div>
|
97
94
|
<%= render "decidim/meetings/admin/meetings/services", form: , id: tabs_id_for_service(blank_service) %>
|
95
|
+
<%= render "decidim/meetings/admin/meetings/linked_spaces", form: %>
|
98
96
|
</div>
|
99
97
|
|
100
98
|
<%= append_javascript_pack_tag "decidim_meetings_admin" %>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<%= append_stylesheet_pack_tag "decidim_proposals", media: "all" %>
|
2
|
+
|
3
|
+
<div class="card" data-component="accordion" id="accordion-linked-spaces">
|
4
|
+
<div class="card-divider">
|
5
|
+
<button class="card-divider-button" data-open="false" data-controls="panel-linked-spaces" type="button">
|
6
|
+
<%= icon "arrow-right-s-line" %>
|
7
|
+
<h2 class="card-title" id="linked-spaces"><%= t(".title") %></h2>
|
8
|
+
</button>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div id="panel-linked-spaces" class="px-4">
|
12
|
+
<% if form.object.private_non_transparent_space? %>
|
13
|
+
<%= cell("decidim/announcement", t(".private_space_warning"), callout_class: "warning") %>
|
14
|
+
<% else %>
|
15
|
+
<%= cell("decidim/announcement", t(".private_meeting_warning"), callout_class: "warning js-private-warning hidden") %>
|
16
|
+
|
17
|
+
<div>
|
18
|
+
<label>
|
19
|
+
<%= t(".link_a_space") %>
|
20
|
+
</label>
|
21
|
+
<div>
|
22
|
+
<select id="add_component_select" name="add_component_select" placeholder="<%= t(".select") %>" class="w-full mt-2">
|
23
|
+
<option value=""><%= t(".select") %></option>
|
24
|
+
<%= find_meeting_components_for_select.map do |option| %>
|
25
|
+
<option value="<%= option[1] %>"><%= option[0] %></option>
|
26
|
+
<% end %>
|
27
|
+
</select>
|
28
|
+
<button class="button button__sm button__secondary add-service mt-2 js-add-component mb-8" type="button">
|
29
|
+
<%= t(".assign") %>
|
30
|
+
</button>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<template id="meeting_component_template">
|
36
|
+
<%= render "decidim/meetings/admin/meetings/component", component: nil %>
|
37
|
+
</template>
|
38
|
+
|
39
|
+
<table class="table-list w-full js-components <%= form.object.components.empty? && "hidden" %>">
|
40
|
+
<thead>
|
41
|
+
<tr>
|
42
|
+
<th><%= t(".table.component") %></th>
|
43
|
+
<th><%= t(".table.actions") %></th>
|
44
|
+
</tr>
|
45
|
+
</thead>
|
46
|
+
<tbody>
|
47
|
+
<% form.object.components.each do |component| %>
|
48
|
+
<%= render "decidim/meetings/admin/meetings/component", component: %>
|
49
|
+
<% end %>
|
50
|
+
</tbody>
|
51
|
+
</table>
|
52
|
+
</div>
|
53
|
+
</div>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<% is_linked = meeting.decidim_component_id != current_component.id %>
|
2
|
+
|
3
|
+
<tr data-id="<%= meeting.id %>">
|
4
|
+
<td>
|
5
|
+
<%= meeting.id %><br>
|
6
|
+
</td>
|
7
|
+
<td class="!text-left">
|
8
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
9
|
+
<%= link_to present(meeting).title(html_escape: true), edit_meeting_path(meeting) %>
|
10
|
+
<% else %>
|
11
|
+
<%= present(meeting).title(html_escape: true) %><br>
|
12
|
+
<% end %>
|
13
|
+
</td>
|
14
|
+
<td>
|
15
|
+
<% if meeting.start_time %>
|
16
|
+
<%= l meeting.start_time, format: :long %>
|
17
|
+
<% end %>
|
18
|
+
</td>
|
19
|
+
<td>
|
20
|
+
<% if meeting.end_time %>
|
21
|
+
<%= l meeting.end_time, format: :long %>
|
22
|
+
<% end %>
|
23
|
+
</td>
|
24
|
+
<td>
|
25
|
+
<%= humanize_boolean meeting.closed? %>
|
26
|
+
</td>
|
27
|
+
<% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
|
28
|
+
<td>
|
29
|
+
<%= static_map_link(meeting, {}, { class: "static-map__admin" }) unless meeting.online? %>
|
30
|
+
</td>
|
31
|
+
<% end %>
|
32
|
+
<td>
|
33
|
+
<%= present(meeting).taxonomy_names.join(", ") %>
|
34
|
+
</td>
|
35
|
+
<td class="table-list__actions">
|
36
|
+
<% if is_linked %>
|
37
|
+
<%= t("index.linked_meeting_warning_html", href: edit_meeting_path(meeting), name: present(meeting).space_title, scope: "decidim.meetings.admin.meetings") %>
|
38
|
+
<% else %>
|
39
|
+
<%= render partial: "decidim/meetings/admin/meetings/meeting_actions", locals: { meeting:, view: } %>
|
40
|
+
<% end %>
|
41
|
+
</td>
|
42
|
+
</tr>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<% if view == :deleted %>
|
2
|
+
<% if allowed_to? :restore, :meeting, trashable_deleted_resource: meeting %>
|
3
|
+
<%= icon_link_to "refresh-line", url_for(action: :restore, id: meeting, controller: "meetings"), t("decidim.admin.actions.restore"), method: :patch, class: "action-icon--restore" %>
|
4
|
+
<% end %>
|
5
|
+
<% else %>
|
6
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
7
|
+
<%= icon_link_to "pencil-line", edit_meeting_path(meeting), t("actions.edit", scope: "decidim.meetings"), class: "action-icon--edit" %>
|
8
|
+
<% else %>
|
9
|
+
<span class="action-space icon"></span>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% if allowed_to? :copy, :meeting, meeting: meeting %>
|
13
|
+
<%= icon_link_to "file-copy-line", new_meeting_copy_path(meeting), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
|
14
|
+
<% else %>
|
15
|
+
<span class="action-space icon"></span>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
19
|
+
<%= icon_link_to "folder-line", meeting_attachment_collections_path(meeting), t("actions.attachment_collections", scope: "decidim.meetings"), class: "action-icon--attachment_collections" %>
|
20
|
+
<% else %>
|
21
|
+
<span class="action-space icon"></span>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
25
|
+
<%= icon_link_to "attachment-line", meeting_attachments_path(meeting), t("actions.attachments", scope: "decidim.meetings"), class: "action-icon--attachments" %>
|
26
|
+
<% else %>
|
27
|
+
<span class="action-space icon"></span>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
31
|
+
<% if meeting.registration_disabled? %>
|
32
|
+
<%= icon "group-line", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.registrations", scope: "decidim.meetings") %>
|
33
|
+
<% else %>
|
34
|
+
<%= icon_link_to "group-line", meeting.on_this_platform? ? edit_meeting_registrations_path(meeting) : meeting.registration_url, t("actions.registrations", scope: "decidim.meetings"), class: "action-icon--registrations" %>
|
35
|
+
<% end %>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
39
|
+
<%= icon_link_to "calendar-line", meeting.agenda.present? ? edit_meeting_agenda_path(meeting, meeting.agenda) : new_meeting_agenda_path(meeting), t("actions.agenda", scope: "decidim.meetings"), class: "action-icon--agenda" %>
|
40
|
+
<%= icon_link_to "list-check", edit_meeting_poll_path(meeting), t("actions.manage_poll", scope: "decidim.meetings"), class: "action-icon--manage-poll-questionnaire" %>
|
41
|
+
<% else %>
|
42
|
+
<span class="action-space icon"></span>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
<% if allowed_to? :close, :meeting, meeting: meeting %>
|
46
|
+
<%= icon_link_to "lock-line", edit_meeting_meeting_close_path(meeting_id: meeting.id, id: meeting.id), t("actions.close", scope: "decidim.meetings"), class: "action-icon--close" %>
|
47
|
+
<% else %>
|
48
|
+
<span class="action-space icon"></span>
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
52
|
+
<% if meeting.published? %>
|
53
|
+
<%= icon_link_to "close-circle-line", unpublish_meeting_path(meeting), t("actions.unpublish", scope: "decidim.admin"), method: :put, class: "action-icon--unpublish", data: { confirm: t("actions.unpublish", scope: "decidim.admin") } %>
|
54
|
+
<% else %>
|
55
|
+
<%= icon_link_to "check-line", publish_meeting_path(meeting), t("actions.publish", scope: "decidim.admin"), method: :put, class: "action-icon--publish" %>
|
56
|
+
<% end %>
|
57
|
+
<% else %>
|
58
|
+
<span class="action-space icon"></span>
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
<%= icon_link_to "eye-line", resource_locator(meeting).path, t("actions.preview", scope: "decidim.meetings"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %>
|
62
|
+
|
63
|
+
<%= resource_permissions_link(meeting) %>
|
64
|
+
|
65
|
+
<% if allowed_to? :soft_delete, :meeting, trashable_deleted_resource: meeting %>
|
66
|
+
<%= icon_link_to "delete-bin-line", soft_delete_meeting_path(meeting), t("actions.soft_delete", scope: "decidim.admin"), method: :patch, class: "action-icon--delete", data: { confirm: t("actions.confirm_delete_meeting", scope: "decidim.meetings") } %>
|
67
|
+
<% else %>
|
68
|
+
<%= icon "delete-bin-line", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.soft_delete", scope: "decidim.admin") %>
|
69
|
+
<% end %>
|
70
|
+
<% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<thead>
|
2
|
+
<tr>
|
3
|
+
<th>
|
4
|
+
<%= sort_link(query, :id, t("models.meeting.fields.id", scope: "decidim.meetings"), default_order: :desc ) %>
|
5
|
+
</th>
|
6
|
+
<th class="!text-left">
|
7
|
+
<%= sort_link(query, :translated_title, t("models.meeting.fields.title", scope: "decidim.meetings"), default_order: :desc ) %>
|
8
|
+
</th>
|
9
|
+
<th>
|
10
|
+
<%= sort_link(query, :start_time, t("models.meeting.fields.start_time", scope: "decidim.meetings"), default_order: :desc ) %>
|
11
|
+
</th>
|
12
|
+
<th>
|
13
|
+
<%= sort_link(query, :end_time, t("models.meeting.fields.end_time", scope: "decidim.meetings"), default_order: :desc ) %>
|
14
|
+
</th>
|
15
|
+
<th>
|
16
|
+
<%= sort_link(query, :closed, t("models.meeting.fields.closed", scope: "decidim.meetings"), default_order: :desc ) %>
|
17
|
+
</th>
|
18
|
+
<% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
|
19
|
+
<th><%= t("models.meeting.fields.map", scope: "decidim.meetings") %></th>
|
20
|
+
<% end %>
|
21
|
+
<th>
|
22
|
+
<%= sort_link(query, :scope_name, t("models.meeting.fields.taxonomies", scope: "decidim.meetings") ) %>
|
23
|
+
</th>
|
24
|
+
<th><%= t("actions.title", scope: "decidim.meetings") %></th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
@@ -12,152 +12,26 @@
|
|
12
12
|
<%= admin_filter_selector(:meetings) %>
|
13
13
|
<div class="table-scroll">
|
14
14
|
<table class="table-list">
|
15
|
-
|
16
|
-
<tr>
|
17
|
-
<th>
|
18
|
-
<%= sort_link(query, :id, t("models.meeting.fields.id", scope: "decidim.meetings"), default_order: :desc ) %>
|
19
|
-
</th>
|
20
|
-
<th class="!text-left">
|
21
|
-
<%= sort_link(query, :translated_title, t("models.meeting.fields.title", scope: "decidim.meetings"), default_order: :desc ) %>
|
22
|
-
</th>
|
23
|
-
<th>
|
24
|
-
<%= sort_link(query, :start_time, t("models.meeting.fields.start_time", scope: "decidim.meetings"), default_order: :desc ) %>
|
25
|
-
</th>
|
26
|
-
<th>
|
27
|
-
<%= sort_link(query, :end_time, t("models.meeting.fields.end_time", scope: "decidim.meetings"), default_order: :desc ) %>
|
28
|
-
</th>
|
29
|
-
<th>
|
30
|
-
<%= sort_link(query, :closed, t("models.meeting.fields.closed", scope: "decidim.meetings"), default_order: :desc ) %>
|
31
|
-
</th>
|
32
|
-
<% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
|
33
|
-
<th><%= t("models.meeting.fields.map", scope: "decidim.meetings") %></th>
|
34
|
-
<% end %>
|
35
|
-
<% if resource_with_scopes_enabled? %>
|
36
|
-
<th>
|
37
|
-
<%= sort_link(query, :scope_name, t("models.proposal.fields.scope", scope: "decidim.proposals") ) %>
|
38
|
-
</th>
|
39
|
-
<% end %>
|
40
|
-
<th><%= t("actions.title", scope: "decidim.meetings") %></th>
|
41
|
-
</tr>
|
42
|
-
</thead>
|
15
|
+
<%= render partial: "meetings-thead" %>
|
43
16
|
<tbody>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
</td>
|
49
|
-
<td class="!text-left">
|
50
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
51
|
-
<%= link_to present(meeting).title(html_escape: true), edit_meeting_path(meeting) %>
|
52
|
-
<% else %>
|
53
|
-
<%= present(meeting).title(html_escape: true) %><br>
|
54
|
-
<% end %>
|
55
|
-
</td>
|
56
|
-
<td>
|
57
|
-
<% if meeting.start_time %>
|
58
|
-
<%= l meeting.start_time, format: :long %>
|
59
|
-
<% end %>
|
60
|
-
</td>
|
61
|
-
<td>
|
62
|
-
<% if meeting.end_time %>
|
63
|
-
<%= l meeting.end_time, format: :long %>
|
64
|
-
<% end %>
|
65
|
-
</td>
|
66
|
-
<td>
|
67
|
-
<%= humanize_boolean meeting.closed? %>
|
68
|
-
</td>
|
69
|
-
<% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
|
70
|
-
<td>
|
71
|
-
<%= static_map_link(meeting, {}, { class: "static-map__admin" }) unless meeting.online? %>
|
72
|
-
</td>
|
73
|
-
<% end %>
|
74
|
-
<%= td_resource_scope_for(meeting.scope) %>
|
75
|
-
<td class="table-list__actions">
|
76
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
77
|
-
<%= icon_link_to "pencil-line", edit_meeting_path(meeting), t("actions.edit", scope: "decidim.meetings"), class: "action-icon--edit" %>
|
78
|
-
<% else %>
|
79
|
-
<span class="action-space icon"></span>
|
80
|
-
<% end %>
|
81
|
-
|
82
|
-
<% if allowed_to? :copy, :meeting, meeting: meeting %>
|
83
|
-
<%= icon_link_to "file-copy-line", new_meeting_copy_path(meeting), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
|
84
|
-
<% else %>
|
85
|
-
<span class="action-space icon"></span>
|
86
|
-
<% end %>
|
87
|
-
|
88
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
89
|
-
<%= icon_link_to "folder-line", meeting_attachment_collections_path(meeting), t("actions.attachment_collections", scope: "decidim.meetings"), class: "action-icon--attachment_collections" %>
|
90
|
-
<% else %>
|
91
|
-
<span class="action-space icon"></span>
|
92
|
-
<% end %>
|
93
|
-
|
94
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
95
|
-
<%= icon_link_to "attachment-line", meeting_attachments_path(meeting), t("actions.attachments", scope: "decidim.meetings"), class: "action-icon--attachments" %>
|
96
|
-
<% else %>
|
97
|
-
<span class="action-space icon"></span>
|
98
|
-
<% end %>
|
99
|
-
|
100
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
101
|
-
<% if meeting.registration_disabled? %>
|
102
|
-
<%= icon "group-line", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.registrations", scope: "decidim.meetings") %>
|
103
|
-
<% else %>
|
104
|
-
<%= icon_link_to "group-line", meeting.on_this_platform? ? edit_meeting_registrations_path(meeting) : meeting.registration_url, t("actions.registrations", scope: "decidim.meetings"), class: "action-icon--registrations" %>
|
105
|
-
<% end %>
|
106
|
-
<% end %>
|
107
|
-
|
108
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
109
|
-
<%= icon_link_to "calendar-line", meeting.agenda.present? ? edit_meeting_agenda_path(meeting, meeting.agenda) : new_meeting_agenda_path(meeting), t("actions.agenda", scope: "decidim.meetings"), class: "action-icon--agenda" %>
|
110
|
-
<%= icon_link_to "list-check", edit_meeting_poll_path(meeting), t("actions.manage_poll", scope: "decidim.meetings"), class: "action-icon--manage-poll-questionnaire" %>
|
111
|
-
<% else %>
|
112
|
-
<span class="action-space icon"></span>
|
113
|
-
<% end %>
|
114
|
-
|
115
|
-
<% if allowed_to? :close, :meeting, meeting: meeting %>
|
116
|
-
<%= icon_link_to "lock-line" , edit_meeting_meeting_close_path(meeting_id: meeting.id, id: meeting.id), t("actions.close", scope: "decidim.meetings"), class: "action-icon--close" %>
|
117
|
-
<% else %>
|
118
|
-
<span class="action-space icon"></span>
|
119
|
-
<% end %>
|
120
|
-
|
121
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
122
|
-
<% if meeting.published? %>
|
123
|
-
<%= icon_link_to "close-circle-line", unpublish_meeting_path(meeting), t("actions.unpublish", scope: "decidim.admin"), method: :put, class: "action-icon--unpublish", data: { confirm: t("actions.unpublish", scope: "decidim.admin") } %>
|
124
|
-
<% else %>
|
125
|
-
<%= icon_link_to "check-line", publish_meeting_path(meeting), t("actions.publish", scope: "decidim.admin"), method: :put, class: "action-icon--publish" %>
|
126
|
-
<% end %>
|
127
|
-
<% else %>
|
128
|
-
<span class="action-space icon"></span>
|
129
|
-
<% end %>
|
130
|
-
|
131
|
-
<%= icon_link_to "eye-line", resource_locator(meeting).path, t("actions.preview", scope: "decidim.meetings"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %>
|
132
|
-
|
133
|
-
<%= resource_permissions_link(meeting) %>
|
134
|
-
|
135
|
-
<% if allowed_to? :destroy, :meeting, meeting: meeting %>
|
136
|
-
<% if present(meeting).authored_proposals.empty? %>
|
137
|
-
<%= icon_link_to "delete-bin-line", meeting_path(meeting), t("actions.destroy", scope: "decidim.meetings"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.meetings") } %>
|
138
|
-
<% else %>
|
139
|
-
<%=
|
140
|
-
content_tag(:button,
|
141
|
-
:class => ["action-icon", "action-icon--remove", "destroy-meeting-alert"],
|
142
|
-
"data-invalid-destroy-message" => t("actions.invalid_destroy.proposals_count", count: present(meeting).authored_proposals.size, scope: "decidim.meetings"),
|
143
|
-
"data-proposal-titles" => present(meeting).formatted_proposals_titles) do
|
144
|
-
content_tag(:span,
|
145
|
-
data: { tooltip: true, disable_hover: false, click_open: false },
|
146
|
-
title: t("actions.destroy", scope: "decidim.meetings")) do
|
147
|
-
icon("delete-bin-line")
|
148
|
-
end
|
149
|
-
end
|
150
|
-
%>
|
151
|
-
<% end %>
|
152
|
-
<% else %>
|
153
|
-
<span class="action-space icon"></span>
|
154
|
-
<% end %>
|
155
|
-
</td>
|
156
|
-
</tr>
|
157
|
-
<% end %>
|
17
|
+
<%= render partial: "decidim/meetings/admin/meetings/meeting-tr",
|
18
|
+
collection: meetings,
|
19
|
+
as: :meeting,
|
20
|
+
locals: { view: :index } %>
|
158
21
|
</tbody>
|
159
22
|
</table>
|
160
23
|
</div>
|
24
|
+
<% if allowed_to? :manage_trash, :meeting, participatory_space: current_participatory_space %>
|
25
|
+
<div class="card mt-4">
|
26
|
+
<%= link_to manage_trash_meetings_path, class: "flex items-center underline text-secondary" do %>
|
27
|
+
<%= icon "delete-bin-2-line", class: "mr-2 fill-current text-secondary", role: "img" %>
|
28
|
+
<%= t("actions.view_deleted_meetings", scope: "decidim.meetings") %>
|
29
|
+
<span class="ml-2">
|
30
|
+
<%= icon_with_tooltip("information-line", t("actions.deleted_meetings_info", scope: "decidim.meetings")) %>
|
31
|
+
</span>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
161
35
|
</div>
|
162
36
|
|
163
37
|
<%= decidim_paginate meetings %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% add_decidim_page_title(t(".title")) %>
|
2
|
+
<div class="card">
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h1 class="item_show__header-title">
|
5
|
+
<%= t(".title") %>
|
6
|
+
</h1>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<%= admin_filter_selector(:meetings) %>
|
10
|
+
<div class="table-scroll">
|
11
|
+
<table class="table-list">
|
12
|
+
<%= render partial: "meetings-thead" %>
|
13
|
+
<tbody>
|
14
|
+
<%= render partial: "decidim/meetings/admin/meetings/meeting-tr",
|
15
|
+
collection: trashable_deleted_collection,
|
16
|
+
as: :meeting,
|
17
|
+
locals: { view: :deleted } %>
|
18
|
+
</tbody>
|
19
|
+
</table>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<%= decidim_paginate trashable_deleted_collection %>
|