cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jer...@apache.org
Subject svn commit: r160586 - in cocoon/blocks/supported/portal/trunk: WEB-INF/xconf/ samples/ samples/resources/ samples/skins/basic/styles/ samples/skins/common/styles/ samples/styles/ samples/tools/ samples/tools/plugins/copletManagement/ samples/tools/plugins/userManagement/
Date Fri, 08 Apr 2005 19:08:47 GMT
Author: jeremy
Date: Fri Apr  8 12:08:45 2005
New Revision: 160586

URL: http://svn.apache.org/viewcvs?view=rev&rev=160586
Log:
adding title to portal, adding fix to hardcoded localhost:8888, adding fix to hardcoded context://
in save profile

Added:
    cocoon/blocks/supported/portal/trunk/samples/styles/save-user-profile.xsl
Modified:
    cocoon/blocks/supported/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf
    cocoon/blocks/supported/portal/trunk/samples/resources/save-user-profile.xml
    cocoon/blocks/supported/portal/trunk/samples/sitemap.xmap
    cocoon/blocks/supported/portal/trunk/samples/skins/basic/styles/portal-page.xsl
    cocoon/blocks/supported/portal/trunk/samples/skins/common/styles/portal-page.xsl
    cocoon/blocks/supported/portal/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
    cocoon/blocks/supported/portal/trunk/samples/tools/plugins/userManagement/sitemap.xmap
    cocoon/blocks/supported/portal/trunk/samples/tools/sitemap.xmap

Modified: cocoon/blocks/supported/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf (original)
+++ cocoon/blocks/supported/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf Fri Apr  8 12:08:45
2005
@@ -35,6 +35,9 @@
       <component-instance logger="core.modules.input" name="coplet" class="org.apache.cocoon.portal.components.modules.input.CopletModule"/>
       <component-instance logger="core.modules.input" name="portal-layout" class="org.apache.cocoon.portal.components.modules.input.LayoutModule"/>
       <component-instance logger="core.modules.input" name="portal-skin" class="org.apache.cocoon.portal.components.modules.input.SkinModule"/>
+      <component-instance logger="core.modules.input" name="portalpath" class="org.apache.cocoon.components.modules.input.ProjectPathModule">
+       	<uri-prefix>samples/blocks/portal/</uri-prefix>
+      </component-instance>
   </input-modules>
   
  <!-- Event Aspect configuration -->

Modified: cocoon/blocks/supported/portal/trunk/samples/resources/save-user-profile.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/resources/save-user-profile.xml?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/resources/save-user-profile.xml (original)
+++ cocoon/blocks/supported/portal/trunk/samples/resources/save-user-profile.xml Fri Apr 
8 12:08:45 2005
@@ -22,7 +22,7 @@
 
 <user xmlns:source="http://apache.org/cocoon/source/1.0" xmlns:session="http://apache.org/cocoon/session/1.0">
     <source:insert>
-    	<source:source>context://samples/blocks/portal/profiles/<session:getxml context="request"
path="/parameter/profile"/>/<session:getxml context="request" path="/parameter/portal"/>-user-<session:getxml
context="request" path="/parameter/user"/>.xml</source:source>
+    	<source:source><session:getxml context="request" path="/parameter/profile"/>/<session:getxml
context="request" path="/parameter/portal"/>-user-<session:getxml context="request"
path="/parameter/user"/>.xml</source:source>
         <source:path>/</source:path>
         <source:fragment><session:getxml context="request" path="/parameter/content"/></source:fragment>
         <source:replace>*</source:replace>

Modified: cocoon/blocks/supported/portal/trunk/samples/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/sitemap.xmap?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/sitemap.xmap (original)
+++ cocoon/blocks/supported/portal/trunk/samples/sitemap.xmap Fri Apr  8 12:08:45 2005
@@ -124,7 +124,9 @@
 
       <!-- select skin to use -->
       <map:global-variables>
-		<skin>common</skin>
+				<skin>common</skin>
+				<mainTitle>Cocoon Portal</mainTitle>
+				<toolsTitle>Cocoon Portal Tools</toolsTitle>
       </map:global-variables>
 
     </map:component-configurations>
