diff --git a/content-webapp/src/main/webapp/WEB-INF/conf/configuration.xml b/content-webapp/src/main/webapp/WEB-INF/conf/configuration.xml
index fb4a4bcd6..b19066d98 100644
--- a/content-webapp/src/main/webapp/WEB-INF/conf/configuration.xml
+++ b/content-webapp/src/main/webapp/WEB-INF/conf/configuration.xml
@@ -32,5 +32,6 @@
war:/conf/news/metadata-plugins-configuration.xml
war:/conf/news/gamification-configuration.xml
war:/conf/news/ckeditor-configuration.xml
+ war:/conf/news/feature-flags-configuration.xml
diff --git a/content-webapp/src/main/webapp/WEB-INF/conf/news/feature-flags-configuration.xml b/content-webapp/src/main/webapp/WEB-INF/conf/news/feature-flags-configuration.xml
new file mode 100644
index 000000000..0d1a2a220
--- /dev/null
+++ b/content-webapp/src/main/webapp/WEB-INF/conf/news/feature-flags-configuration.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ ContentFeatureProperties
+ org.exoplatform.container.ExtendedPropertyConfigurator
+
+
+ ContentFeatureProperties
+ Content Feature enablement flag
+
+
+
+
+
+
+ org.exoplatform.groovyscript.text.TemplateService
+
+ UIPortalApplication-head
+ addTemplateExtension
+ org.exoplatform.groovyscript.text.TemplateExtensionPlugin
+
+
+ templates
+ The list of templates to include in HTML Page Header with UIPortalApplication.gtmpl
+
+ war:/groovy/webui/workspace/UIContentHeadTemplate.gtmpl
+
+
+
+
+
diff --git a/content-webapp/src/main/webapp/WEB-INF/gatein-resources.xml b/content-webapp/src/main/webapp/WEB-INF/gatein-resources.xml
index cf57786b2..fb81e01b1 100644
--- a/content-webapp/src/main/webapp/WEB-INF/gatein-resources.xml
+++ b/content-webapp/src/main/webapp/WEB-INF/gatein-resources.xml
@@ -293,6 +293,9 @@
false
/js/newsDetails.bundle.js
+
+ NotesPublication
+
vue
diff --git a/content-webapp/src/main/webapp/groovy/webui/workspace/UIContentHeadTemplate.gtmpl b/content-webapp/src/main/webapp/groovy/webui/workspace/UIContentHeadTemplate.gtmpl
new file mode 100644
index 000000000..1932be644
--- /dev/null
+++ b/content-webapp/src/main/webapp/groovy/webui/workspace/UIContentHeadTemplate.gtmpl
@@ -0,0 +1,10 @@
+<%
+ import org.exoplatform.commons.api.settings.ExoFeatureService;
+ def rcontext = _ctx.getRequestContext();
+ ExoFeatureService featureService = uicomponent.getApplicationComponent(ExoFeatureService.class);
+ def userName = rcontext.getRemoteUser();
+%>
+
+
diff --git a/content-webapp/src/main/webapp/vue-app/news-activity-composer-app/components/ContentRichEditor.vue b/content-webapp/src/main/webapp/vue-app/news-activity-composer-app/components/ContentRichEditor.vue
index fd5531c97..30f86f862 100644
--- a/content-webapp/src/main/webapp/vue-app/news-activity-composer-app/components/ContentRichEditor.vue
+++ b/content-webapp/src/main/webapp/vue-app/news-activity-composer-app/components/ContentRichEditor.vue
@@ -30,8 +30,6 @@
:form-title="contentFormTitle"
:suggester-space-url="spacePrettyName"
:app-name="appName"
- :web-page-note="false"
- :web-page-url="false"
:languages="languages"
:translations="translations"
:selected-language="selectedLanguage"
@@ -44,6 +42,8 @@
:save-button-icon="saveButtonIcon"
:save-button-disabled="disableSaveButton"
:editor-icon="editorIcon"
+ :space-id="spaceId"
+ :can-publish="canScheduleArticle"
:images-download-folder="'DRIVE_ROOT_NODE/News/images'"
@editor-closed="editorClosed"
@open-treeview="openTreeView"
@@ -55,7 +55,7 @@
ref="noteTreeview"
@closed="closePluginsDrawer()" />
{
this.displayAlert({type: 'error', message: this.$t('news.save.error.message', error.message)});
this.enableClickOnce();
@@ -504,7 +507,20 @@ export default {
window.history.pushState('news', '', `${url.origin}${url.pathname}?${params.toString()}`);
},
- postArticleActions() {
+ postAndPublish(editMode, publicationSettings) {
+ if (editMode) {
+ this.article.activityPosted = publicationSettings?.post;
+ this.updateAndPostArticle();
+ return;
+ }
+ this.postingNews = true;
+ this.postArticle(null, null, false, publicationSettings?.post);
+ },
+ postArticleActions(publicationSettings) {
+ if (this.newPublicationDrawerEnabled) {
+ this.postAndPublish(this.editMode, publicationSettings);
+ return;
+ }
if (this.editMode) {
this.updateAndPostArticle();
return;
@@ -514,9 +530,7 @@ export default {
this.$root.$emit('open-schedule-drawer', this.scheduleMode);
this.postKey++;
} else {
- this.postingNews = true;
- this.postArticle();
- this.enableClickOnce();
+ this.postAndPublish();
}
},
updateArticleData(article) {
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 74a1a3b0b..880b9f385 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
@@ -56,9 +56,16 @@
:cancel-label="$t('news.button.cancel')"
@ok="deleteNews" />
+
{
+ this.isPublishing = false;
+ this.$root.$emit('alert-message', this.$t('news.composer.alert.success.UpdateTargets'), 'success');
+ this.$refs.publicationDrawer.close();
+ }).catch(() => {
+ this.isPublishing = false;
+ this.$root.$emit('alert-message', this.$t('news.composer.alert.error.UpdateTargets'), 'error');
+ });
+ },
postNews(schedulePostDate, postArticleMode, publish, isActivityPosted, selectedTargets, selectedAudience) {
this.news.timeZoneId = USER_TIMEZONE_ID;
this.news.activityPosted = isActivityPosted;