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 8dba53fa54..c1d916db39 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 @@ -72,6 +72,20 @@ notes.publication.check.properties.label=Check the teaser notes.publication.publish.next.label=Next notes.publication.post.in.feed.label=Post in Activity stream of notes.publication.publish.save.label=Publish +notes.publication.publish.in.list.label=Publish in a News list +notes.publication.where.to.publish.label=Where to publish? +notes.publication.who.will.see.label=Who will see? +notes.publication.choose.location.label=Choose a location +notes.publication.only.space.members.label=Only space members +notes.publication.all.users.label=All users +notes.publication.targets.others.label={0} Others +notes.publication.targets.other.label={0} Other +notes.publication.targets.label=News Targets +notes.publication.targets.select.all.label=Select all +notes.publication.all.users.audience.info=All users will see the article +notes.publication.audience.restricted=Restricted: you cannot change it +notes.publication.remove.selected.target.label=Remove selected target + 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 989e371a81..d15478164c 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 @@ -71,6 +71,19 @@ notes.publication.check.properties.label=Vérifier l'accroche notes.publication.publish.next.label=Suivant notes.publication.post.in.feed.label=Publier dans le fil d'activités de notes.publication.publish.save.label=Publier +notes.publication.publish.in.list.label=Publier dans une liste d'articles +notes.publication.where.to.publish.label=O\u00FA publier ? +notes.publication.who.will.see.label=Qui le verra ? +notes.publication.choose.location.label=Sélectionner un emplacement +notes.publication.only.space.members.label=Seuls les membres de l'espace +notes.publication.all.users.label=Tous les utilisateurs +notes.publication.targets.others.label={0} Autres +notes.publication.targets.other.label={0} Autre +notes.publication.targets.label=Cibles d'article +notes.publication.targets.select.all.label=Sélectionner tout +notes.publication.all.users.audience.info=Tous les utilisateurs verront l'article +notes.publication.audience.restricted=Restreint : vous ne pouvez pas le modifier +notes.publication.remove.selected.target.label=Supprimer la cible sélectionnée popup.confirm=Confirmer popup.msg.confirmation=Confirmation diff --git a/notes-webapp/src/main/webapp/skin/less/notes/notes.less b/notes-webapp/src/main/webapp/skin/less/notes/notes.less index 80cf009d0f..fe6303682a 100644 --- a/notes-webapp/src/main/webapp/skin/less/notes/notes.less +++ b/notes-webapp/src/main/webapp/skin/less/notes/notes.less @@ -217,6 +217,11 @@ max-width: 335px; } + .custom-clear-button { + top: 2px; + right: 50px ~'; /** orientation=lt */ '; + left: 50px ~'; /** orientation=rt */ '; + } } #editorMetadataDrawer, #editorPublicationDrawer { 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 f707dce706..56300c9879 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 @@ -22,7 +22,7 @@ + @click.native="closeDrawerByOverlay" />
-
+

{{ $t('notes.publication.post.in.feed.label') }}

+
@@ -149,7 +162,7 @@ {{ saveButtonLabel }} @@ -161,6 +174,7 @@ diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublicationTargetDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublicationTargetDrawer.vue new file mode 100644 index 0000000000..33c725ae4c --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublicationTargetDrawer.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublicationTargetList.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublicationTargetList.vue new file mode 100644 index 0000000000..5d24deebaa --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublicationTargetList.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublishOption.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublishOption.vue new file mode 100644 index 0000000000..d5a1dce65a --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/options/NotePublishOption.vue @@ -0,0 +1,275 @@ + + + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js index 7c7fc54b70..af7478fc83 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js @@ -1,9 +1,15 @@ import NotePublicationDrawer from './components/NotePublicationDrawer.vue'; import NoteMetadataPropertiesForm from '../notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue'; +import NotePublishOption from './components/options/NotePublishOption.vue'; +import NotePublicationTargetDrawer from './components/options/NotePublicationTargetDrawer.vue'; +import NotePublicationTargetList from './components/options/NotePublicationTargetList.vue'; const components = { 'note-publication-drawer': NotePublicationDrawer, - 'note-metadata-properties-form': NoteMetadataPropertiesForm + 'note-metadata-properties-form': NoteMetadataPropertiesForm, + 'note-publish-option': NotePublishOption, + 'note-publication-target-drawer': NotePublicationTargetDrawer, + 'note-publication-target-list': NotePublicationTargetList }; for (const key in components) { diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue index c493ba1f00..ee697764e9 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue @@ -89,11 +89,12 @@ ref="editorPublicationDrawer" :has-featured-image="hasFeaturedImage" :is-publishing="isPublishing" - :space-id="spaceId" + :params="publicationParams" :edit-mode="editMode" @publish="postAndPublishNote" @metadata-updated="metadataUpdated" @closed="publicationDrawerClosed" /> + @@ -211,12 +212,8 @@ export default { type: String, default: 'DRIVE_ROOT_NODE/notes/images' }, - canPublish: { - type: Boolean, - default: false - }, - spaceId: { - type: String, + publicationParams: { + type: Object, default: null } }, @@ -249,6 +246,9 @@ export default { } }, computed: { + canPublish() { + return this.publicationParams?.canPublish; + }, newEmptyTranslation() { return !!this.note?.lang && !this.note?.title?.length && !this.note?.content?.length; }, @@ -575,6 +575,7 @@ export default { return; } this.$refs.editorMetadataDrawer.close(); + this.$refs.editorPublicationDrawer.close(); }, isImageDrawerClosed() { return this.$refs.featuredImageDrawer.isClosed(); diff --git a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue index fd1f7e3aa9..e636e69611 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue @@ -135,7 +135,7 @@

- {{ noteTitle }} + {{ noteTitle }}