diff --git a/content-service/src/main/resources/locale/portlet/news/News_en.properties b/content-service/src/main/resources/locale/portlet/news/News_en.properties index eaac6361d..9d309c6f3 100644 --- a/content-service/src/main/resources/locale/portlet/news/News_en.properties +++ b/content-service/src/main/resources/locale/portlet/news/News_en.properties @@ -288,3 +288,4 @@ content.article.deRefer.label=Derefer the note content.article.referred.success=Article successfully referred content.article.referred.error=Error while referring article content.article.deReferred.success=Note dereferred successfully +content.article.open.in.notes=Open in Notes diff --git a/content-service/src/main/resources/locale/portlet/news/News_fr.properties b/content-service/src/main/resources/locale/portlet/news/News_fr.properties index c06ae5311..dcfd42dbe 100644 --- a/content-service/src/main/resources/locale/portlet/news/News_fr.properties +++ b/content-service/src/main/resources/locale/portlet/news/News_fr.properties @@ -288,3 +288,4 @@ content.article.deRefer.label=D\u00E9r\u00E9f\u00E9rencer la note content.article.referred.success=Article r\u00E9f\u00E9renc\u00E9 avec succ\u00E8s content.article.referred.error=Erreur lors de la r\u00E9f\u00E9rence de l'article content.article.deReferred.success=Note d\u00E9r\u00E9f\u00E9renc\u00E9e avec succ\u00E8s +content.article.open.in.notes=Ouvrir dans Notes diff --git a/content-webapp/src/main/webapp/vue-app/news-details-app/components/ExoNewsDetailsApp.vue b/content-webapp/src/main/webapp/vue-app/news-details-app/components/ExoNewsDetailsApp.vue index 3f2346928..01485b4e6 100644 --- a/content-webapp/src/main/webapp/vue-app/news-details-app/components/ExoNewsDetailsApp.vue +++ b/content-webapp/src/main/webapp/vue-app/news-details-app/components/ExoNewsDetailsApp.vue @@ -17,6 +17,7 @@ :show-edit-button="showEditButton" :show-publish-button="showPublishButton" :show-refer-button="showReferButton" + :show-open-in-notes="showOpenInNotes" :show-delete-button="showDeleteButton" :translations="translations" :selected-translation="selectedTranslation" @@ -44,6 +45,7 @@ export default { showPublishButton: false, showDeleteButton: false, showReferButton: false, + showOpenInNotes: false, selectedTranslation: {value: eXo.env.portal.language}, translations: [], languages: [], diff --git a/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetails.vue b/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetails.vue index 51cfc5ce8..2913240d7 100644 --- a/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetails.vue +++ b/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetails.vue @@ -35,6 +35,7 @@ :show-publish-button="showPublishButton" :show-copy-link-button="showCopyLinkButton" :show-refer-button="showReferButton" + :show-open-in-notes="showOpenInNotes" @delete-article="deleteConfirmDialog" @edit-article="editLink" @open-publication-drawer="openPublicationDrawer" /> @@ -140,6 +141,10 @@ export default { type: Boolean, default: false }, + showOpenInNotes: { + type: Boolean, + default: false + }, translations: { type: Array, default: () => { @@ -211,6 +216,7 @@ export default { }); this.$root.$on('open-edit-publishing-drawer', this.openPublicationDrawer); this.$root.$on('refer-article-to-note', this.referArticle); + this.$root.$on('open-in-notes', this.openInNotes); this.$root.$on('move-page', this.moveArticlePage); }, methods: { @@ -247,6 +253,9 @@ export default { this.$refs.noteTreeview.open(this.articlePage, 'movePage'); } }, + openInNotes() { + window.open(this.articlePage.url, '_blank'); + }, openPublicationDrawer() { if (this.newPublicationDrawerEnabled) { this.$refs?.publicationDrawer?.open(this.news); diff --git a/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsActivity.vue b/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsActivity.vue index 91632db8a..715c36f43 100644 --- a/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsActivity.vue +++ b/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsActivity.vue @@ -30,6 +30,7 @@ :show-delete-button="showDeleteButton" :show-copy-link-button="true" :show-refer-button="showReferButton" + :show-open-in-notes="showOpenNotes" :translations="translations" :selected-translation="selectedTranslation" /> @@ -80,6 +81,9 @@ export default { showReferButton() { return eXo?.env?.portal?.referArticleEnabled && this.news?.canRefer; }, + showOpenNotes() { + return this.news?.referred || this.news?.fromExternalPage; + }, showPublishButton() { return this.news?.canPublish || this.news?.canSchedule; }, diff --git a/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsToolBar.vue b/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsToolBar.vue index 7aaf6d1ab..a58ae6fd7 100644 --- a/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsToolBar.vue +++ b/content-webapp/src/main/webapp/vue-app/news-details/components/ExoNewsDetailsToolBar.vue @@ -42,6 +42,7 @@ :show-publish-button="showPublishButton" :show-copy-link-button="showCopyLinkButton" :show-refer-button="showReferButton" + :show-open-in-notes="showOpenInNotes" @delete-article="$emit('delete-article')" @edit-article="$emit('edit-article')" /> @@ -103,6 +104,10 @@ export default { showReferButton: { type: Boolean, default: false + }, + showOpenInNotes: { + type: Boolean, + default: false } }, data: () => ({ @@ -164,6 +169,7 @@ export default { showPublishButton: this.showPublishButton, showCopyLinkButton: this.showCopyLinkButton, showReferButton: this.showReferButton, + showOpenInNotes: this.showOpenInNotes, currentApp: this.currentApp }); } diff --git a/content-webapp/src/main/webapp/vue-app/news/components/NewsActionMenuItems.vue b/content-webapp/src/main/webapp/vue-app/news/components/NewsActionMenuItems.vue index 807afa5f7..695cc6d19 100644 --- a/content-webapp/src/main/webapp/vue-app/news/components/NewsActionMenuItems.vue +++ b/content-webapp/src/main/webapp/vue-app/news/components/NewsActionMenuItems.vue @@ -33,6 +33,19 @@ {{ $t('news.details.header.menu.copy.link') }} + + + fas fa-external-link-alt + + + {{ $t('content.article.open.in.notes') }} + + @@ -53,7 +54,8 @@ export default { showPublishButton: false, currentApp: null, showCopyLinkButton: false, - showReferButton: false + showReferButton: false, + showOpenInNotes: false }; }, computed: { @@ -78,6 +80,7 @@ export default { this.showPublishButton = config.showPublishButton; this.showCopyLinkButton = config.showCopyLinkButton; this.showReferButton = config.showReferButton; + this.showOpenInNotes = config.showOpenInNotes; this.currentApp = config.currentApp; this.$refs.newsMobileActionMenu.open(); },