forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r354411 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking: internal.xmap resources/stylesheets/writeResult-to-acknowledgement.xsl resources/themes/common/html/content-noteTaking.ft
Date Tue, 06 Dec 2005 12:14:58 GMT
Author: rgardler
Date: Tue Dec  6 04:14:41 2005
New Revision: 354411

URL: http://svn.apache.org/viewcvs?rev=354411&view=rev
Log:
add a results page when saving a note

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/stylesheets/writeResult-to-acknowledgement.xsl
  (with props)
Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/internal.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/themes/common/html/content-noteTaking.ft

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/internal.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/internal.xmap?rev=354411&r1=354410&r2=354411&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/internal.xmap
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/internal.xmap
Tue Dec  6 04:14:41 2005
@@ -39,14 +39,16 @@
 
     <map:pipeline>
 
-      <map:match pattern="noteTaking/do/addNote">
+      <map:match pattern="noteTaking/do/addNote.xml">
         <map:generate type="request"/>
         <map:transform src="{lm:noteTaking.transform.postedNotes.sourceWriterNotes}">
           <map:parameter name="notesFile" value="{project:noteTaking.repository.URL}{project:noteTaking.filename}"/>
         </map:transform>
         <map:transform type="write-source"/>
-<!-- FIXME: return to a logical page -->
-        <map:serialize type="xml"/>
+        <map:transform src="{lm:noteTaking.transform.writeResult.acknowledgement}">
+          <map:parameter name="use-request-parameters" value="true"/>
+        </map:transform>
+        <map:serialize type="xml-document"/>
       </map:match>
 
       <map:match pattern="noteTaking/do/getNotes">

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/stylesheets/writeResult-to-acknowledgement.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/stylesheets/writeResult-to-acknowledgement.xsl?rev=354411&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/stylesheets/writeResult-to-acknowledgement.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/stylesheets/writeResult-to-acknowledgement.xsl
Tue Dec  6 04:14:41 2005
@@ -0,0 +1,56 @@
+<?xml version='1.0'?>
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:dyn="http://exslt.org/dynamic">
+  
+  <!-- the page for which the note was added -->
+  <xsl:param name="path"/>
+  
+  <xsl:template match="sourceResult">
+    <xsl:choose>
+      <xsl:when test="execution='success'">
+        <xsl:call-template name="success"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="failure"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+  <xsl:template name="success">
+    <document>
+      <header>
+        <title>Note Written</title>
+      </header>
+      <body>
+        <p>Your note has been succesfully written. You can now continue to 
+        work.</p>
+        
+        <p>
+          <link>
+            <xsl:attribute name="href">/<xsl:value-of select="$path"/>.html</xsl:attribute>
+            Return to originating page.
+          </link>
+        </p>
+      </body>
+    </document>
+  </xsl:template>
+  
+  <xsl:template name="failure">
+    <document>
+      <header>
+        <title>Failed Note Written</title>
+      </header>
+      <body>
+        <warning>There was an error recording your note.</warning>
+        
+        <p>
+          <link>
+            <xsl:attribute name="href">/<xsl:value-of select="$path"/>.html</xsl:attribute>
+            Return to originating page.
+          </link>
+        </p>
+      </body>
+    </document>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/stylesheets/writeResult-to-acknowledgement.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/themes/common/html/content-noteTaking.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/themes/common/html/content-noteTaking.ft?rev=354411&r1=354410&r2=354411&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/themes/common/html/content-noteTaking.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.NoteTaking/resources/themes/common/html/content-noteTaking.ft
Tue Dec  6 04:14:41 2005
@@ -48,7 +48,7 @@
           </xsl:choose>
         </xsl:variable>
         
-        <form action="noteTaking/do/addNote" method="post">
+        <form action="noteTaking/do/addNote.html" method="post">
           <textarea name="note">
             <xsl:attribute name="cols">
               <xsl:value-of select="$content-noteTaking-cols/@value"/>



Mime
View raw message