@@ -166,6 +168,9 @@
 
       <map:match pattern="save-user-profile">
         <map:generate src="resources/save-user-profile.xml"/>
+				<map:transform src="styles/save-user-profile.xsl">
+					<map:parameter name="profiles" value="context://samples/blocks/portal/profiles/"/>
+				</map:transform>
         <map:transform type="session"/>
         <map:transform type="write-source"/>
         <map:serialize type="xml"/>
@@ -227,6 +232,8 @@
           <map:generate type="portal" label="content"/>
           <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
             <map:parameter name="user" value="{ID}"/>
+            <map:parameter name="title" value="{global:mainTitle}"/>
+            <map:parameter name="base" value="{portalpath:relative}"/>
           </map:transform>
           <map:transform type="cinclude"/>
           <map:transform type="portal-coplet"/>

Modified: cocoon/blocks/supported/portal/trunk/samples/skins/basic/styles/portal-page.xsl
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/skins/basic/styles/portal-page.xsl?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/skins/basic/styles/portal-page.xsl (original)
+++ cocoon/blocks/supported/portal/trunk/samples/skins/basic/styles/portal-page.xsl Fri Apr
 8 12:08:45 2005
@@ -19,18 +19,14 @@
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:param name="user"/>
-
+<xsl:param name="title"/>
 <xsl:param name="base"/>
 
 <xsl:template match="/">
 <html>
 	<head>
-	   <xsl:if test="$base">
-			<base>
-				<xsl:attribute name="href"><xsl:value-of select="$base"/></xsl:attribute>
-			</base>
-        </xsl:if>
-		<link type="text/css" rel="stylesheet" href="css/page.css"/>
+		<title><xsl:value-of select="$title"/></title>
+		<link type="text/css" rel="stylesheet" href="{$base}css/page.css"/>
 	</head>
 	<body>
 	<table bgColor="#ffffff" border="0" cellPadding="0" cellSpacing="0" width="100%">
@@ -53,10 +49,10 @@
 			<tr> 
 				<td colspan="2" noWrap="" height="10" bgcolor="#DDDDDD" align="right">
 				    <xsl:if test="$user!='anonymous'">
-						<a href="logout" style="color:#4C6C8F;font-size:75%;">
+						<a href="{$base}logout" style="color:#4C6C8F;font-size:75%;">
 							Logout
 						</a><br/>
-						<a href="tools/" style="color:#4C6C8F;font-size:75%;">
+						<a href="{$base}tools/" style="color:#4C6C8F;font-size:75%;">
 							Tools
 						</a>
 				    </xsl:if>
@@ -81,12 +77,12 @@
 		<tbody> 
 		<tr> 
 			<td colspan="2" noWrap="" height="10" bgcolor="#DDDDDD">
-				<img height="1" src="images/space.gif" width="1"/>
+				<img height="1" src="{$base}images/space.gif" width="1"/>
 			</td>
 		</tr>
 		<tr> 
 			<td colspan="2" noWrap="" height="30" bgcolor="#CCCCCC">
-				<img height="1" src="images/space.gif" width="1"/>
+				<img height="1" src="{$base}images/space.gif" width="1"/>
 			</td>
 		</tr>
 		</tbody>
@@ -99,6 +95,18 @@
 	</body>
 </html>
 
+</xsl:template>
+
+<!-- make links relative -->
+<xsl:template match="a[not(@target)]">
+	<a><xsl:apply-templates select="@*"/><xsl:attribute name="href"><xsl:value-of
select="concat($base,@href)"/></xsl:attribute><xsl:apply-templates/></a>
+</xsl:template>
+<!-- make images relative -->
+<xsl:template match="img">
+	<img>
+		<xsl:apply-templates select="@*"/>
+		<xsl:attribute name="src"><xsl:value-of select="concat($base,@src)"/></xsl:attribute>
+	</img>
 </xsl:template>
 
 <!-- Copy all and apply templates -->

Modified: cocoon/blocks/supported/portal/trunk/samples/skins/common/styles/portal-page.xsl
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/skins/common/styles/portal-page.xsl?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/skins/common/styles/portal-page.xsl (original)
+++ cocoon/blocks/supported/portal/trunk/samples/skins/common/styles/portal-page.xsl Fri Apr
 8 12:08:45 2005
