You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2007/08/14 21:48:05 UTC
svn commit: r565886 - in /portals/jetspeed-2/trunk/src/webapp:
WEB-INF/templates/layout/wml/ WEB-INF/templates/layout/wml/columns/
decorations/layout/wap/
Author: taylor
Date: Tue Aug 14 12:48:04 2007
New Revision: 565886
URL: http://svn.apache.org/viewvc?view=rev&rev=565886
Log:
https://issues.apache.org/jira/browse/JS2-769
Added:
portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/
portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/
portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.properties
portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.vm
portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/
portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/decorator.properties
portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/footer.vm
portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/header.vm
Added: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.properties?view=auto&rev=565886
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.properties (added)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.properties Tue Aug 14 12:48:04 2007
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+id=columns
+
+#: BEGIN comment for JSP
+template.type=velocity
+template.extension=.vm
+#: END comment for JSP
+
+#: BEGIN uncomment for JSP
+#template.type=JSP
+#template.extension=.jsp
+#: END uncomment for JSP
Added: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.vm?view=auto&rev=565886
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.vm (added)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/wml/columns/layout.vm Tue Aug 14 12:48:04 2007
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+#*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*#
+#set($theme = $request.getAttribute("org.apache.jetspeed.theme"))
+#set($sizes = $jetspeed.columnSizes)
+#set($myPage = $jetspeed.page)
+#set($myFragment = $jetspeed.currentFragment)
+#set($decorator = $myPage.getDefaultDecorator($myFragment.getType()))
+#set($actions = $myFragment.decoration.actions)
+#set($messages = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set($rootDecorator = $myPage.getRootFragment().decoration)
+
+#if($myFragment.getDecorator())
+ #set($decorator = $myFragment.getDecorator())
+#end
+
+#if($myFragment == $myPage.getRootFragment())
+ #set($isRoot=true)
+#end
+
+<!-- Decorator $decorator ${decoTop} - ${decoBottom}-->
+#if ($isRoot)
+ #parse($myFragment.decoration.header)
+ #set($layoutClass = "portal-nested-layout")
+#else
+ #defineLayoutObjects()
+ #set($layoutClass = "portal-layout")
+#end
+
+#set($layoutType =$portletConfig.getInitParameter("layoutType"))
+#set($columnLayout = $renderRequest.getAttribute("columnLayout"))
+#set($decorationFactory = $renderRequest.getAttribute("decorationFactory"))
+#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
+#set($psrc = $rc.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext"))
+#set($profiledPage = $psrc.Page.Path)
+
+
+#set ($dcnt = 0)
+#set ($columnIndex = 0)
+
+#foreach($column in $columnLayout.columns)
+
+ #set($columnFloat = $columnLayout.getColumnFloat($columnIndex))
+ #set($columnWidth = $columnLayout.getColumnWidth($columnIndex))
+
+ #foreach($f in $column)
+ ## Set up coordinates for this fragment
+ #set($coords = $columnLayout.getCoordinate($f))
+ #set($col = $coords.x)
+ #set($lastRow = $columnLayout.getLastRowNumber($col))
+ #set($row = $coords.y)
+
+ ## get the decorated Portlet content
+ <card id="column_${myFragment.getId()}_${columnIndex}" title="PortletTitle">
+ ## Now get the real content
+ $jetspeed.setCurrentFragment($f)
+ #if($f.type == "portlet")
+ #parse($f.decoration.template)
+ #else
+ $f.renderedContent
+ #end
+ </card>
+ #end
+ #set ($columnIndex = $columnIndex + 1)
+#end
+
+<br/>
+
+#if ($isRoot)
+ #parse($myFragment.decoration.footer)
+#end
+
Added: portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/decorator.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/decorator.properties?view=auto&rev=565886
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/decorator.properties (added)
+++ portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/decorator.properties Tue Aug 14 12:48:04 2007
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+id=wap
+template.macros=-macros
+decorates=layout
+base.css.class=layout-wap
+
+#: BEGIN comment for JSP
+template.type=velocity
+template.extension=.vm
+#: END comment for JSP
+
+#: BEGIN uncomment for JSP
+#template.type=JSP
+#template.extension=.jsp
+#header=header.jsp
+#footer=footer.jsp
+#: END uncomment for JSP
+
+##following are defaults
+#allow.change.page.theme=true
+#allow.change.layout=true
+#max.layout.nesting=2
+#allow.add.page=true
+#allow.add.portlet=true
+#allow.change.portlet.decorator=true
+#allow.customize.all=true
+
Added: portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/footer.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/footer.vm?view=auto&rev=565886
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/footer.vm (added)
+++ portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/footer.vm Tue Aug 14 12:48:04 2007
@@ -0,0 +1,2 @@
+</wml>
+
Added: portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/header.vm?view=auto&rev=565886
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/header.vm (added)
+++ portals/jetspeed-2/trunk/src/webapp/decorations/layout/wap/header.vm Tue Aug 14 12:48:04 2007
@@ -0,0 +1,30 @@
+<?xml version="1.0" ?>
+<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
+<wml>
+#set($pagesStandardMenu = $site.getMenu("pages"))
+#if(!$pagesStandardMenu.empty)
+ #foreach($element in $pagesStandardMenu.elements.iterator())
+ #if($element.elementType == "option")
+ #set($tabTitle = $element.getTitle($preferedLocale))
+ #set($tabName = $element.getShortTitle($preferedLocale))
+ #if($_orientation == $LEFT_TO_RIGHT)
+ #if($element.isSelected($site))
+ <card id='${tabName}' title='$!tabTitle'>
+ <a href="">${tabName}</a>
+ #else
+ #set($tabUrl = $jetspeed.getAbsoluteUrl($element.url))
+ <card id='${tabName}' title='$!tabTitle">
+ <a href="$tabUrl">${tabName}</a>
+ </card>
+ #end
+ #end
+ #end
+ #end
+#end
+
+#if ($request.getUserPrincipal())
+<span style="position:absolute;right:5em"><a href="#BaseHref()login/logout">Logout</a></span>
+<card id='logout' title='Logout">
+ <a href="#BaseHref()login/logout">Logout</a>
+</card>
+#end
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org