Skip to content

Commit

Permalink
feat: Add documents trash management page - EXO-76028
Browse files Browse the repository at this point in the history
  • Loading branch information
sofyenne committed Dec 18, 2024
1 parent 2448b95 commit 08b9977
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ portal.administration.translation=Automatic translation
portal.administration.documents-settings=Document settings
portal.administration.cloud-storage=Cloud storage
portal.administration.documents-editors=Documents editors
portal.administration.documents-trash=Trash
portal.administration.news-settings=News settings
portal.administration.newsTargets=News target
portal.administration.security=Security
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ portal.administration.agenda=Agenda
portal.administration.visio=Visioconf\u00e9rence
portal.administration.translation=Traduction automatique
portal.administration.documents-settings=Documents - Param\u00e8tres
portal.administration.documents-trash=Corbeille
portal.administration.cloud-storage=Stockage en ligne
portal.administration.documents-editors=\u00c9diteurs de documents
portal.administration.news-settings=Param\u00e8tres des listes d'articles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<import>war:/conf/digital-workplace/homepage-deployment-configuration.xml</import>
<import>war:/conf/digital-workplace/portal-upgrade-configuration.xml</import>
<import>war:/conf/digital-workplace/dynamic-container-configuration.xml</import>
<import>war:/conf/digital-workplace/feature-flags-configuration.xml</import>

</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?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>AdministrationFeatureProperties</key>
<type>org.exoplatform.container.ExtendedPropertyConfigurator</type>
<init-params>
<properties-param>
<name>AdministrationFeatureProperties</name>
<description>administration Feature enablement flag</description>
<property name="exo.feature.documentTrash.enabled"
value="${exo.feature.documentTrash.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/documents/webui/workspace/UIAdministrationHead.gtmpl</value>
</values-param>
</init-params>
</component-plugin>
</external-component-plugins>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@
</portlet-application>
</container>
</page>

<page profiles="ecms">
<name>editors</name>
<title>Editors Administration</title>
Expand All @@ -231,6 +230,26 @@
</portlet-application>
</container>
</page>

<page profiles="ecms">
<name>documentsTrashAdministration</name>
<title>Documents Trash Administration</title>
<access-permissions>*:/platform/administrators</access-permissions>
<edit-permission>manager:/platform/administrators</edit-permission>
<show-max-window>false</show-max-window>
<container template="system:/groovy/portal/webui/container/UIPageLayout.gtmpl">
<section-columns>
<column col-span="12">
<portlet-application>
<portlet>
<application-ref>documents</application-ref>
<portlet-ref>trashManagement</portlet-ref>
</portlet>
</portlet-application>
</column>
</section-columns>
</container>
</page>

<page profiles="dlp">
<name>dlp-quarantine</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@
<icon>fas fa-edit</icon>
<page-reference>portal::administration::editors</page-reference>
</node>
<node>
<name>documents-trash-administration</name>
<label>#{portal.administration.documents-trash}</label>
<icon>fa fa-trash</icon>
<page-reference>portal::administration::documentsTrashAdministration</page-reference>
</node>
</node>
<node>
<name>news-settings</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<%
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="NoteHeadScripts">
eXo.env.portal.notePublicationEnabled = <%=featureService.isFeatureActiveForUser("documentTrash", userName)%>;
eXo.env.portal.documentTrashNavigationEnabled = <%=featureService.isFeatureActiveForUser("documentTrash", userName)%>;
</script>

0 comments on commit 08b9977

Please sign in to comment.