@@ -19,17 +19,14 @@
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:param name="user"/>
-
+<xsl:param name="title"/>
 <xsl:param name="base"/>
+
 <xsl:template match="/">
   <html>
     <head>
-	  <xsl:if test="$base">
-		<base>
-			<xsl:attribute name="href"><xsl:value-of select="$base"/></xsl:attribute>
-		</base>
-      </xsl:if>
-      <link type="text/css" rel="stylesheet" href="css/page.css"/>
+			<title><xsl:value-of select="$title"/></title>
+      <link type="text/css" rel="stylesheet" href="{$base}css/page.css"/>
     </head>
     <body>
       <table bgColor="#ffffff" border="0" cellPadding="0" cellSpacing="0" width="100%"><tbody>

@@ -39,27 +36,27 @@
             <table border="0" cellPadding="0" cellSpacing="0" width="100%"><tbody>

               <tr>
                 <td colspan="2" noWrap="" height="1%" bgcolor="#294563">
-                  <img height="5" src="images/space.gif" width="100%"/>
+                  <img height="5" src="{$base}images/space.gif" width="100%"/>
                 </td>
               </tr>
               <tr> 
                 <td colspan="2" bgcolor="#294563" height="98%" align="center" valign="middle"
width="100%">
-                  <img src="images/portal-logo.gif" width="250" height="90" />
+                  <img src="{$base}images/portal-logo.gif" width="250" height="90" />
                 </td>
               </tr>
               <tr valign="bottom"> 
                 <td height="99%" bgcolor="#294563" width="99%" align="right">
                   <xsl:if test="$user!='anonymous'">
-                    <a href="logout"><img src="images/logout-door.gif" width="18"
height="22" border="0"/></a>
+                    <a href="{$base}logout"><img src="{$base}images/logout-door.gif"
width="18" height="22" border="0"/></a>
                   </xsl:if>
-                  <img height="5" src="images/space.gif" width="5"/>
+                  <img height="5" src="{$base}images/space.gif" width="5"/>
                 </td>
                 <td height="99%" bgcolor="#294563" width="1%" align="right">
                   <xsl:if test="$user!='anonymous'">
-                    <a href="logout" style="color:#CFDCED;font-size:75%;">Logout</a>&#160;
-					<a href="tools/" style="color:#CFDCED;font-size:75%;">Tools</a>&#160;
+                    <a href="{$base}logout" style="color:#CFDCED;font-size:75%;">Logout</a>&#160;
+										<a href="{$base}tools/" style="color:#CFDCED;font-size:75%;">Tools</a>&#160;
                   </xsl:if>
-                  <img height="5" src="images/space.gif" width="5"/>
+                  <img height="5" src="{$base}images/space.gif" width="5"/>
                 </td>
               </tr>
             </tbody></table>
@@ -79,7 +76,7 @@
             <table border="0" cellPadding="0" cellSpacing="0" width="100%"><tbody>

               <tr> 
                 <td colspan="2" noWrap="" height="30" bgcolor="#294563">
-                  <img height="1" src="images/space.gif" width="1"/>
+                  <img height="1" src="{$base}images/space.gif" width="1"/>
                 </td>
               </tr>
             </tbody></table>
@@ -90,6 +87,18 @@
     </body>
   </html>
 
+</xsl:template>
+
+<!-- make links relative -->
+<xsl:template match="a[not(@target)]">
+	<a><xsl:apply-templates select="@*"/><xsl:attribute name="href"><xsl:value-of
select="concat($base,@href)"/></xsl:attribute><xsl:apply-templates/></a>
+</xsl:template>
+<!-- make images relative -->
+<xsl:template match="img">
+	<img>
+		<xsl:apply-templates select="@*"/>
+		<xsl:attribute name="src"><xsl:value-of select="concat($base,@src)"/></xsl:attribute>
+	</img>
 </xsl:template>
 
 <!-- Copy all and apply templates -->

