You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2003/08/07 18:29:48 UTC

cvs commit: cocoon-lenya/src/webapp/lenya/pubs/oscom usecase-edit.xmap

michi       2003/08/07 09:29:48

  Added:       src/webapp/lenya/pubs/oscom/xslt/matrix/authoring
                        editWithForms.xsl
               src/webapp/lenya/pubs/oscom usecase-edit.xmap
  Log:
  Form Editor implemented into OSCOM pub
  
  Revision  Changes    Path
  1.1                  cocoon-lenya/src/webapp/lenya/pubs/oscom/xslt/matrix/authoring/editWithForms.xsl
  
  Index: editWithForms.xsl
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  
  <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  >
  
  <xsl:param name="projectid"/>
  
  <xsl:template match="/">
  <html>
  <body>
  Edit Document <xsl:value-of select="$projectid"/>
  <form method="post" action="?lenya.usecase=edit&amp;lenya.step=close">
  <table>
  <tr>
    <td>Project Name</td><td><input type="text" name="system_name" size="40"><xsl:attribute name="value"><xsl:value-of select="/system/system_name" /></xsl:attribute></input></td>
  </tr>
  <tr>
    <td valign="top">Description</td><td><textarea name="description" cols="40" rows="5"><xsl:value-of select="/system/description" /></textarea></td>
  </tr>
  <!--
  <xsl:apply-templates select="/system"/>
  -->
  <tr>
    <td colspan="2" align="right"><input type="submit" value="SAVE" name="save"/><input type="submit" value="CANCEL" name="cancel"/></td>
  </tr>
  </table>
  </form>
  </body>
  </html>
  </xsl:template>
   
  </xsl:stylesheet>  
  
  
  
  1.1                  cocoon-lenya/src/webapp/lenya/pubs/oscom/usecase-edit.xmap
  
  Index: usecase-edit.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- CVS: $Id: usecase-edit.xmap,v 1.1 2003/08/07 16:29:48 michi Exp $ -->
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
    <map:components>
      <map:actions>
        <map:action name="save" logger="sitemap.action.save" src="org.apache.lenya.cms.cocoon.acting.HTMLFormSaveAction" />
      </map:actions>
    </map:components>
  
    <map:views />
  
    <map:resources />
  
    <map:pipelines>
  
      <map:pipeline>
        <map:match pattern="edit" type="usecase">
          <map:match pattern="open" type="step">
            <map:match pattern="authoring/matrix/*.html">
              <map:generate src="content/authoring/matrix/{1}.xml"/>
              <map:transform src="xslt/matrix/authoring/editWithForms.xsl">
                <map:parameter name="projectid" value="{1}"/>
              </map:transform>
              <map:serialize type="html" />
            </map:match>
          </map:match>
  
          <map:match pattern="close" type="step">
            <map:match pattern="authoring/matrix/*.html">
              <map:act type="save">
                <map:parameter name="file" value="content/authoring/matrix/{1}.xml"/>
                <!-- FIXME: Error Message -->
                <map:redirect-to uri="/lenya/index.html" />
              </map:act>
              <map:redirect-to uri="{1}.html" />
            </map:match>
          </map:match>
        </map:match>
      </map:pipeline>
  
    </map:pipelines>
  </map:sitemap>
  
  
  

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