decidim-meetings 0.24.1 → 0.25.0.rc2
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/join_meeting_button/registration_confirm.erb +6 -0
- data/app/cells/decidim/meetings/join_meeting_button/show.erb +8 -6
- data/app/cells/decidim/meetings/meeting_m_cell.rb +4 -0
- data/app/cells/decidim/meetings/meeting_url/show.erb +7 -2
- data/app/cells/decidim/meetings/meeting_url_cell.rb +14 -2
- data/app/cells/decidim/meetings/meetings_map/show.erb +1 -1
- data/app/cells/decidim/meetings/meetings_map_cell.rb +1 -1
- data/app/cells/decidim/meetings/online_meeting_cell.rb +36 -0
- data/app/cells/decidim/meetings/online_meeting_link/show.erb +44 -0
- data/app/cells/decidim/meetings/online_meeting_link_cell.rb +27 -0
- data/app/cells/decidim/meetings/public_participants_list/show.erb +16 -0
- data/app/cells/decidim/meetings/public_participants_list_cell.rb +31 -0
- data/app/cells/decidim/meetings/question_responses/show.erb +7 -0
- data/app/cells/decidim/meetings/question_responses_cell.rb +72 -0
- data/app/commands/decidim/meetings/admin/close_meeting.rb +3 -0
- data/app/commands/decidim/meetings/admin/copy_meeting.rb +0 -9
- data/app/commands/decidim/meetings/admin/create_meeting.rb +4 -20
- data/app/commands/decidim/meetings/admin/destroy_meeting.rb +2 -0
- data/app/commands/decidim/meetings/admin/publish_meeting.rb +72 -0
- data/app/commands/decidim/meetings/admin/unpublish_meeting.rb +45 -0
- data/app/commands/decidim/meetings/admin/update_meeting.rb +6 -3
- data/app/commands/decidim/meetings/admin/update_question_status.rb +57 -0
- data/app/commands/decidim/meetings/admin/update_questionnaire.rb +93 -0
- data/app/commands/decidim/meetings/close_meeting.rb +2 -0
- data/app/commands/decidim/meetings/create_answer.rb +52 -0
- data/app/commands/decidim/meetings/create_meeting.rb +3 -1
- data/app/commands/decidim/meetings/join_meeting.rb +2 -1
- data/app/commands/decidim/meetings/update_meeting.rb +2 -1
- data/app/controllers/concerns/decidim/meetings/admin/filterable.rb +55 -0
- data/app/controllers/concerns/decidim/meetings/polls_resources.rb +29 -0
- data/app/controllers/decidim/meetings/admin/application_controller.rb +6 -2
- data/app/controllers/decidim/meetings/admin/invites_controller.rb +0 -2
- data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +1 -1
- data/app/controllers/decidim/meetings/admin/meetings_controller.rb +46 -1
- data/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb +107 -0
- data/app/controllers/decidim/meetings/calendars_controller.rb +8 -0
- data/app/controllers/decidim/meetings/live_events_controller.rb +29 -0
- data/app/controllers/decidim/meetings/meeting_closes_controller.rb +1 -1
- data/app/controllers/decidim/meetings/polls/answers_controller.rb +37 -0
- data/app/controllers/decidim/meetings/polls/questions_controller.rb +45 -0
- data/app/events/decidim/meetings/create_meeting_event.rb +16 -0
- data/app/forms/decidim/meetings/admin/answer_option_form.rb +24 -0
- data/app/forms/decidim/meetings/admin/close_meeting_form.rb +3 -1
- data/app/forms/decidim/meetings/admin/meeting_form.rb +12 -1
- data/app/forms/decidim/meetings/admin/question_form.rb +44 -0
- data/app/forms/decidim/meetings/admin/questionnaire_form.rb +19 -0
- data/app/forms/decidim/meetings/answer_choice_form.rb +14 -0
- data/app/forms/decidim/meetings/answer_form.rb +65 -0
- data/app/forms/decidim/meetings/close_meeting_form.rb +4 -0
- data/app/forms/decidim/meetings/join_meeting_form.rb +1 -0
- data/app/forms/decidim/meetings/meeting_form.rb +9 -0
- data/app/helpers/decidim/meetings/admin/filterable_helper.rb +13 -0
- data/app/helpers/decidim/meetings/application_helper.rb +3 -2
- data/app/helpers/decidim/meetings/map_helper.rb +1 -1
- data/app/helpers/decidim/meetings/meetings_helper.rb +21 -0
- data/app/models/decidim/meetings/answer.rb +48 -0
- data/app/models/decidim/meetings/answer_choice.rb +15 -0
- data/app/models/decidim/meetings/answer_option.rb +24 -0
- data/app/models/decidim/meetings/meeting.rb +88 -42
- data/app/models/decidim/meetings/poll.rb +19 -0
- data/app/models/decidim/meetings/question.rb +54 -0
- data/app/models/decidim/meetings/questionnaire.rb +23 -0
- data/app/models/decidim/meetings/registration.rb +2 -0
- data/app/packs/entrypoints/decidim_meetings.js +6 -0
- data/app/packs/entrypoints/decidim_meetings_admin.js +5 -0
- data/app/{assets/images/decidim/gamification/badges/attended_meetings.svg → packs/images/decidim/gamification/badges/decidim_gamification_badges_attended_meetings.svg} +0 -0
- data/app/{assets/images/decidim/meetings/icon.svg → packs/images/decidim/meetings/decidim_meetings.svg} +0 -0
- data/app/packs/src/decidim/meetings/admin/agendas.js +159 -0
- data/app/{assets/javascripts/decidim/meetings/admin/destroy_meeting_alert.js.es6 → packs/src/decidim/meetings/admin/destroy_meeting_alert.js} +0 -0
- data/app/{assets/javascripts/decidim/meetings/admin/meetings_form.js.es6 → packs/src/decidim/meetings/admin/meetings_form.js} +7 -4
- data/app/{assets/javascripts/decidim/meetings/admin/registrations_form.js.es6 → packs/src/decidim/meetings/admin/registrations_form.js} +0 -0
- data/app/{assets/javascripts/decidim/meetings/admin/registrations_invite_form.es6 → packs/src/decidim/meetings/admin/registrations_invite_form.js} +3 -3
- data/app/packs/src/decidim/meetings/meetings_form.js +54 -0
- data/app/packs/src/decidim/meetings/meetings_polls.js +41 -0
- data/app/packs/src/decidim/meetings/poll.component.js +166 -0
- data/app/packs/stylesheets/decidim/meetings/_header.scss +52 -0
- data/app/packs/stylesheets/decidim/meetings/_main.scss +178 -0
- data/app/packs/stylesheets/decidim/meetings/_meetings.scss +2 -0
- data/app/permissions/decidim/meetings/admin/permissions.rb +16 -8
- data/app/permissions/decidim/meetings/permissions.rb +42 -17
- data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +5 -1
- data/app/presenters/decidim/meetings/meeting_presenter.rb +25 -25
- data/app/queries/decidim/meetings/filtered_meetings.rb +1 -1
- data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +1 -1
- data/app/queries/decidim/meetings/questionnaire_user_answers.rb +29 -0
- data/app/serializers/decidim/meetings/data_portability_invite_serializer.rb +2 -1
- data/app/serializers/decidim/meetings/data_portability_registration_serializer.rb +2 -1
- data/app/serializers/decidim/meetings/registration_serializer.rb +3 -12
- data/app/services/decidim/meetings/calendar/component_calendar.rb +2 -2
- data/app/services/decidim/meetings/calendar/meeting_calendar.rb +33 -0
- data/app/services/decidim/meetings/calendar_renderer.rb +2 -0
- data/app/services/decidim/meetings/meeting_iframe_embedder.rb +86 -0
- data/app/services/decidim/meetings/meeting_search.rb +2 -2
- data/app/views/decidim/meetings/admin/agenda/_form.html.erb +1 -1
- data/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +4 -4
- data/app/views/decidim/meetings/admin/invites/_form.html.erb +1 -1
- data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +16 -1
- data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +1 -1
- data/app/views/decidim/meetings/admin/meetings/_form.html.erb +16 -1
- data/app/views/decidim/meetings/admin/meetings/index.html.erb +39 -11
- data/app/views/decidim/meetings/admin/poll/_answer_option.html.erb +34 -0
- data/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb +7 -0
- data/app/views/decidim/meetings/admin/poll/_form.html.erb +63 -0
- data/app/views/decidim/meetings/admin/poll/_question.html.erb +96 -0
- data/app/views/decidim/meetings/admin/poll/edit.html.erb +9 -0
- data/app/views/decidim/meetings/admin/registrations/_form.html.erb +1 -1
- data/app/views/decidim/meetings/directory/meetings/index.html.erb +4 -4
- data/app/views/decidim/meetings/directory/meetings/index.js.erb +2 -0
- data/app/views/decidim/meetings/layouts/live_event.html.erb +50 -0
- data/app/views/decidim/meetings/live_events/show.html.erb +12 -0
- data/app/views/decidim/meetings/meeting_closes/_form.html.erb +8 -1
- data/app/views/decidim/meetings/meeting_closes/edit.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_calendar_modal.html.erb +26 -0
- data/app/views/decidim/meetings/meetings/_filters.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_form.html.erb +6 -1
- data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +7 -18
- data/app/views/decidim/meetings/meetings/edit.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/index.html.erb +4 -4
- data/app/views/decidim/meetings/meetings/index.js.erb +1 -1
- data/app/views/decidim/meetings/meetings/new.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/show.html.erb +13 -14
- data/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb +13 -0
- data/app/views/decidim/meetings/polls/answers/_single_option.html.erb +19 -0
- data/app/views/decidim/meetings/polls/answers/create.js.erb +5 -0
- data/app/views/decidim/meetings/polls/questions/_closed_question.html.erb +7 -0
- data/app/views/decidim/meetings/polls/questions/_index.html.erb +5 -0
- data/app/views/decidim/meetings/polls/questions/_index_admin.html.erb +43 -0
- data/app/views/decidim/meetings/polls/questions/_published_question.html.erb +29 -0
- data/app/views/decidim/meetings/polls/questions/_question.html.erb +7 -0
- data/app/views/decidim/meetings/polls/questions/index.js.erb +5 -0
- data/app/views/decidim/meetings/polls/questions/index_admin.js.erb +5 -0
- data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +5 -2
- data/app/views/devise/mailer/join_meeting.html.erb +6 -6
- data/config/assets.rb +11 -0
- data/config/locales/ar.yml +3 -24
- data/config/locales/ca.yml +36 -27
- data/config/locales/cs.yml +74 -28
- data/config/locales/de.yml +22 -27
- data/config/locales/el.yml +3 -24
- data/config/locales/en.yml +112 -26
- data/config/locales/es-MX.yml +13 -27
- data/config/locales/es-PY.yml +13 -27
- data/config/locales/es.yml +13 -27
- data/config/locales/eu.yml +3 -24
- data/config/locales/fi-plain.yml +70 -26
- data/config/locales/fi.yml +72 -28
- data/config/locales/fr-CA.yml +19 -26
- data/config/locales/fr-LU.yml +534 -0
- data/config/locales/fr.yml +19 -26
- data/config/locales/gl.yml +46 -24
- data/config/locales/hu.yml +5 -24
- data/config/locales/id-ID.yml +3 -24
- data/config/locales/is-IS.yml +2 -22
- data/config/locales/it.yml +117 -23
- data/config/locales/ja.yml +148 -58
- data/config/locales/lb-LU.yml +1 -0
- data/config/locales/lv.yml +3 -24
- data/config/locales/nl.yml +70 -25
- data/config/locales/no.yml +5 -26
- data/config/locales/pl.yml +27 -38
- data/config/locales/pt-BR.yml +178 -23
- data/config/locales/pt.yml +3 -24
- data/config/locales/ro-RO.yml +38 -27
- data/config/locales/ru.yml +3 -24
- data/config/locales/sk.yml +3 -24
- data/config/locales/sv.yml +36 -27
- data/config/locales/tr-TR.yml +5 -27
- data/config/locales/uk.yml +3 -24
- data/config/locales/zh-CN.yml +3 -24
- data/db/migrate/20210217124802_add_registration_custom_content_to_meetings.rb +8 -0
- data/db/migrate/20210413050756_add_published_at_to_meetings.rb +7 -0
- data/db/migrate/20210413050917_update_published_at_to_existing_meetings.rb +20 -0
- data/db/migrate/20210430123416_add_public_participation_to_decidim_meetings_registrations.rb +7 -0
- data/db/migrate/20210506180226_merge_meetings_minutes_into_meetings_table.rb +48 -0
- data/db/migrate/20210512055802_create_decidim_meetings_polls.rb +10 -0
- data/db/migrate/20210512100333_drop_decidim_meetings_minutes_table.rb +77 -0
- data/db/migrate/20210518133236_merge_minutes_with_closing_report_in_meetings_table.rb +57 -0
- data/db/migrate/20210520084247_create_decidim_meetings_questionnaires.rb +11 -0
- data/db/migrate/20210520084253_create_decidim_meetings_questions.rb +15 -0
- data/db/migrate/20210520084321_create_decidim_meetings_answers.rb +13 -0
- data/db/migrate/20210520084330_create_decidim_meetings_answer_options.rb +10 -0
- data/db/migrate/20210520084337_create_decidim_meetings_answer_choices.rb +13 -0
- data/db/migrate/20210520134834_add_status_to_meetings_questions.rb +7 -0
- data/db/migrate/20210602040614_add_setting_embed_iframe_to_meetings.rb +7 -0
- data/lib/decidim/api/linked_resources_interface.rb +8 -1
- data/lib/decidim/api/meeting_type.rb +19 -4
- data/lib/decidim/api/meetings_type.rb +2 -2
- data/lib/decidim/meetings/admin_engine.rb +5 -1
- data/lib/decidim/meetings/api.rb +0 -1
- data/lib/decidim/meetings/component.rb +41 -6
- data/lib/decidim/meetings/data_portability_user_answers_serializer.rb +33 -0
- data/lib/decidim/meetings/engine.rb +10 -11
- data/lib/decidim/meetings/meeting_serializer.rb +1 -0
- data/lib/decidim/meetings/polls.rb +10 -0
- data/lib/decidim/meetings/test/factories.rb +85 -9
- data/lib/decidim/meetings/user_answers_serializer.rb +47 -0
- data/lib/decidim/meetings/version.rb +1 -1
- data/lib/decidim/meetings.rb +10 -0
- metadata +103 -113
- data/app/assets/config/decidim_meetings_manifest.js +0 -9
- data/app/assets/javascripts/decidim/meetings/admin/agendas.js.es6 +0 -158
- data/app/assets/javascripts/decidim/meetings/meetings_form.js.es6 +0 -54
- data/app/commands/decidim/meetings/admin/create_minutes.rb +0 -55
- data/app/commands/decidim/meetings/admin/update_minutes.rb +0 -63
- data/app/controllers/decidim/meetings/admin/minutes_controller.rb +0 -69
- data/app/forms/decidim/meetings/admin/minutes_form.rb +0 -20
- data/app/models/decidim/meetings/minutes.rb +0 -22
- data/app/presenters/decidim/meetings/admin_log/minutes_presenter.rb +0 -42
- data/app/views/decidim/meetings/admin/minutes/_form.html.erb +0 -23
- data/app/views/decidim/meetings/admin/minutes/edit.html.erb +0 -7
- data/app/views/decidim/meetings/admin/minutes/new.html.erb +0 -7
- data/app/views/decidim/meetings/meetings/_online_meeting_link.html.erb +0 -11
- data/config/locales/ja-JP.yml +0 -494
- data/lib/decidim/api/minutes_type.rb +0 -20
@@ -1,9 +0,0 @@
|
|
1
|
-
//= link decidim/meetings/meetings_form.js
|
2
|
-
//= link decidim/meetings/admin/meetings_form.js
|
3
|
-
//= link decidim/meetings/admin/registrations_form.js
|
4
|
-
//= link decidim/meetings/admin/registrations_invite_form.js
|
5
|
-
//= link decidim/meetings/admin/meetings_form.js
|
6
|
-
//= link decidim/meetings/meetings_form.js
|
7
|
-
//= link decidim/meetings/admin/agendas.js
|
8
|
-
//= link decidim/meetings/admin/destroy_meeting_alert.js
|
9
|
-
//= link_tree ../images/decidim
|
@@ -1,158 +0,0 @@
|
|
1
|
-
((exports) => {
|
2
|
-
const { AutoLabelByPositionComponent, AutoButtonsByPositionComponent, createDynamicFields, createSortList } = exports.DecidimAdmin;
|
3
|
-
const { createQuillEditor } = exports.Decidim;
|
4
|
-
|
5
|
-
const wrapperSelector = ".meeting-agenda-items";
|
6
|
-
const fieldSelector = ".meeting-agenda-item";
|
7
|
-
const childsWrapperSelector = ".meeting-agenda-item-childs";
|
8
|
-
const childFieldSelector = ".meeting-agenda-item-child";
|
9
|
-
|
10
|
-
const autoLabelByPosition = new AutoLabelByPositionComponent({
|
11
|
-
listSelector: ".meeting-agenda-item:not(.hidden)",
|
12
|
-
labelSelector: ".card-title span:first",
|
13
|
-
onPositionComputed: (el, idx) => {
|
14
|
-
$(el).find("input[name$=\\[position\\]]").val(idx);
|
15
|
-
}
|
16
|
-
});
|
17
|
-
|
18
|
-
const autoButtonsByPosition = new AutoButtonsByPositionComponent({
|
19
|
-
listSelector: ".meeting-agenda-item:not(.hidden)",
|
20
|
-
hideOnFirstSelector: ".move-up-agenda-item",
|
21
|
-
hideOnLastSelector: ".move-down-agenda-item"
|
22
|
-
});
|
23
|
-
|
24
|
-
const createSortableList = () => {
|
25
|
-
createSortList(".meeting-agenda-items-list:not(.published)", {
|
26
|
-
handle: ".agenda-item-divider",
|
27
|
-
placeholder: '<div style="border-style: dashed; border-color: #000"></div>',
|
28
|
-
forcePlaceholderSize: true,
|
29
|
-
onSortUpdate: () => { autoLabelByPosition.run() }
|
30
|
-
});
|
31
|
-
};
|
32
|
-
|
33
|
-
const createSortableListChild = () => {
|
34
|
-
createSortList(".meeting-agenda-item-childs-list:not(.published)", {
|
35
|
-
handle: ".agenda-item-child-divider",
|
36
|
-
placeholder: '<div style="border-style: dashed; border-color: #000"></div>',
|
37
|
-
forcePlaceholderSize: true,
|
38
|
-
onSortUpdate: () => { autoLabelByPosition.run() }
|
39
|
-
});
|
40
|
-
};
|
41
|
-
|
42
|
-
const autoLabelByPositionChild = new AutoLabelByPositionComponent({
|
43
|
-
listSelector: ".meeting-agenda-item-child:not(.hidden)",
|
44
|
-
labelSelector: ".card-title span:first",
|
45
|
-
onPositionComputed: (el, idx) => {
|
46
|
-
$(el).find("input[name$=\\[position\\]]").val(idx);
|
47
|
-
}
|
48
|
-
});
|
49
|
-
|
50
|
-
const autoButtonsByPositionChild = new AutoButtonsByPositionComponent({
|
51
|
-
listSelector: ".meeting-agenda-item-child:not(.hidden)",
|
52
|
-
hideOnFirstSelector: ".move-up-agenda-item-child",
|
53
|
-
hideOnLastSelector: ".move-down-agenda-item-child"
|
54
|
-
});
|
55
|
-
|
56
|
-
const createDynamicFieldsForAgendaItemChilds = (fieldId) => {
|
57
|
-
return createDynamicFields({
|
58
|
-
placeholderId: "meeting-agenda-item-child-id",
|
59
|
-
wrapperSelector: `#${fieldId} ${childsWrapperSelector}`,
|
60
|
-
containerSelector: ".meeting-agenda-item-childs-list",
|
61
|
-
fieldSelector: childFieldSelector,
|
62
|
-
addFieldButtonSelector: ".add-agenda-item-child",
|
63
|
-
removeFieldButtonSelector: ".remove-agenda-item-child",
|
64
|
-
moveUpFieldButtonSelector: ".move-up-agenda-item-child",
|
65
|
-
moveDownFieldButtonSelector: ".move-down-agenda-item-child",
|
66
|
-
|
67
|
-
onAddField: ($field) => {
|
68
|
-
createSortableListChild();
|
69
|
-
|
70
|
-
$field.find(".editor-container").each((idx, el) => {
|
71
|
-
createQuillEditor(el);
|
72
|
-
});
|
73
|
-
|
74
|
-
autoLabelByPositionChild.run();
|
75
|
-
autoButtonsByPositionChild.run();
|
76
|
-
},
|
77
|
-
onRemoveField: () => {
|
78
|
-
autoLabelByPositionChild.run();
|
79
|
-
autoButtonsByPositionChild.run();
|
80
|
-
},
|
81
|
-
onMoveUpField: () => {
|
82
|
-
autoLabelByPositionChild.run();
|
83
|
-
autoButtonsByPositionChild.run();
|
84
|
-
},
|
85
|
-
onMoveDownField: () => {
|
86
|
-
autoLabelByPositionChild.run();
|
87
|
-
autoButtonsByPositionChild.run();
|
88
|
-
}
|
89
|
-
});
|
90
|
-
};
|
91
|
-
|
92
|
-
const dynamicFieldsForAgendaItemChilds = {};
|
93
|
-
|
94
|
-
const setupInitialAgendaItemChildAttributes = ($target) => {
|
95
|
-
const fieldId = $target.attr("id");
|
96
|
-
|
97
|
-
dynamicFieldsForAgendaItemChilds[fieldId] = createDynamicFieldsForAgendaItemChilds(fieldId);
|
98
|
-
|
99
|
-
}
|
100
|
-
|
101
|
-
const hideDeletedAgendaItem = ($target) => {
|
102
|
-
const inputDeleted = $target.find("input[name$=\\[deleted\\]]").val();
|
103
|
-
|
104
|
-
if (inputDeleted === "true") {
|
105
|
-
$target.addClass("hidden");
|
106
|
-
$target.hide();
|
107
|
-
}
|
108
|
-
};
|
109
|
-
|
110
|
-
createDynamicFields({
|
111
|
-
placeholderId: "meeting-agenda-item-id",
|
112
|
-
wrapperSelector: wrapperSelector,
|
113
|
-
containerSelector: ".meeting-agenda-items-list",
|
114
|
-
fieldSelector: fieldSelector,
|
115
|
-
addFieldButtonSelector: ".add-agenda-item",
|
116
|
-
removeFieldButtonSelector: ".remove-agenda-item",
|
117
|
-
moveUpFieldButtonSelector: ".move-up-agenda-item",
|
118
|
-
moveDownFieldButtonSelector: ".move-down-agenda-item",
|
119
|
-
onAddField: ($field) => {
|
120
|
-
// createDynamicFieldsForAgendaItemChilds($field);
|
121
|
-
setupInitialAgendaItemChildAttributes($field);
|
122
|
-
createSortableList();
|
123
|
-
|
124
|
-
$field.find(".editor-container").each((idx, el) => {
|
125
|
-
createQuillEditor(el);
|
126
|
-
});
|
127
|
-
|
128
|
-
autoLabelByPosition.run();
|
129
|
-
autoButtonsByPosition.run();
|
130
|
-
},
|
131
|
-
onRemoveField: () => {
|
132
|
-
autoLabelByPosition.run();
|
133
|
-
autoButtonsByPosition.run();
|
134
|
-
},
|
135
|
-
onMoveUpField: () => {
|
136
|
-
autoLabelByPosition.run();
|
137
|
-
autoButtonsByPosition.run();
|
138
|
-
},
|
139
|
-
onMoveDownField: () => {
|
140
|
-
autoLabelByPosition.run();
|
141
|
-
autoButtonsByPosition.run();
|
142
|
-
}
|
143
|
-
});
|
144
|
-
|
145
|
-
createSortableList();
|
146
|
-
|
147
|
-
$(fieldSelector).each((idx, el) => {
|
148
|
-
const $target = $(el);
|
149
|
-
|
150
|
-
hideDeletedAgendaItem($target);
|
151
|
-
setupInitialAgendaItemChildAttributes($target);
|
152
|
-
});
|
153
|
-
|
154
|
-
autoLabelByPosition.run();
|
155
|
-
autoButtonsByPosition.run();
|
156
|
-
autoLabelByPositionChild.run();
|
157
|
-
autoButtonsByPositionChild.run();
|
158
|
-
})(window);
|
@@ -1,54 +0,0 @@
|
|
1
|
-
((exports) => {
|
2
|
-
const $ = exports.$; // eslint-disable-line
|
3
|
-
const { attachGeocoding } = exports.Decidim;
|
4
|
-
|
5
|
-
$(() => {
|
6
|
-
// Adds the latitude/longitude inputs after the geocoding is done
|
7
|
-
attachGeocoding($("#meeting_address"));
|
8
|
-
|
9
|
-
const $form = $(".meetings_form");
|
10
|
-
if ($form.length > 0) {
|
11
|
-
const $meetingTypeOfMeeting = $form.find("#meeting_type_of_meeting");
|
12
|
-
const $meetingOnlineFields = $form.find(".field[data-meeting-type='online']");
|
13
|
-
const $meetingInPersonFields = $form.find(".field[data-meeting-type='in_person']");
|
14
|
-
|
15
|
-
const toggleDependsOnSelect = ($target, $showDiv, type) => {
|
16
|
-
const value = $target.val();
|
17
|
-
if (value === "hybrid") {
|
18
|
-
$showDiv.show();
|
19
|
-
} else {
|
20
|
-
$showDiv.hide();
|
21
|
-
if (value === type) {
|
22
|
-
$showDiv.show();
|
23
|
-
}
|
24
|
-
}
|
25
|
-
};
|
26
|
-
|
27
|
-
$meetingTypeOfMeeting.on("change", (ev) => {
|
28
|
-
const $target = $(ev.target);
|
29
|
-
toggleDependsOnSelect($target, $meetingOnlineFields, "online");
|
30
|
-
toggleDependsOnSelect($target, $meetingInPersonFields, "in_person");
|
31
|
-
});
|
32
|
-
|
33
|
-
toggleDependsOnSelect($meetingTypeOfMeeting, $meetingOnlineFields, "online");
|
34
|
-
toggleDependsOnSelect($meetingTypeOfMeeting, $meetingInPersonFields, "in_person");
|
35
|
-
|
36
|
-
|
37
|
-
const $meetingRegistrationType = $form.find("#meeting_registration_type");
|
38
|
-
const $meetingRegistrationTerms = $form.find("#meeting_registration_terms");
|
39
|
-
const $meetingRegistrationUrl = $form.find("#meeting_registration_url");
|
40
|
-
const $meetingAvailableSlots = $form.find("#meeting_available_slots");
|
41
|
-
|
42
|
-
$meetingRegistrationType.on("change", (ev) => {
|
43
|
-
const $target = $(ev.target);
|
44
|
-
toggleDependsOnSelect($target, $meetingAvailableSlots, "on_this_platform");
|
45
|
-
toggleDependsOnSelect($target, $meetingRegistrationTerms, "on_this_platform");
|
46
|
-
toggleDependsOnSelect($target, $meetingRegistrationUrl, "on_different_platform");
|
47
|
-
});
|
48
|
-
|
49
|
-
toggleDependsOnSelect($meetingRegistrationType, $meetingAvailableSlots, "on_this_platform");
|
50
|
-
toggleDependsOnSelect($meetingRegistrationType, $meetingRegistrationTerms, "on_this_platform");
|
51
|
-
toggleDependsOnSelect($meetingRegistrationType, $meetingRegistrationUrl, "on_different_platform");
|
52
|
-
}
|
53
|
-
});
|
54
|
-
})(window);
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Meetings
|
5
|
-
module Admin
|
6
|
-
# This command is executed when the user creates a Minutes from the admin
|
7
|
-
# panel.
|
8
|
-
class CreateMinutes < Rectify::Command
|
9
|
-
def initialize(form, meeting)
|
10
|
-
@form = form
|
11
|
-
@meeting = meeting
|
12
|
-
end
|
13
|
-
|
14
|
-
# Creates the meeting if valid.
|
15
|
-
#
|
16
|
-
# Broadcasts :ok if successful, :invalid otherwise.
|
17
|
-
def call
|
18
|
-
return broadcast(:invalid) if @form.invalid?
|
19
|
-
|
20
|
-
transaction do
|
21
|
-
create_minutes!
|
22
|
-
end
|
23
|
-
|
24
|
-
broadcast(:ok, @minutes)
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def create_minutes!
|
30
|
-
log_info = {
|
31
|
-
resource: {
|
32
|
-
title: @meeting.title
|
33
|
-
},
|
34
|
-
participatory_space: {
|
35
|
-
title: @meeting.participatory_space.title
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
@minutes = Decidim.traceability.create!(
|
40
|
-
Minutes,
|
41
|
-
@form.current_user,
|
42
|
-
{
|
43
|
-
description: @form.description,
|
44
|
-
video_url: @form.video_url,
|
45
|
-
audio_url: @form.audio_url,
|
46
|
-
visible: @form.visible,
|
47
|
-
meeting: @meeting
|
48
|
-
},
|
49
|
-
log_info
|
50
|
-
)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Meetings
|
5
|
-
module Admin
|
6
|
-
# This command is executed when the user changes a Minutes from the admin
|
7
|
-
# panel.
|
8
|
-
class UpdateMinutes < Rectify::Command
|
9
|
-
# Initializes a UpdateMinutes Command.
|
10
|
-
#
|
11
|
-
# form - The form from which to get the data.
|
12
|
-
# current_meeting - The current instance of the meeting.
|
13
|
-
# minutes - The current instance of the minutes to be updated.
|
14
|
-
def initialize(form, current_meeting, minutes)
|
15
|
-
@form = form
|
16
|
-
@current_meeting = current_meeting
|
17
|
-
@minutes = minutes
|
18
|
-
end
|
19
|
-
|
20
|
-
# Updates the minute if valid.
|
21
|
-
#
|
22
|
-
# Broadcasts :ok if successful, :invalid otherwise.
|
23
|
-
def call
|
24
|
-
return broadcast(:invalid) if form.invalid?
|
25
|
-
|
26
|
-
transaction do
|
27
|
-
update_minutes!
|
28
|
-
end
|
29
|
-
|
30
|
-
broadcast(:ok, minutes)
|
31
|
-
end
|
32
|
-
|
33
|
-
private
|
34
|
-
|
35
|
-
attr_reader :form, :current_meeting, :minutes
|
36
|
-
|
37
|
-
def update_minutes!
|
38
|
-
log_info = {
|
39
|
-
resource: {
|
40
|
-
title: @current_meeting.title
|
41
|
-
},
|
42
|
-
participatory_space: {
|
43
|
-
title: @current_meeting.participatory_space.title
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
@minutes = Decidim.traceability.update!(
|
48
|
-
minutes,
|
49
|
-
form.current_user,
|
50
|
-
{
|
51
|
-
description: form.description,
|
52
|
-
video_url: form.video_url,
|
53
|
-
audio_url: form.audio_url,
|
54
|
-
visible: form.visible,
|
55
|
-
meeting: current_meeting
|
56
|
-
},
|
57
|
-
log_info
|
58
|
-
)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,69 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Meetings
|
5
|
-
module Admin
|
6
|
-
# This controller allows an admin to manage minutes from a Meeting
|
7
|
-
class MinutesController < Admin::ApplicationController
|
8
|
-
helper_method :current_meeting, :minutes
|
9
|
-
|
10
|
-
def new
|
11
|
-
enforce_permission_to :create, :minutes, meeting: current_meeting
|
12
|
-
|
13
|
-
@form = form(MinutesForm).instance
|
14
|
-
end
|
15
|
-
|
16
|
-
def create
|
17
|
-
enforce_permission_to :create, :minutes, meeting: current_meeting
|
18
|
-
|
19
|
-
@form = form(MinutesForm).from_params(params)
|
20
|
-
|
21
|
-
CreateMinutes.call(@form, current_meeting) do
|
22
|
-
on(:ok) do
|
23
|
-
flash[:notice] = I18n.t("minutes.create.success", scope: "decidim.meetings.admin")
|
24
|
-
redirect_to meetings_path
|
25
|
-
end
|
26
|
-
|
27
|
-
on(:invalid) do
|
28
|
-
flash.now[:alert] = I18n.t("minutes.create.invalid", scope: "decidim.meetings.admin")
|
29
|
-
render action: "new"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def edit
|
35
|
-
enforce_permission_to :update, :minutes, minutes: minutes, meeting: current_meeting
|
36
|
-
|
37
|
-
@form = form(MinutesForm).from_model(minutes)
|
38
|
-
end
|
39
|
-
|
40
|
-
def update
|
41
|
-
enforce_permission_to :update, :minutes, minutes: minutes, meeting: current_meeting
|
42
|
-
|
43
|
-
@form = form(MinutesForm).from_params(params)
|
44
|
-
UpdateMinutes.call(@form, current_meeting, minutes) do
|
45
|
-
on(:ok) do
|
46
|
-
flash[:notice] = I18n.t("minutes.update.success", scope: "decidim.meetings.admin")
|
47
|
-
redirect_to meetings_path
|
48
|
-
end
|
49
|
-
|
50
|
-
on(:invalid) do
|
51
|
-
flash.now[:alert] = I18n.t("minutes.update.invalid", scope: "decidim.meetings.admin")
|
52
|
-
render action: "edit"
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
private
|
58
|
-
|
59
|
-
def current_meeting
|
60
|
-
@current_meeting ||= Meeting.where(component: current_component).find(params[:meeting_id])
|
61
|
-
end
|
62
|
-
|
63
|
-
def minutes
|
64
|
-
@minutes ||= Minutes.where(meeting: current_meeting).find(params[:id])
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Meetings
|
5
|
-
module Admin
|
6
|
-
# This class holds a Form to create/update minutes from Decidim's admin panel.
|
7
|
-
class MinutesForm < Decidim::Form
|
8
|
-
include TranslatableAttributes
|
9
|
-
|
10
|
-
translatable_attribute :description, String
|
11
|
-
|
12
|
-
attribute :video_url, String
|
13
|
-
attribute :audio_url, String
|
14
|
-
attribute :visible, Boolean
|
15
|
-
|
16
|
-
validates :description, translatable_presence: true
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Meetings
|
5
|
-
# The data store for a Minutes in the Decidim::Meetings component.
|
6
|
-
class Minutes < Meetings::ApplicationRecord
|
7
|
-
include Decidim::Traceable
|
8
|
-
include Decidim::Loggable
|
9
|
-
include Decidim::TranslatableResource
|
10
|
-
|
11
|
-
translatable_fields :description
|
12
|
-
|
13
|
-
belongs_to :meeting, foreign_key: "decidim_meeting_id", class_name: "Decidim::Meetings::Meeting"
|
14
|
-
|
15
|
-
def self.log_presenter_class_for(_log)
|
16
|
-
Decidim::Meetings::AdminLog::MinutesPresenter
|
17
|
-
end
|
18
|
-
|
19
|
-
delegate :component, to: :meeting
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|