Added: cocoon/blocks/supported/portal/trunk/samples/styles/save-user-profile.xsl
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/styles/save-user-profile.xsl?view=auto&rev=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/styles/save-user-profile.xsl (added)
+++ cocoon/blocks/supported/portal/trunk/samples/styles/save-user-profile.xsl Fri Apr  8 12:08:45
2005
@@ -0,0 +1,20 @@
+<xsl:stylesheet version="1.0" 
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:source="http://apache.org/cocoon/source/1.0" 
+	xmlns:session="http://apache.org/cocoon/session/1.0"
+	>
+
+	<xsl:param name="profiles"/>
+
+  <xsl:template match="source:source">
+  	<xsl:copy><xsl:value-of select="$profiles"/><xsl:apply-templates/></xsl:copy>
+  </xsl:template>
+  
+  <xsl:template match="node()|@*" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>

Modified: cocoon/blocks/supported/portal/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/tools/plugins/copletManagement/sitemap.xmap?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
(original)
+++ cocoon/blocks/supported/portal/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
Fri Apr  8 12:08:45 2005
@@ -38,6 +38,9 @@
      
      <map:match pattern="save-user-profile">
         <map:generate src="context://samples/blocks/portal/resources/save-user-profile.xml"/>
+				<map:transform src="context://samples/blocks/portal/styles/save-user-profile.xsl">
+					<map:parameter name="profiles" value="context://samples/blocks/portal/profiles/"/>
+				</map:transform>
         <map:transform type="session"/>
         <map:transform type="write-source"/>
         <map:serialize type="xml"/>
@@ -78,7 +81,8 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-          <map:parameter name="base" value="{global:base}" />
+					<map:parameter name="base" value="{portalpath:relative}"/>
+					<map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html" />
       </map:match>
@@ -97,7 +101,8 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-          <map:parameter name="base" value="{global:base}" />
+					<map:parameter name="base" value="{portalpath:relative}"/>
+					<map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html" />
       </map:match>
@@ -114,7 +119,8 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-          <map:parameter name="base" value="{global:base}" />
+					<map:parameter name="base" value="{portalpath:relative}"/>
+					<map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html" />
       </map:match>
@@ -130,13 +136,6 @@
       
       <map:match pattern="*.continue">
         <map:call continuation="{1}" />
-      </map:match>
-      
-      <map:match pattern="save-user-profile">
-        <map:generate src="context:/mobi/ressources/save-user-profile.xml"/>
-        <map:transform type="session"/>
-        <map:transform type="write-source"/>
-        <map:serialize type="xml"/>
       </map:match>
       
       <map:match pattern="*">

Modified: cocoon/blocks/supported/portal/trunk/samples/tools/plugins/userManagement/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/tools/plugins/userManagement/sitemap.xmap?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/tools/plugins/userManagement/sitemap.xmap
(original)
+++ cocoon/blocks/supported/portal/trunk/samples/tools/plugins/userManagement/sitemap.xmap
Fri Apr  8 12:08:45 2005
@@ -66,7 +66,8 @@
 				<map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
 				<map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
 				<map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-					<map:parameter name="base" value="{global:base}" />
+					<map:parameter name="base" value="{portalpath:relative}"/>
+					<map:parameter name="title" value="{global:toolsTitle}"/>
 				</map:transform>
 				<map:serialize type="html" />
 			</map:match>

Modified: cocoon/blocks/supported/portal/trunk/samples/tools/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/samples/tools/sitemap.xmap?view=diff&r1=160585&r2=160586
==============================================================================
--- cocoon/blocks/supported/portal/trunk/samples/tools/sitemap.xmap (original)
+++ cocoon/blocks/supported/portal/trunk/samples/tools/sitemap.xmap Fri Apr  8 12:08:45 2005
@@ -45,7 +45,7 @@
 <!-- select skin to use -->
     <map:component-configurations>
       <map:global-variables>
-		<base>http://localhost:8888/samples/blocks/portal/</base>
+      	
       </map:global-variables>
 
     </map:component-configurations>
@@ -75,7 +75,8 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-			<map:parameter name="base" value="{global:base}"/>
+					<map:parameter name="base" value="{portalpath:relative}"/>
+					<map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html"></map:serialize>
       </map:match>
@@ -91,7 +92,8 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-			<map:parameter name="base" value="{global:base}"/>
+					<map:parameter name="base" value="{portalpath:relative}"/>
+					<map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html"></map:serialize>
       </map:match>



Mime
View raw message