cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jer...@apache.org
Subject svn commit: r160572 - in cocoon/branches/BRANCH_2_1_X/src/blocks/portal: conf/ 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 17:58:56 GMT
Author: jeremy
Date: Fri Apr  8 10:58:54 2005
New Revision: 160572

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

Added:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/projectpath.xconf
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/styles/save-user-profile.xsl
Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/resources/save-user-profile.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/sitemap.xmap
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/common/styles/portal-page.xsl
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/sitemap.xmap

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/projectpath.xconf
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/projectpath.xconf?view=auto&rev=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/projectpath.xconf (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/projectpath.xconf Fri Apr  8 10:58:54
2005
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xconf xpath="/cocoon/input-modules" 
+       unless="component-instance[@name='portalpath']">
+    <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>
+</xconf>
\ No newline at end of file

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/resources/save-user-profile.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/resources/save-user-profile.xml?view=diff&r1=160571&r2=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/resources/save-user-profile.xml
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/resources/save-user-profile.xml
Fri Apr  8 10:58:54 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/branches/BRANCH_2_1_X/src/blocks/portal/samples/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/sitemap.xmap?view=diff&r1=160571&r2=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/sitemap.xmap (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/sitemap.xmap Fri Apr  8 10:58:54
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/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl?view=diff&r1=160571&r2=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl
Fri Apr  8 10:58:54 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/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/common/styles/portal-page.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/common/styles/portal-page.xsl?view=diff&r1=160571&r2=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/common/styles/portal-page.xsl
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/skins/common/styles/portal-page.xsl
Fri Apr  8 10:58:54 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/branches/BRANCH_2_1_X/src/blocks/portal/samples/styles/save-user-profile.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/styles/save-user-profile.xsl?view=auto&rev=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/styles/save-user-profile.xsl (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/styles/save-user-profile.xsl Fri
Apr  8 10:58:54 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/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap?view=diff&r1=160571&r2=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap
Fri Apr  8 10:58:54 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/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap?view=diff&r1=160571&r2=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap
Fri Apr  8 10:58:54 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/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/sitemap.xmap?view=diff&r1=160571&r2=160572
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/sitemap.xmap (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/tools/sitemap.xmap Fri Apr  8 10:58:54
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