Author: kien_nguyen
Date: 2010-08-29 23:00:28 -0400 (Sun, 29 Aug 2010)
New Revision: 3959
Added:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/navigation.xml
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/pages.xml
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml
Modified:
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/pages.xml
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-1391 Configure a new simple Portal template for portal creation option
Modified:
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css
===================================================================
---
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css 2010-08-30
03:00:28 UTC (rev 3959)
@@ -53,6 +53,12 @@
background: url('background/TemplateContainer.jpg') no-repeat center -170px;
margin-top: 9px;
}
+
+.UIItemSelector .ItemDetailList .TemplateContainer .BasicPortalImage {
+ height: 222px;
+ background: url('background/TemplateContainer.jpg') no-repeat center -392px;
+ margin-top: 9px;
+}
.UIItemSelector .TemplateContainer .DefaultImage {
height: 222px;
Modified:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-08-30
03:00:28 UTC (rev 3959)
@@ -840,6 +840,7 @@
SitePortal.label=Site Portal
ClassicPortal.label=Classic Portal
WebOSPortal.label=WebOS Portal
+BasicPortal.label=Basic Portal
############################################################################
Added:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/navigation.xml
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/navigation.xml
(rev 0)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/navigation.xml 2010-08-30
03:00:28 UTC (rev 3959)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This 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 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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 software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<node-navigation
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0
http://www.gatein.org/xml/ns/gatein_objects_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>Home</label>
+ <page-reference>portal::@owner@::homepage</page-reference>
+ </node>
+ <node>
+ <uri>groupnavigation</uri>
+ <name>groupnavigation</name>
+ <label>Group Navigation</label>
+ <visibility>SYSTEM</visibility>
+ <page-reference>portal::@owner@::groupnavigation</page-reference>
+ </node>
+ <node>
+ <uri>portalnavigation</uri>
+ <name>portalnavigation</name>
+ <label>Portal Navigation</label>
+ <visibility>SYSTEM</visibility>
+ <page-reference>portal::@owner@::portalnavigation</page-reference>
+ </node>
+ <node>
+ <uri>register</uri>
+ <name>register</name>
+ <label>Register</label>
+ <visibility>SYSTEM</visibility>
+ <page-reference>portal::@owner@::register</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/pages.xml
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/pages.xml
(rev 0)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/pages.xml 2010-08-30
03:00:28 UTC (rev 3959)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This 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 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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 software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<page-set
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0
http://www.gatein.org/xml/ns/gatein_objects_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
+
+ <page>
+ <name>homepage</name>
+ <title>Home Page</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>HomePagePortlet</portlet-ref>
+ </portlet>
+ <title>Home Page portlet</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>false</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ </portlet-application>
+ </page>
+
+ <page>
+ <name>groupnavigation</name>
+ <title>Group Navigation</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>exoadmin</application-ref>
+ <portlet-ref>GroupNavigationPortlet</portlet-ref>
+ </portlet>
+ <title>Group Navigation</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+ </page>
+
+ <page>
+ <name>portalnavigation</name>
+ <title>Portal Navigation</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>exoadmin</application-ref>
+ <portlet-ref>PortalNavigationPortlet</portlet-ref>
+ </portlet>
+ <title>Portal Navigation</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+ </page>
+
+ <page>
+ <name>register</name>
+ <title>Register</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>exoadmin</application-ref>
+ <portlet-ref>RegisterPortlet</portlet-ref>
+ </portlet>
+ <title>New Account</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+ </page>
+
+</page-set>
Added:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml
(rev 0)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml 2010-08-30
03:00:28 UTC (rev 3959)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This 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 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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 software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<portal-config
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0
http://www.gatein.org/xml/ns/gatein_objects_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
+ <portal-name>@owner@</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <properties>
+ <entry key="sessionAlive">onDemand</entry>
+ </properties>
+
+ <portal-layout>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>BannerPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>NavigationPortlet</portlet-ref>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>BreadcumbsPortlet</portlet-ref>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+
+ <page-body> </page-body>
+
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>FooterPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+
+ </portal-layout>
+
+</portal-config>
Modified:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml 2010-08-30
03:00:28 UTC (rev 3959)
@@ -34,6 +34,13 @@
<page-reference>portal::@owner@::homepage</page-reference>
</node>
<node>
+ <uri>sitemap</uri>
+ <name>sitemap</name>
+ <label>SiteMap</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::@owner@::sitemap</page-reference>
+ </node>
+ <node>
<uri>groupnavigation</uri>
<name>groupnavigation</name>
<label>Group Navigation</label>
Modified:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/pages.xml
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/pages.xml 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/pages.xml 2010-08-30
03:00:28 UTC (rev 3959)
@@ -90,5 +90,20 @@
<show-info-bar>false</show-info-bar>
</portlet-application>
</page>
+ <page>
+ <name>sitemap</name>
+ <title>Site Map</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>SiteMapPortlet</portlet-ref>
+ </portlet>
+ <title>SiteMap</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+ </page>
</page-set>
Modified:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2010-08-30
03:00:28 UTC (rev 3959)
@@ -122,10 +122,13 @@
</field>
<field name="portalTemplates">
<collection type="java.util.HashSet">
- <value>
+ <value>
+ <string>basic</string>
+ </value>
+ <value>
<string>classic</string>
</value>
- </collection>
+ </collection>
</field>
<field name="groupTemplates">
<collection type="java.util.HashSet">
Modified:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy
===================================================================
---
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy 2010-08-30
03:00:28 UTC (rev 3959)
@@ -23,10 +23,16 @@
import org.exoplatform.webui.core.model.SelectItemCategory;
List options = new ArrayList();
+
+ SelectItemCategory basic = new SelectItemCategory("BasicPortal");
+ basic.addSelectItemOption(
+ new PortalTemplateConfigOption("Basic Portal", "basic",
"Basic Portal", "BasicPortal").addGroup("/platform/guest")
+ );
+ options.add(basic);
SelectItemCategory guest = new SelectItemCategory("ClassicPortal");
guest.addSelectItemOption(
- //new PortalTemplateConfigOption("", "site", "Site
Portal", "SitePortal").addGroup("/guest")
+ //new PortalTemplateConfigOption("", "site", "Site
Portal", "SitePortal").addGroup("/guest")
new PortalTemplateConfigOption("", "classic", "Classic
Portal", "ClassicPortal").addGroup("/platform/guests")
);
options.add(guest);
Modified:
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
---
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-08-30
03:00:28 UTC (rev 3959)
@@ -130,6 +130,13 @@
addUIFormInput(uiSettingSet);
setSelectedTab(uiSettingSet.getId());
+ WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ Param param = initParams.getParam("PageTemplate");
+ List<SelectItemCategory> itemCategories =
(List<SelectItemCategory>)param.getMapGroovyObject(context);
+ UIFormInputItemSelector uiTemplate = new
UIFormInputItemSelector("Template", "template");
+ uiTemplate.setItemCategories(itemCategories);
+ addUIFormInput(uiTemplate);
+
uiPermissionSetting = createUIComponent(UIFormInputSet.class,
"PermissionSetting", null);
UIListPermissionSelector uiListPermissionSelector =
createUIComponent(UIListPermissionSelector.class, null, null);
uiListPermissionSelector.configure("UIListPermissionSelector",
"accessPermissions");
Modified:
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
---
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-08-27
20:47:32 UTC (rev 3958)
+++
portal/branches/branched-r3845/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-08-30
03:00:28 UTC (rev 3959)
@@ -105,8 +105,8 @@
{
super("UIPortalForm");
UIFormInputItemSelector uiTemplateInput = new
UIFormInputItemSelector("PortalTemplate", null);
-// addUIFormInput(uiTemplateInput);
-// setSelectedTab(uiTemplateInput.getId());
+ addUIFormInput(uiTemplateInput);
+ setSelectedTab(uiTemplateInput.getId());
createDefaultItem();
UIFormInputSet uiPortalSetting = this.<UIFormInputSet>
getChildById("PortalSetting");
@@ -338,8 +338,7 @@
{
UIPortalForm uiForm = event.getSource();
PortalRequestContext pcontext =
(PortalRequestContext)event.getRequestContext();
- String template = "classic";
-// String template =
uiForm.getChild(UIFormInputItemSelector.class).getSelectedItemOption().getValue().toString();
+ String template =
uiForm.getChild(UIFormInputItemSelector.class).getSelectedItemOption().getValue().toString();
String portalName = uiForm.getUIStringInput(FIELD_NAME).getValue();
DataStorage dataService = uiForm.getApplicationComponent(DataStorage.class);
PortalConfig config = dataService.getPortalConfig(portalName);