You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/02/10 07:01:02 UTC

svn commit: r153165 - in lenya/trunk/src/webapp/lenya: pubs/default/lenya/xslt/formeditor/xhtml-common.xsl usecases/edit/usecase-edit.xmap xslt/authoring/edit/form-layout.xsl

Author: gregor
Date: Wed Feb  9 22:01:01 2005
New Revision: 153165

URL: http://svn.apache.org/viewcvs?view=rev&rev=153165
Log:
Made images and asset titles visible in the forms editor. This resolves http://issues.apache.org/bugzilla/show_bug.cgi?id=29139

Modified:
    lenya/trunk/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl
    lenya/trunk/src/webapp/lenya/usecases/edit/usecase-edit.xmap
    lenya/trunk/src/webapp/lenya/xslt/authoring/edit/form-layout.xsl

Modified: lenya/trunk/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl?view=diff&r1=153164&r2=153165
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl (original)
+++ lenya/trunk/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl Wed Feb  9 22:01:01 2005
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 
-<!-- $Id: xhtml-common.xsl,v 1.4 2004/03/20 12:28:45 gregor Exp $ -->
+<!-- $Id$ -->
 
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -172,12 +172,12 @@
 </xsl:template>
 
   <xsl:template match="xhtml:object" mode="body">
-    <node name="Object" select="/*/xhtml:body/xhtml:p/xhtml:object[@tagID='{@tagID}']">
+    <node name="Object">
       <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:p/xhtml:object[@tagID='{@tagID}']&quot;/&gt;"/></action>
       <content>
 	<input type="text" name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:p/xhtml:object[@tagID='{@tagID}']&quot;&gt;" size="40">
 	  <xsl:attribute name="value">
-	    <xsl:copy-of select="."/>
+      <xsl:value-of select="@data"/>
 	  </xsl:attribute>
 	</input>
       </content>
@@ -188,14 +188,14 @@
   </xsl:template>
 
   <xsl:template match="lenya:asset" mode="body">
-    <node name="Asset" select="/*/xhtml:body/lenya:asset[@tagID='{@tagID}']">
+    <node name="Asset">
       <action>
 	<delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/lenya:asset[@tagID='{@tagID}']&quot;/&gt;"/>
       </action>
       <content>
 	<input type="text" name="&lt;xupdate:update select=&quot;/*/xhtml:body/lenya:asset[@tagID='{@tagID}']&quot;&gt;" size="40">
 	  <xsl:attribute name="value">
-	    <xsl:copy-of select="."/>
+	    <xsl:value-of select="@src"/>
 	  </xsl:attribute>
 	</input>
       </content>

Modified: lenya/trunk/src/webapp/lenya/usecases/edit/usecase-edit.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/usecases/edit/usecase-edit.xmap?view=diff&r1=153164&r2=153165
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/edit/usecase-edit.xmap (original)
+++ lenya/trunk/src/webapp/lenya/usecases/edit/usecase-edit.xmap Wed Feb  9 22:01:01 2005
@@ -82,10 +82,12 @@
               <map:transform src="{global:basedir}/xslt/authoring/edit/removeSourceTags.xsl"/>
               <map:transform src="{global:basedir}/pubs/{1}/lenya/xslt/formeditor/{request-param:form}.xsl">
                 <map:parameter name="docid" value="{page-envelope:document-path}"/>
+                <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
                 <map:parameter name="form" value="{request-param:form}"/>
               </map:transform>
               <map:transform src="fallback://lenya/xslt/authoring/edit/form-layout.xsl">
                 <map:parameter name="contextPrefix" value="{page-envelope:context-prefix}"/>
+                <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
                 <map:parameter name="wfevent" value="{request-param:lenya.event}"/>
               </map:transform>
               <map:call resource="style-cms-page"/>
@@ -111,6 +113,7 @@
                 </map:transform>
                 <map:transform src="fallback://lenya/xslt/authoring/edit/form-layout.xsl">
                   <map:parameter name="contextPrefix" value="{page-envelope:context-prefix}"/>
+                  <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
                   <map:parameter name="edit" value="{editSelect}"/>
                   <map:parameter name="wfevent" value="{request-param:lenya.event}"/>
                 </map:transform>

Modified: lenya/trunk/src/webapp/lenya/xslt/authoring/edit/form-layout.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/authoring/edit/form-layout.xsl?view=diff&r1=153164&r2=153165
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/authoring/edit/form-layout.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/authoring/edit/form-layout.xsl Wed Feb  9 22:01:01 2005
@@ -15,13 +15,15 @@
   limitations under the License.
 -->
 
-<!-- $Id: form-layout.xsl,v 1.19 2004/06/29 09:36:10 michi Exp $ -->
+<!-- $Id$ -->
 
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
 >
 
+<xsl:param name="nodeid" select="''"/>
+
 <xsl:param name="contextPrefix" select="'/lenya'"/>
 <xsl:param name="edit" select="'No node selected yet'"/>
 <xsl:param name="wfevent" select="'null'"/>
@@ -186,8 +188,15 @@
 </xsl:when>
 <xsl:otherwise>
   <p>
-    <xsl:value-of select="input/@value"/>
-    <xsl:copy-of select="textarea/node()"/>
+    <xsl:choose>
+      <xsl:when test="(../@name='Object')">
+        <img src="{$nodeid}/{input/@value}"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="input/@value"/>
+        <xsl:copy-of select="textarea/node()"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </p>
 </xsl:otherwise>
 </xsl:choose>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org