Skip to content

Commit

Permalink
feat: Implement notes publication drawer - EXO-72738
Browse files Browse the repository at this point in the history
feat: Implement note publication drawer - EXO-72738 - Meeds-io/MIPs#161

Implement note publication drawer
  • Loading branch information
hakermi committed Oct 7, 2024
1 parent 492300c commit 0ebc067
Show file tree
Hide file tree
Showing 14 changed files with 795 additions and 334 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr
}
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT_AND_TITLE, identity);
} else {
note_.setLang(note.getLang());
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT_AND_TITLE, identity);
note_.setLang(note.getLang());
note_.setTitle(note.getTitle());
note_.setContent(note.getContent());
note_.setProperties(notePageProperties);
Expand All @@ -783,8 +783,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr
note_.setProperties(notePageProperties);
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_TITLE, identity);
} else {
note_.setLang(note.getLang());
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_TITLE, identity);
note_.setLang(note.getLang());
note_.setTitle(note.getTitle());
note_.setProperties(notePageProperties);
}
Expand All @@ -799,8 +799,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr
note_.setProperties(notePageProperties);
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT, identity);
} else {
note_.setLang(note.getLang());
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT, identity);
note_.setLang(note.getLang());
note_.setContent(note.getContent());
note_.setProperties(notePageProperties);
}
Expand All @@ -815,8 +815,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr
note_.setProperties(notePageProperties);
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_PROPERTIES, identity);
} else {
note_.setLang(note.getLang());
note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_PROPERTIES, identity);
note_.setLang(note.getLang());
note_.setProperties(notePageProperties);
}
noteService.createVersionOfNote(note_, identity.getUserId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ notes.featuredImage.remove.error.message=Error while removing featured image
notes.featuredImage.remove.success.message=Featured image removed successfully
notes.featuredImage.size.error.message=Featured image size should be less or equals to 20MB

notes.publication.publish.label=Publish
notes.publication.label=Choose your publication options
notes.publication.check.properties.label=Check the teaser
notes.publication.publish.next.label=Next



popup.confirm=Confirm
popup.msg.confirmation=Confirmation
popup.confirmation.delete=Delete the note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ notes.featuredImage.remove.error.message=Erreur lors de la suppression de l'illu
notes.featuredImage.remove.success.message=Illustration supprimée avec succès
notes.featuredImage.size.error.message=La taille de l'illustration doit être inférieure ou égale à 20Mo

notes.publication.publish.label=Publier
notes.publication.label=Choisir les options de publication
notes.publication.check.properties.label=Vérifier l'accroche
notes.publication.publish.next.label=Suivant

popup.confirm=Confirmer
popup.msg.confirmation=Confirmation
popup.confirmation.delete=Delete the note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
<import>war:/conf/wiki/ckeditor-configuration.xml</import>
<import>war:/conf/wiki/metadata-configuration.xml</import>
<import>war:/conf/wiki/notification-configuration.xml</import>
<import>war:/conf/wiki/feature-flags-configuration.xml</import>

</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd http://www.exoplatform.org/xml/ns/kernel_1_3.xsd"
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd">
<component>
<key>NotesEditorPublicationDrawerFeatureProperties</key>
<type>org.exoplatform.container.ExtendedPropertyConfigurator</type>
<init-params>
<properties-param>
<name>NotesEditorPublicationDrawerFeatureProperties</name>
<description>Publication drawer Feature enablement flag</description>
<property name="exo.feature.newPublicationDrawer.enabled"
value="${exo.feature.newPublicationDrawer.enabled:false}"/>
</properties-param>
</init-params>
</component>

<external-component-plugins>
<target-component>org.exoplatform.groovyscript.text.TemplateService</target-component>
<component-plugin>
<name>UIPortalApplication-head</name>
<set-method>addTemplateExtension</set-method>
<type>org.exoplatform.groovyscript.text.TemplateExtensionPlugin</type>
<init-params>
<values-param>
<name>templates</name>
<description>The list of templates to include in HTML Page Header with UIPortalApplication.gtmpl</description>
<value>war:/groovy/webui/workspace/UINotesHeadTemplate.gtmpl</value>
</values-param>
</init-params>
</component-plugin>
</external-component-plugins>
</configuration>
Original file line number Diff line number Diff line change
@@ -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();
%>

<script type="text/javascript" id="notesHeadScripts">
eXo.env.portal.newPublicationDrawerEnabled = <%=featureService.isFeatureActiveForUser("newPublicationDrawer", userName)%>;
</script>
2 changes: 1 addition & 1 deletion notes-webapp/src/main/webapp/skin/less/notes/notes.less
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
}
}

#editorMetadataDrawer {
#editorMetadataDrawer, #editorPublicationDrawer {

.add-image-area, .image-preview {
background-color: @primaryBackground !important;
Expand Down
Loading

0 comments on commit 0ebc067

Please sign in to comment.