decidim-meetings 0.27.9 → 0.28.0.rc4
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/attending_organizations_list_cell.rb +32 -0
- data/app/cells/decidim/meetings/cancel_registration_meeting_button/cancelation_modal.erb +21 -0
- data/app/cells/decidim/meetings/cancel_registration_meeting_button/show.erb +10 -13
- data/app/cells/decidim/meetings/cancel_registration_meeting_button_cell.rb +2 -2
- data/app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb +8 -18
- data/app/cells/decidim/meetings/dates_and_map/show.erb +25 -0
- data/app/cells/decidim/meetings/dates_and_map/static_map.erb +1 -0
- data/app/cells/decidim/meetings/dates_and_map_cell.rb +35 -0
- data/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +32 -30
- data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +76 -16
- data/app/cells/decidim/meetings/join_meeting_button/registration_modal.erb +25 -0
- data/app/cells/decidim/meetings/join_meeting_button/remaining_slots.erb +4 -0
- data/app/cells/decidim/meetings/join_meeting_button/show.erb +6 -4
- data/app/cells/decidim/meetings/join_meeting_button_cell.rb +3 -7
- data/app/cells/decidim/meetings/meeting_activity_cell.rb +1 -12
- data/app/cells/decidim/meetings/meeting_card_metadata_cell.rb +64 -0
- data/app/cells/decidim/meetings/meeting_cell.rb +2 -6
- data/app/cells/decidim/meetings/meeting_l/image.erb +5 -0
- data/app/cells/decidim/meetings/meeting_l_cell.rb +33 -0
- data/app/cells/decidim/meetings/meeting_month/show.erb +33 -0
- data/app/cells/decidim/meetings/meeting_month_cell.rb +72 -0
- data/app/cells/decidim/meetings/meeting_s_cell.rb +5 -37
- data/app/cells/decidim/meetings/meetings_map/show.erb +9 -24
- data/app/cells/decidim/meetings/meetings_map_cell.rb +1 -1
- data/app/cells/decidim/meetings/online_meeting_cell.rb +1 -0
- data/app/cells/decidim/meetings/online_meeting_link/show.erb +18 -41
- data/app/cells/decidim/meetings/public_participants_list/show.erb +4 -15
- data/app/commands/decidim/meetings/admin/copy_meeting.rb +1 -1
- data/app/commands/decidim/meetings/admin/create_meeting.rb +1 -1
- data/app/commands/decidim/meetings/admin/invite_user_to_join_meeting.rb +5 -5
- data/app/commands/decidim/meetings/admin/publish_meeting.rb +1 -1
- data/app/commands/decidim/meetings/admin/unpublish_meeting.rb +1 -1
- data/app/commands/decidim/meetings/create_meeting.rb +14 -3
- data/app/commands/decidim/meetings/decline_invitation.rb +1 -1
- data/app/commands/decidim/meetings/join_meeting.rb +5 -5
- data/app/commands/decidim/meetings/update_meeting.rb +13 -3
- data/app/controllers/concerns/decidim/meetings/component_filterable.rb +4 -4
- data/app/controllers/decidim/meetings/admin/agenda_controller.rb +6 -6
- data/app/controllers/decidim/meetings/admin/invites_controller.rb +3 -3
- data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +2 -4
- data/app/controllers/decidim/meetings/admin/meeting_copies_controller.rb +3 -3
- data/app/controllers/decidim/meetings/admin/meetings_controller.rb +7 -7
- data/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb +4 -4
- data/app/controllers/decidim/meetings/admin/registrations_controller.rb +6 -6
- data/app/controllers/decidim/meetings/application_controller.rb +11 -0
- data/app/controllers/decidim/meetings/calendars_controller.rb +0 -1
- data/app/controllers/decidim/meetings/directory/application_controller.rb +12 -0
- data/app/controllers/decidim/meetings/directory/meetings_controller.rb +5 -30
- data/app/controllers/decidim/meetings/live_events_controller.rb +1 -0
- data/app/controllers/decidim/meetings/meeting_closes_controller.rb +2 -3
- data/app/controllers/decidim/meetings/meetings_controller.rb +75 -7
- data/app/controllers/decidim/meetings/polls/answers_controller.rb +2 -2
- data/app/controllers/decidim/meetings/polls/questions_controller.rb +1 -1
- data/app/controllers/decidim/meetings/registrations_controller.rb +5 -5
- data/app/events/decidim/meetings/close_meeting_event.rb +1 -1
- data/app/events/decidim/meetings/meeting_event.rb +1 -1
- data/app/events/decidim/meetings/meeting_registration_notification_event.rb +3 -3
- data/app/events/decidim/meetings/meeting_registrations_enabled_event.rb +1 -1
- data/app/events/decidim/meetings/meeting_registrations_over_percentage_event.rb +1 -1
- data/app/events/decidim/meetings/registration_code_validated_event.rb +1 -1
- data/app/forms/decidim/meetings/admin/meeting_form.rb +5 -1
- data/app/forms/decidim/meetings/admin/meeting_registrations_form.rb +2 -2
- data/app/forms/decidim/meetings/admin/validate_registration_code_form.rb +1 -1
- data/app/forms/decidim/meetings/base_meeting_form.rb +1 -1
- data/app/forms/decidim/meetings/meeting_form.rb +3 -3
- data/app/helpers/decidim/meetings/admin/application_helper.rb +1 -0
- data/app/helpers/decidim/meetings/application_helper.rb +18 -25
- data/app/helpers/decidim/meetings/directory/application_helper.rb +11 -59
- data/app/helpers/decidim/meetings/map_helper.rb +2 -9
- data/app/helpers/decidim/meetings/meetings_helper.rb +6 -5
- data/app/jobs/decidim/meetings/hide_all_created_by_author_job.rb +13 -0
- data/app/mailers/decidim/meetings/admin/invite_join_meeting_mailer.rb +1 -1
- data/app/mailers/decidim/meetings/registration_mailer.rb +1 -1
- data/app/models/decidim/meetings/meeting.rb +11 -32
- data/app/models/decidim/meetings/question.rb +1 -1
- data/app/packs/entrypoints/decidim_meetings.js +3 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_attended_meetings.svg +42 -1
- data/app/packs/src/decidim/meetings/admin/agendas.js +3 -4
- data/app/packs/src/decidim/meetings/admin/registrations_form.js +12 -4
- data/app/packs/src/decidim/meetings/meetings_form.js +1 -1
- data/app/packs/src/decidim/meetings/poll.component.js +1 -28
- data/app/packs/stylesheets/decidim/meetings/_calendar.scss +47 -0
- data/app/packs/stylesheets/decidim/meetings/_item.scss +177 -0
- data/app/packs/stylesheets/decidim/meetings/_list.scss +58 -0
- data/app/packs/stylesheets/decidim/meetings/_live_event.scss +128 -0
- data/app/packs/stylesheets/decidim/meetings/meetings.scss +4 -0
- data/app/permissions/decidim/meetings/permissions.rb +15 -12
- data/app/presenters/decidim/meetings/admin_log/invite_presenter.rb +2 -2
- data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +6 -2
- data/app/presenters/decidim/meetings/admin_log/questionnaire_presenter.rb +2 -2
- data/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb +1 -1
- data/app/presenters/decidim/meetings/log/resource_presenter.rb +18 -0
- data/app/presenters/decidim/meetings/meeting_presenter.rb +8 -2
- data/app/services/decidim/meetings/calendar/component_calendar.rb +1 -1
- data/app/services/decidim/meetings/close_meeting_reminder_generator.rb +7 -13
- data/app/services/decidim/meetings/meeting_iframe_embedder.rb +1 -1
- data/app/views/decidim/meetings/_calendar_modal.html.erb +19 -21
- data/app/views/decidim/meetings/admin/agenda/_agenda_item.html.erb +12 -12
- data/app/views/decidim/meetings/admin/agenda/_agenda_item_child.html.erb +8 -8
- data/app/views/decidim/meetings/admin/agenda/_agenda_item_child_template.html.erb +1 -1
- data/app/views/decidim/meetings/admin/agenda/_agenda_item_fields.html.erb +3 -3
- data/app/views/decidim/meetings/admin/agenda/_form.html.erb +54 -50
- data/app/views/decidim/meetings/admin/agenda/edit.html.erb +18 -6
- data/app/views/decidim/meetings/admin/agenda/new.html.erb +17 -5
- data/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +11 -2
- data/app/views/decidim/meetings/admin/invites/_form.html.erb +38 -28
- data/app/views/decidim/meetings/admin/invites/index.html.erb +77 -81
- data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +26 -28
- data/app/views/decidim/meetings/admin/meeting_closes/edit.html.erb +17 -5
- data/app/views/decidim/meetings/admin/meeting_copies/new.html.erb +17 -6
- data/app/views/decidim/meetings/admin/meetings/_form.html.erb +76 -83
- data/app/views/decidim/meetings/admin/meetings/_service.html.erb +14 -10
- data/app/views/decidim/meetings/admin/meetings/_services.html.erb +9 -5
- data/app/views/decidim/meetings/admin/meetings/edit.html.erb +17 -7
- data/app/views/decidim/meetings/admin/meetings/index.html.erb +133 -129
- data/app/views/decidim/meetings/admin/meetings/new.html.erb +16 -6
- data/app/views/decidim/meetings/admin/poll/_answer_option.html.erb +1 -1
- data/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb +1 -1
- data/app/views/decidim/meetings/admin/poll/_form.html.erb +17 -32
- data/app/views/decidim/meetings/admin/poll/_question.html.erb +81 -75
- data/app/views/decidim/meetings/admin/poll/edit.html.erb +28 -8
- data/app/views/decidim/meetings/admin/registrations/_form.html.erb +32 -55
- data/app/views/decidim/meetings/admin/registrations/edit.html.erb +59 -26
- data/app/views/decidim/meetings/directory/meetings/index.html.erb +15 -20
- data/app/views/decidim/meetings/directory/meetings/index.js.erb +1 -23
- data/app/views/decidim/meetings/layouts/_aside_block.html.erb +8 -0
- data/app/views/decidim/meetings/layouts/live_event.html.erb +20 -19
- data/app/views/decidim/meetings/live_events/show.html.erb +4 -5
- data/app/views/decidim/meetings/meeting_closes/_form.html.erb +3 -10
- data/app/views/decidim/meetings/meeting_closes/edit.html.erb +17 -21
- data/app/views/decidim/meetings/meetings/_actions.html.erb +6 -0
- data/app/views/decidim/meetings/meetings/_add_to_calendar_modal.html.erb +17 -0
- data/app/views/decidim/meetings/meetings/_form.html.erb +26 -34
- data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +3 -22
- data/app/views/decidim/meetings/meetings/_meeting.html.erb +74 -0
- data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +28 -26
- data/app/views/decidim/meetings/meetings/_meeting_aside.html.erb +98 -0
- data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +23 -36
- data/app/views/decidim/meetings/meetings/edit.html.erb +17 -21
- data/app/views/decidim/meetings/meetings/index.html.erb +15 -33
- data/app/views/decidim/meetings/meetings/index.js.erb +1 -23
- data/app/views/decidim/meetings/meetings/new.html.erb +17 -21
- data/app/views/decidim/meetings/meetings/show.html.erb +8 -167
- data/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb +9 -13
- data/app/views/decidim/meetings/polls/answers/_single_option.html.erb +4 -4
- data/app/views/decidim/meetings/polls/answers/create.js.erb +1 -1
- data/app/views/decidim/meetings/polls/questions/_index.html.erb +1 -1
- data/app/views/decidim/meetings/polls/questions/_index_admin.html.erb +5 -5
- data/app/views/decidim/meetings/polls/questions/_published_question.html.erb +9 -11
- data/app/views/decidim/meetings/polls/questions/_question.html.erb +3 -3
- data/app/views/decidim/meetings/polls/questions/index_admin.js.erb +1 -1
- data/app/views/decidim/meetings/shared/_filters.html.erb +20 -0
- data/app/views/decidim/meetings/shared/_index.html.erb +24 -0
- data/app/views/decidim/meetings/shared/_index.js.erb +16 -0
- data/app/views/decidim/meetings/shared/_meetings.html.erb +33 -0
- data/app/views/decidim/meetings/shared/_meetings_aside.html.erb +18 -0
- data/app/views/decidim/meetings/versions/show.html.erb +14 -4
- data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +13 -15
- data/config/assets.rb +0 -2
- data/config/locales/ar.yml +6 -94
- data/config/locales/bg.yml +0 -673
- data/config/locales/ca.yml +52 -75
- data/config/locales/cs.yml +48 -71
- data/config/locales/de.yml +53 -76
- data/config/locales/el.yml +48 -51
- data/config/locales/en.yml +51 -74
- data/config/locales/es-MX.yml +50 -73
- data/config/locales/es-PY.yml +48 -71
- data/config/locales/es.yml +53 -76
- data/config/locales/eu.yml +53 -76
- data/config/locales/fi-plain.yml +46 -69
- data/config/locales/fi.yml +44 -67
- data/config/locales/fr-CA.yml +43 -69
- data/config/locales/fr.yml +48 -71
- data/config/locales/ga-IE.yml +2 -16
- data/config/locales/gl.yml +5 -63
- data/config/locales/hu.yml +6 -92
- data/config/locales/id-ID.yml +4 -60
- data/config/locales/is-IS.yml +1 -22
- data/config/locales/it.yml +6 -86
- data/config/locales/ja.yml +45 -74
- data/config/locales/lb.yml +6 -67
- data/config/locales/lt.yml +42 -65
- data/config/locales/lv.yml +4 -61
- data/config/locales/nl.yml +4 -92
- data/config/locales/no.yml +4 -80
- data/config/locales/pl.yml +2 -199
- data/config/locales/pt-BR.yml +4 -200
- data/config/locales/pt.yml +5 -85
- data/config/locales/ro-RO.yml +11 -81
- data/config/locales/ru.yml +5 -60
- data/config/locales/sk.yml +4 -61
- data/config/locales/sl.yml +0 -3
- data/config/locales/sr-CS.yml +0 -6
- data/config/locales/sv.yml +14 -94
- data/config/locales/tr-TR.yml +5 -78
- data/config/locales/uk.yml +5 -53
- data/config/locales/zh-CN.yml +3 -70
- data/config/locales/zh-TW.yml +24 -51
- data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +1 -1
- data/db/migrate/20230427105701_change_types_and_registration_types_on_meetings.rb +49 -0
- data/lib/decidim/meetings/admin_engine.rb +2 -2
- data/lib/decidim/meetings/component.rb +4 -216
- data/lib/decidim/meetings/content_blocks/registry_manager.rb +17 -0
- data/lib/decidim/meetings/directory_engine.rb +4 -6
- data/lib/decidim/meetings/engine.rb +62 -27
- data/lib/decidim/meetings/meeting_serializer.rb +3 -3
- data/lib/decidim/meetings/seeds.rb +188 -0
- data/lib/decidim/meetings/test/factories.rb +124 -54
- data/lib/decidim/meetings/test/notifications_handling.rb +3 -3
- data/lib/decidim/meetings/test/translated_event.rb +1 -1
- data/lib/decidim/meetings/version.rb +1 -1
- metadata +58 -58
- data/app/cells/decidim/meetings/content_blocks/highlighted_meetings/elements.erb +0 -16
- data/app/cells/decidim/meetings/content_blocks/highlighted_meetings/heading.erb +0 -1
- data/app/cells/decidim/meetings/content_blocks/upcoming_meetings/show.erb +0 -26
- data/app/cells/decidim/meetings/content_blocks/upcoming_meetings_cell.rb +0 -63
- data/app/cells/decidim/meetings/join_meeting_button/registration_confirm.erb +0 -31
- data/app/cells/decidim/meetings/meeting_highlighted_list_item/show.erb +0 -21
- data/app/cells/decidim/meetings/meeting_highlighted_list_item_cell.rb +0 -10
- data/app/cells/decidim/meetings/meeting_list_item/show.erb +0 -14
- data/app/cells/decidim/meetings/meeting_list_item_cell.rb +0 -44
- data/app/cells/decidim/meetings/meeting_m/address.erb +0 -5
- data/app/cells/decidim/meetings/meeting_m/data.erb +0 -2
- data/app/cells/decidim/meetings/meeting_m/date.erb +0 -8
- data/app/cells/decidim/meetings/meeting_m/footer.erb +0 -9
- data/app/cells/decidim/meetings/meeting_m/multiple_dates.erb +0 -17
- data/app/cells/decidim/meetings/meeting_m/single_date.erb +0 -9
- data/app/cells/decidim/meetings/meeting_m/tags.erb +0 -1
- data/app/cells/decidim/meetings/meeting_m_cell.rb +0 -121
- data/app/cells/decidim/meetings/meeting_s/show.erb +0 -27
- data/app/controllers/concerns/decidim/meetings/filterable.rb +0 -27
- data/app/controllers/decidim/meetings/widgets_controller.rb +0 -30
- data/app/packs/stylesheets/decidim/meetings/_header.scss +0 -52
- data/app/packs/stylesheets/decidim/meetings/_main.scss +0 -178
- data/app/packs/stylesheets/decidim/meetings/_meetings.scss +0 -2
- data/app/queries/decidim/meetings/admin/invites.rb +0 -60
- data/app/views/decidim/meetings/admin/meeting_closes/proposals_picker.html.erb +0 -1
- data/app/views/decidim/meetings/directory/meetings/_filters.html.erb +0 -34
- data/app/views/decidim/meetings/directory/meetings/_meetings.html.erb +0 -26
- data/app/views/decidim/meetings/meeting_closes/proposals_picker.html.erb +0 -1
- data/app/views/decidim/meetings/meetings/_calendar_modal.html.erb +0 -26
- data/app/views/decidim/meetings/meetings/_filters.html.erb +0 -40
- data/app/views/decidim/meetings/meetings/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/meetings/meetings/_meetings.html.erb +0 -48
- data/app/views/decidim/meetings/versions/index.html.erb +0 -8
- data/app/views/decidim/participatory_spaces/_upcoming_meeting_for_card.html.erb +0 -4
- data/config/locales/he-IL.yml +0 -1
- data/decidim-meetings.gemspec +0 -36
- data/lib/decidim/meetings/seeds/city.jpeg +0 -0
@@ -1,160 +1,164 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="card">
|
3
|
-
<div class="
|
4
|
-
<h2 class="
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h2 class="item_show__header-title">
|
5
5
|
<%= t(".title") %>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</div>
|
6
|
+
<%= export_dropdowns(query) %>
|
7
|
+
<%= link_to t("actions.new_meeting", scope: "decidim.meetings"), new_meeting_path, class: "button button__sm button__secondary" if allowed_to? :create, :meeting %>
|
8
|
+
<%= render partial: "decidim/admin/components/resource_action" %>
|
10
9
|
</h2>
|
11
10
|
</div>
|
12
11
|
|
13
12
|
<%= admin_filter_selector(:meetings) %>
|
14
|
-
<div class="
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<
|
18
|
-
<
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
13
|
+
<div class="table-scroll">
|
14
|
+
<table class="table-list">
|
15
|
+
<thead>
|
16
|
+
<tr>
|
17
|
+
<th>
|
18
|
+
<%= sort_link(query, :id, t("models.meeting.fields.id", scope: "decidim.meetings"), default_order: :desc ) %>
|
19
|
+
</th>
|
20
|
+
<th>
|
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? %>
|
31
36
|
<th>
|
32
|
-
<%= sort_link(query, :
|
37
|
+
<%= sort_link(query, :scope_name, t("models.proposal.fields.scope", scope: "decidim.proposals") ) %>
|
33
38
|
</th>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
<td>
|
49
|
-
<%= meeting.id %><br>
|
50
|
-
</td>
|
51
|
-
<td>
|
39
|
+
<% end %>
|
40
|
+
<th class="actions"><%= t("actions.title", scope: "decidim.meetings") %></th>
|
41
|
+
</tr>
|
42
|
+
</thead>
|
43
|
+
<tbody>
|
44
|
+
<% meetings.each do |meeting| %>
|
45
|
+
<tr data-id="<%= meeting.id %>">
|
46
|
+
<td>
|
47
|
+
<%= meeting.id %><br>
|
48
|
+
</td>
|
49
|
+
<td>
|
50
|
+
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
51
|
+
<%= link_to present(meeting).title(html_escape: true), edit_meeting_path(meeting) %>
|
52
|
+
<% else %>
|
52
53
|
<%= present(meeting).title(html_escape: true) %><br>
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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) %>
|
64
70
|
<td>
|
65
|
-
<%=
|
71
|
+
<%= static_map_link(meeting, {}, { class: "static-map__admin" }) unless meeting.online? %>
|
66
72
|
</td>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
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>
|
71
80
|
<% end %>
|
72
|
-
<%= td_resource_scope_for(meeting.scope) %>
|
73
|
-
<td class="table-list__actions">
|
74
|
-
<% if allowed_to? :update, :meeting, meeting: meeting %>
|
75
|
-
<% if meeting.published? %>
|
76
|
-
<%= icon_link_to "x", unpublish_meeting_path(meeting), t("actions.unpublish", scope: "decidim.admin"), method: :put, class: "action-icon--unpublish", data: { confirm: t("actions.unpublish", scope: "decidim.admin") } %>
|
77
|
-
<% else %>
|
78
|
-
<%= icon_link_to "check", publish_meeting_path(meeting), t("actions.publish", scope: "decidim.admin"), method: :put, class: "action-icon--publish" %>
|
79
|
-
<% end %>
|
80
|
-
<% else %>
|
81
|
-
<span class="action-space icon"></span>
|
82
|
-
<% end %>
|
83
81
|
|
84
|
-
|
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 %>
|
85
87
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
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 %>
|
91
93
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<% end %>
|
98
|
-
<% end %>
|
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
99
|
|
100
|
-
|
101
|
-
|
102
|
-
<%=
|
103
|
-
<%= icon_link_to "list", edit_meeting_poll_path(meeting), t("actions.manage_poll", scope: "decidim.meetings"), class: "action-icon--manage-poll-questionnaire" %>
|
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") %>
|
104
103
|
<% else %>
|
105
|
-
|
106
|
-
<span class="action-space icon"></span>
|
107
|
-
<span class="action-space icon"></span>
|
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" %>
|
108
105
|
<% end %>
|
106
|
+
<% end %>
|
109
107
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
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 %>
|
115
114
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
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 %>
|
121
120
|
|
122
|
-
|
123
|
-
|
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
124
|
<% else %>
|
125
|
-
|
125
|
+
<%= icon_link_to "check-line", publish_meeting_path(meeting), t("actions.publish", scope: "decidim.admin"), method: :put, class: "action-icon--publish" %>
|
126
126
|
<% end %>
|
127
|
+
<% else %>
|
128
|
+
<span class="action-space icon"></span>
|
129
|
+
<% end %>
|
127
130
|
|
128
|
-
|
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 } %>
|
129
132
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
content_tag(:button,
|
136
|
-
class: ["action-icon", "action-icon--remove", "destroy-meeting-alert"],
|
137
|
-
"data-invalid-destroy-message" => t("actions.invalid_destroy.proposals_count", count: present(meeting).authored_proposals.size, scope: "decidim.meetings"),
|
138
|
-
"data-proposal-titles" => present(meeting).formatted_proposals_titles) do
|
139
|
-
content_tag(:span,
|
140
|
-
data: { tooltip: true, disable_hover: false, click_open: false },
|
141
|
-
title: t("actions.destroy", scope: "decidim.meetings")) do
|
142
|
-
icon("circle-x")
|
143
|
-
end
|
144
|
-
end
|
145
|
-
%>
|
146
|
-
<% end %>
|
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") } %>
|
147
138
|
<% else %>
|
148
|
-
|
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
|
+
%>
|
149
151
|
<% end %>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
152
|
+
<% else %>
|
153
|
+
<span class="action-space icon"></span>
|
154
|
+
<% end %>
|
155
|
+
</td>
|
156
|
+
</tr>
|
157
|
+
<% end %>
|
158
|
+
</tbody>
|
159
|
+
</table>
|
157
160
|
</div>
|
158
161
|
</div>
|
159
162
|
|
160
|
-
<%=
|
163
|
+
<%= decidim_paginate meetings %>
|
164
|
+
<%= append_javascript_pack_tag "decidim_meetings_admin" %>
|
@@ -1,8 +1,18 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
<div class="item_show__header">
|
3
|
+
<h2 class="item_show__header-title">
|
4
|
+
<%= t(".title") %>
|
5
|
+
</h2>
|
6
|
+
</div>
|
7
|
+
<div class="item__edit item__edit-1col">
|
8
|
+
<div class="item__edit-form">
|
9
|
+
<%= decidim_form_for(@form, html: { class: "form-defaults form meetings_form new_meeting" }) do |f| %>
|
10
|
+
<%= render partial: "form", object: f %>
|
11
|
+
<div class="item__edit-sticky">
|
12
|
+
<div class="item__edit-sticky-container">
|
13
|
+
<%= f.submit t(".create"), class: "button button__sm button__secondary" %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
7
17
|
</div>
|
8
|
-
|
18
|
+
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<h2 class="card-title">
|
6
6
|
<span><%= t("answer_option", scope: "decidim.forms.admin.questionnaires.answer_option") %></span>
|
7
7
|
<% if editable %>
|
8
|
-
<button class="button small alert hollow remove-answer-option button--title">
|
8
|
+
<button class="button button__sm button__secondary small alert hollow remove-answer-option button--title">
|
9
9
|
<%= t("remove", scope: "decidim.forms.admin.questionnaires.answer_option") %>
|
10
10
|
</button>
|
11
11
|
<% end %>
|
@@ -2,6 +2,6 @@
|
|
2
2
|
|
3
3
|
<script type="text/template" class="decidim-answer-option-template decidim-template" id="<%= template_id %>">
|
4
4
|
<%= fields_for "questionnaire[questions][#{question.to_param}][answer_options][]", blank_answer_option do |answer_option_form| %>
|
5
|
-
<%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question
|
5
|
+
<%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question:, editable: %>
|
6
6
|
<% end %>
|
7
7
|
</script>
|
@@ -1,63 +1,48 @@
|
|
1
|
-
<div class="card">
|
2
|
-
<div class="card-divider">
|
3
|
-
<h2 class="card-title">
|
4
|
-
<%= edit_questionnaire_title %>
|
5
|
-
<% if questionnaire.answers.any? %>
|
6
|
-
<div class="button--title">
|
7
|
-
<%= export_dropdown(current_component, questionnaire.id) if allowed_to?(:export_answers, :questionnaire) %>
|
8
|
-
</div>
|
9
|
-
<% else %>
|
10
|
-
<button class="button tiny button--title" disabled><%= t("empty", scope: "decidim.forms.admin.questionnaires.answers") %></button>
|
11
|
-
<% end %>
|
12
|
-
</h2>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
|
16
1
|
<div class="questionnaire-questions">
|
17
2
|
<div class="row column text-center">
|
18
|
-
<button type="button" class="button collapse-all"><%= t("collapse", scope: "decidim.forms.admin.questionnaires.form") %></button>
|
19
|
-
<button type="button" class="button expand-all"><%= t("expand", scope: "decidim.forms.admin.questionnaires.form") %></button>
|
3
|
+
<button type="button" class="button button__sm button__secondary collapse-all"><%= t("collapse", scope: "decidim.forms.admin.questionnaires.form") %></button>
|
4
|
+
<button type="button" class="button button__sm button__secondary expand-all"><%= t("expand", scope: "decidim.forms.admin.questionnaires.form") %></button>
|
20
5
|
</div>
|
21
6
|
|
22
7
|
<% if questionnaire.questions_editable? %>
|
23
8
|
<%= fields_for "questionnaire[questions][#{blank_question.to_param}]", blank_question do |question_form| %>
|
24
9
|
<script type="text/template" class="decidim-question-template decidim-template" id="question-template">
|
25
10
|
<%= render "decidim/meetings/admin/poll/question",
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
11
|
+
form: question_form,
|
12
|
+
id: tabs_id_for_question(blank_question),
|
13
|
+
editable: questionnaire.questions_editable?,
|
14
|
+
answer_option_template_selector: "#answer-option-template-dummy" %>
|
30
15
|
</script>
|
31
16
|
<%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-dummy" %>
|
32
17
|
<% end %>
|
33
18
|
<% else %>
|
34
|
-
|
35
|
-
<%= t("already_answered_warning", scope: "decidim.forms.admin.questionnaires.form") %>
|
36
|
-
</div>
|
19
|
+
<%= cell("decidim/announcement", t("already_answered_warning", scope: "decidim.forms.admin.questionnaires.form"), callout_class: "warning" ) %>
|
37
20
|
<% end %>
|
38
21
|
|
39
|
-
<div class="questionnaire-questions-list">
|
22
|
+
<div class="questionnaire-questions-list flex flex-col py-6 gap-6 last:pb-0">
|
40
23
|
<% @form.questions.each_with_index do |question, index| %>
|
41
24
|
<%= fields_for "questionnaire[questions][]", question do |question_form| %>
|
42
25
|
<%= render "decidim/meetings/admin/poll/question",
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
26
|
+
form: question_form,
|
27
|
+
id: tabs_id_for_question(question),
|
28
|
+
editable: questionnaire.questions_editable?,
|
29
|
+
answer_option_template_selector: "#answer-option-template-#{index}" %>
|
47
30
|
<%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-#{index}" %>
|
48
31
|
<% end %>
|
49
32
|
<% end %>
|
50
33
|
</div>
|
51
34
|
|
52
35
|
<% if questionnaire.questions_editable? %>
|
53
|
-
<button class="button add-question"><%= t("add_question", scope: "decidim.forms.admin.questionnaires.form") %></button>
|
36
|
+
<button class="button button__sm button__secondary add-question"><%= t("add_question", scope: "decidim.forms.admin.questionnaires.form") %></button>
|
54
37
|
<% end %>
|
55
38
|
</div>
|
56
39
|
|
57
|
-
<%=
|
40
|
+
<%= append_javascript_pack_tag "decidim_forms_admin" %>
|
58
41
|
|
59
42
|
<% if questionnaire.questions_editable? %>
|
60
43
|
<script>
|
61
|
-
|
44
|
+
document.addEventListener("DOMContentLoaded", function () {
|
45
|
+
window.Decidim.createEditableForm()
|
46
|
+
})
|
62
47
|
</script>
|
63
48
|
<% end %>
|
@@ -1,96 +1,102 @@
|
|
1
1
|
<% question = form.object %>
|
2
2
|
<% is_expanded = question.errors.any? %>
|
3
|
-
|
4
3
|
<div class="card questionnaire-question" id="<%= id %>-field">
|
5
|
-
<div class="
|
6
|
-
<
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<button type="button" class="button small secondary button--title question--collapse" data-toggle="<%= id %>-question-card button--collapse-question-<%= id %> button--expand-question-<%= id %>">
|
15
|
-
<span id="button--collapse-question-<%= id %>" data-toggler=".hide" class="icon-collapse <%= "hide" unless is_expanded %>">
|
16
|
-
<%== icon("caret-top", aria_label: t("collapse", scope: "decidim.forms.admin.questionnaires.question"), role: "img") %>
|
4
|
+
<div class="form__wrapper" data-component="accordion">
|
5
|
+
<div class="card-divider question-divider">
|
6
|
+
<h2 class="card-title">
|
7
|
+
<span>
|
8
|
+
<% if editable %>
|
9
|
+
<%== icon("drag-move-2-fill") %>
|
10
|
+
<% end %>
|
11
|
+
<%= dynamic_title(translated_attribute(question.body), class: "question-title-statement", max_length: 50, omission: "...", placeholder: t("question", scope: "decidim.forms.admin.questionnaires.question")) %>
|
17
12
|
</span>
|
18
13
|
|
19
|
-
<span
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
<span class="ml-auto flex flex-row-reverse items-center gap-2">
|
15
|
+
<button id="<%= id %>-button" type="button" class="question--collapse <%= "question-error" if is_expanded %>" data-controls="panel-<%= id %>-question-card">
|
16
|
+
<span class="icon-collapse">
|
17
|
+
<%== icon "arrow-up-s-line", aria_label: t("collapse", scope: "decidim.forms.admin.questionnaires.question"), role: "img" %>
|
18
|
+
</span>
|
23
19
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
20
|
+
<span class="icon-expand">
|
21
|
+
<%== icon "arrow-down-s-line", aria_label: t("expand", scope: "decidim.forms.admin.questionnaires.question"), role: "img" %>
|
22
|
+
</span>
|
23
|
+
</button>
|
28
24
|
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
<% if editable %>
|
26
|
+
<button class="button button__sm button__transparent-secondary small alert hollow move-up-question button--title">
|
27
|
+
<%= icon "arrow-up-line" %>
|
28
|
+
<span><%= t("up", scope: "decidim.forms.admin.questionnaires.question") %></span>
|
29
|
+
</button>
|
32
30
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
</h2>
|
38
|
-
</div>
|
31
|
+
<button class="button button__sm button__transparent-secondary small alert hollow move-down-question button--title">
|
32
|
+
<%= icon "arrow-down-line" %>
|
33
|
+
<span><%= t("down", scope: "decidim.forms.admin.questionnaires.question") %></span>
|
34
|
+
</button>
|
39
35
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
tabs_id: id,
|
47
|
-
label: t("statement", scope: "decidim.forms.admin.questionnaires.question"),
|
48
|
-
disabled: !editable
|
49
|
-
)
|
50
|
-
%>
|
36
|
+
<button class="button button__sm button__transparent-secondary small alert hollow remove-question button--title">
|
37
|
+
<%= t("remove", scope: "decidim.forms.admin.questionnaires.question") %>
|
38
|
+
</button>
|
39
|
+
<% end %>
|
40
|
+
</span>
|
41
|
+
</h2>
|
51
42
|
</div>
|
52
43
|
|
53
|
-
<div class="
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
44
|
+
<div id="panel-<%= id %>-question-card" class="panel-question-card card-section collapsible <%= "panel-error" if is_expanded %>">
|
45
|
+
<div class="row column">
|
46
|
+
<%=
|
47
|
+
form.translated(
|
48
|
+
:text_field,
|
49
|
+
:body,
|
50
|
+
tabs_id: id,
|
51
|
+
label: t("statement", scope: "decidim.forms.admin.questionnaires.question"),
|
52
|
+
disabled: !editable
|
53
|
+
)
|
54
|
+
%>
|
55
|
+
</div>
|
63
56
|
|
64
|
-
|
65
|
-
|
66
|
-
|
57
|
+
<div class="row column">
|
58
|
+
<%=
|
59
|
+
form.select(
|
60
|
+
:question_type,
|
61
|
+
options_from_collection_for_select(question_types, :first, :last, question.question_type),
|
62
|
+
{},
|
63
|
+
disabled: !editable
|
64
|
+
)
|
65
|
+
%>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<% if question.persisted? %>
|
69
|
+
<%= form.hidden_field :id, disabled: !editable %>
|
70
|
+
<% end %>
|
67
71
|
|
68
|
-
|
69
|
-
|
72
|
+
<%= form.hidden_field :position, value: question.position || 0, disabled: !editable %>
|
73
|
+
<%= form.hidden_field :deleted, disabled: !editable %>
|
70
74
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
75
|
+
<div class="questionnaire-question-answer-options" data-template="<%= answer_option_template_selector %>">
|
76
|
+
<div class="questionnaire-question-answer-options-list">
|
77
|
+
<% question.answer_options.each do |answer_option| %>
|
78
|
+
<%= fields_for "questionnaire[questions][#{question.to_param}][answer_options][]", answer_option do |answer_option_form| %>
|
79
|
+
<%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question:, editable: %>
|
80
|
+
<% end %>
|
76
81
|
<% end %>
|
82
|
+
</div>
|
83
|
+
<% if editable %>
|
84
|
+
<div class="row column">
|
85
|
+
<button type="button" class="button button__sm button__secondary add-answer-option"><%= t("add_answer_option", scope: "decidim.forms.admin.questionnaires.question") %></button>
|
86
|
+
</div>
|
77
87
|
<% end %>
|
78
88
|
</div>
|
79
89
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
{ include_blank: t("any", scope: "decidim.forms.admin.questionnaires.question") },
|
91
|
-
disabled: !editable
|
92
|
-
)
|
93
|
-
%>
|
90
|
+
<div class="row column questionnaire-question-max-choices">
|
91
|
+
<%=
|
92
|
+
form.select(
|
93
|
+
:max_choices,
|
94
|
+
(2..question.number_of_options),
|
95
|
+
{ include_blank: t("any", scope: "decidim.forms.admin.questionnaires.question") },
|
96
|
+
disabled: !editable
|
97
|
+
)
|
98
|
+
%>
|
99
|
+
</div>
|
94
100
|
</div>
|
95
101
|
</div>
|
96
102
|
</div>
|