Skip to content

Commit

Permalink
feat: Implement Platform settings site - Meeds-io/MIPs#88 (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
azayati authored Nov 25, 2023
2 parents 289d0ca + 222c6c4 commit 6f1d602
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 50 deletions.
1 change: 1 addition & 0 deletions translations.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ webui_en.properties=wallet-webapps/src/main/resources/locale/navigation/portal/g
RewardingGroupNavigation.properties=wallet-webapps/src/main/resources/locale/navigation/group/platform/rewarding_en.properties
NotificationAdministration.properties=wallet-webapps/src/main/resources/locale/portlet/NotificationAdministration_en.properties
Analytics.properties=wallet-webapps/src/main/resources/locale/portlet/Analytics_en.properties
navigation/administration.properties=wallet-webapps/src/main/resources/locale/navigation/portal/administration_en.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# This file is part of the Meeds project (https://meeds.io/).
# Copyright (C) 2023 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.
#
portal.administration.home=Platform settings
portal.administration.recognition=Recognition
portal.administration.wallet=Wallet
portal.administration.reward=Reward
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
This file is part of the Meeds project (https://meeds.io/).
Copyright (C) 2023 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.
-->
<node-navigation
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_6 http://www.gatein.org/xml/ns/gatein_objects_1_6"
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_6">
<priority>3</priority>

<page-nodes>
<node>
<name>home</name>
<label>#{portal.administration.home}</label>
<icon>fas fa-cog</icon>
<node>
<name>recognition</name>
<label>#{portal.administration.recognition}</label>
<icon>fas fa-trophy</icon>
<node>
<name>wallet</name>
<label>#{portal.administration.wallet}</label>
<icon>fas fa-wallet</icon>
<page-reference>portal::administration::walletAdministration</page-reference>
</node>
<node>
<name>reward</name>
<label>#{portal.administration.reward}</label>
<icon>fas fa-coins</icon>
<page-reference>portal::administration::rewardAdministration</page-reference>
</node>
</node>
</node>
</page-nodes>
</node-navigation>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the Meeds project (https://meeds.io/).
Copyright (C) 2023 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.
-->
<page-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/gatein_objects_1_8 http://www.exoplatform.org/xml/ns/gatein_objects_1_8"
xmlns="http://www.exoplatform.org/xml/ns/gatein_objects_1_8">
<page>
<name>walletAdministration</name>
<title>Wallet adminsitration</title>
<access-permissions>*:/platform/rewarding</access-permissions>
<edit-permission>manager:/platform/rewarding</edit-permission>
<container id="singlePageApplicationContainer" template="system:/groovy/portal/webui/container/UIContainer.gtmpl" cssClass="singlePageApplication">
<access-permissions>Everyone</access-permissions>
<portlet-application>
<portlet>
<application-ref>wallet</application-ref>
<portlet-ref>WalletAdmin</portlet-ref>
</portlet>
<title>Wallet adminsitration</title>
<access-permissions>Everyone</access-permissions>
<show-info-bar>false</show-info-bar>
</portlet-application>
</container>
</page>
<page>
<name>rewardAdministration</name>
<title>Reward administration</title>
<access-permissions>*:/platform/rewarding</access-permissions>
<edit-permission>manager:/platform/rewarding</edit-permission>
<container id="singlePageApplicationContainer" template="system:/groovy/portal/webui/container/UIContainer.gtmpl" cssClass="singlePageApplication">
<access-permissions>Everyone</access-permissions>
<portlet-application>
<portlet>
<application-ref>wallet</application-ref>
<portlet-ref>RewardAdmin</portlet-ref>
</portlet>
<title>Reward administration</title>
<access-permissions>Everyone</access-permissions>
<show-info-bar>false</show-info-bar>
</portlet-application>
</container>
</page>
</page-set>
Original file line number Diff line number Diff line change
@@ -1,54 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<external-component-plugins>
<target-component>org.exoplatform.commons.addons.AddOnService</target-component>
<component-plugin>
<name>addPlugin</name>
<set-method>addPlugin</set-method>
<type>org.exoplatform.commons.addons.AddOnPluginImpl</type>
<description></description>
<init-params>
<value-param>
<name>priority</name>
<value>2</value>
</value-param>
<value-param>
<name>containerName</name>
<value>settings-bottom-container</value>
</value-param>
<object-param>
<name>wallet-settings-portlet</name>
<description></description>
<object type="org.exoplatform.commons.addons.PortletModel">
<field name="contentId">
<string>wallet/WalletSettings</string>
</field>
<field name="permissions">
<collection type="java.util.ArrayList">
<value>
<string>*:/platform/users</string>
</value>
<value>
<string>*:/platform/externals</string>
</value>
</collection>
</field>
<field name="title">
<string>>wallet Settings Portlet</string>
</field>
<field name="showInfoBar">
<boolean>false</boolean>
</field>
<field name="showApplicationState">
<boolean>false</boolean>
</field>
<field name="showApplicationMode">
<boolean>false</boolean>
</field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>

<external-component-plugins>
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
<component-plugin>
<name>new.portal.config.user.listener</name>
<set-method>initListener</set-method>
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
<description>this listener init the portal configuration</description>
<priority>780</priority>
<init-params>
<object-param>
<name>portal.configuration</name>
<object type="org.exoplatform.portal.config.NewPortalConfig">
<field name="predefinedOwner">
<collection type="java.util.HashSet">
<value>
<string>administration</string>
</value>
</collection>
</field>
<field name="ownerType">
<string>portal</string>
</field>
<field name="templateLocation">
<string>war:/conf/wallet/portal</string>
</field>
<field name="override">
<boolean>${exo.wallet.portalConfig.administration.override:true}</boolean>
</field>
<field name="importMode">
<string>${exo.wallet.portalConfig.administration.importmode:insert}</string>
</field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>

<external-component-plugins>
<target-component>org.exoplatform.commons.addons.AddOnService</target-component>
<component-plugin>
<name>addPlugin</name>
<set-method>addPlugin</set-method>
<type>org.exoplatform.commons.addons.AddOnPluginImpl</type>
<description></description>
<init-params>
<value-param>
<name>priority</name>
<value>2</value>
</value-param>
<value-param>
<name>containerName</name>
<value>settings-bottom-container</value>
</value-param>
<object-param>
<name>wallet-settings-portlet</name>
<description></description>
<object type="org.exoplatform.commons.addons.PortletModel">
<field name="contentId">
<string>wallet/WalletSettings</string>
</field>
<field name="permissions">
<collection type="java.util.ArrayList">
<value>
<string>*:/platform/users</string>
</value>
<value>
<string>*:/platform/externals</string>
</value>
</collection>
</field>
<field name="title">
<string>>wallet Settings Portlet</string>
</field>
<field name="showInfoBar">
<boolean>false</boolean>
</field>
<field name="showApplicationState">
<boolean>false</boolean>
</field>
<field name="showApplicationMode">
<boolean>false</boolean>
</field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>
</configuration>

0 comments on commit 6f1d602

Please sign in to comment.