From 6cc7eb34e546a7c4e7c1b420cd78dcb2dc8d3ee1 Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:30:14 +0100 Subject: [PATCH] feat: Implement edit note publication schedule - EXO-75389 - Meeds-io/MIPs#161 (#1214) Implement edit note publication schedule --- .../portlet/notes/notesPortlet_en.properties | 1 + .../portlet/notes/notesPortlet_fr.properties | 1 + .../javascript/eXo/wiki/notesService.js | 1 + .../components/NotePublicationDrawer.vue | 1 + .../schedule-option/NoteScheduleOption.vue | 31 +++++++++++++------ .../notes/components/NotesOverview.vue | 4 ++- 6 files changed, 28 insertions(+), 11 deletions(-) diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties index f40176194..02c30f878 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties @@ -106,6 +106,7 @@ notes.publication.advanced.option.label=Advanced options notes.publication.hide.author.label=Hide author notes.publication.hide.reaction.label=Hide reaction notes.publication.success.message=Note successfully published +notes.publication.externalPage.publish.cancel.label=Cancel publishing popup.confirm=Confirm popup.msg.confirmation=Confirmation diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties index e83a0e112..64a644087 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties @@ -105,6 +105,7 @@ notes.publication.advanced.option.label=Options avancées notes.publication.hide.author.label=Masquer l'auteur notes.publication.hide.reaction.label=Masquer la réaction notes.publication.success.message=Note publi\u00E9e avec succ\u00E8s +notes.publication.externalPage.publish.cancel.label=Annuler la publication popup.confirm=Confirmer popup.msg.confirmation=Confirmation diff --git a/notes-webapp/src/main/webapp/javascript/eXo/wiki/notesService.js b/notes-webapp/src/main/webapp/javascript/eXo/wiki/notesService.js index de811aa81..7e4ab7bf3 100644 --- a/notes-webapp/src/main/webapp/javascript/eXo/wiki/notesService.js +++ b/notes-webapp/src/main/webapp/javascript/eXo/wiki/notesService.js @@ -476,6 +476,7 @@ export async function getSavedNotePublicationSettings(id, lang) { audience: article.audience, schedulePostDate: article.schedulePostDate, scheduleUnpublishDate: article.scheduleUnpublishDate, + fromExternalPage: article.fromExternalPage, properties: article.properties ?? {} }; } catch (error) { diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue index 672732776..3220ec19d 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue @@ -157,6 +157,7 @@ :publish="publicationSettings?.publish" :is-publishing="isPublishing" :edit-mode="editMode" + :from-external-page="noteObject?.fromExternalPage" :saved-schedule-settings="{ scheduled: currentScheduleSettings?.schedule, postDate: currentScheduleSettings?.postDate, diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue index 1df7e12d1..9efaabbfd 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue @@ -30,8 +30,17 @@ :multiple="isMultipleSelectionOption" class="d-flex ms-n1 mt-0 pt-0"> + v-if="fromExternalPage" + :label="$t('notes.publication.externalPage.publish.cancel.label')" + :value="CANCEL_SCHEDULE_OPTION" /> + +