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/11 18:02:17 UTC

cvs commit: cocoon-lenya/src/webapp/lenya/pubs/oscom/xslt/editor cmfs.xsl

michi       2003/08/11 09:02:17

  Modified:    src/webapp/lenya/pubs/oscom usecase-edit.xmap
               src/webapp/lenya/pubs/oscom/config/menus matrix.xsp
  Added:       src/webapp/lenya/pubs/oscom/xslt/editor cmfs.xsl
  Log:
  html form editor generalized
  
  Revision  Changes    Path
  1.5       +11 -19    cocoon-lenya/src/webapp/lenya/pubs/oscom/usecase-edit.xmap
  
  Index: usecase-edit.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/oscom/usecase-edit.xmap,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- usecase-edit.xmap	8 Aug 2003 16:16:06 -0000	1.4
  +++ usecase-edit.xmap	11 Aug 2003 16:02:16 -0000	1.5
  @@ -19,45 +19,37 @@
       <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:match pattern="authoring/**.html">
  +            <map:generate src="content/authoring/{1}.xml"/>
               <map:transform src="../../xslt/authoring/edit/numberTags.xsl"/>
               <map:transform src="../../xslt/authoring/edit/addSourceTags.xsl">
  -              <map:parameter name="source" value="work/editor/authoring/matrix/{1}.xml"/>
  +              <map:parameter name="source" value="work/editor/authoring/{1}.xml"/>
               </map:transform>
               <map:transform type="write-source"/>
               <map:transform src="../../xslt/authoring/edit/removeSourceTags.xsl"/>
  -            <map:transform src="xslt/matrix/authoring/editWithForms.xsl">
  -              <map:parameter name="projectid" value="{1}"/>
  +            <map:transform src="xslt/editor/{request-param:doctype}.xsl">
  +              <map:parameter name="docid" value="{1}"/>
               </map:transform>
               <map:serialize type="html" />
             </map:match>
           </map:match>
   
  -<!--
  -        <map:match pattern="update" type="step">
  -          <map:match pattern="authoring/matrix/*.html">
  -            <map:redirect-to uri="{1}.html" />
  -          </map:match>
  -        </map:match>
  --->
  -
           <map:match pattern="close" type="step">
  -          <map:match pattern="authoring/matrix/*.html">
  +          <map:match pattern="authoring/**/*.html">
               <map:act type="save">
  -              <map:parameter name="file" value="work/editor/authoring/matrix/{1}.xml"/>
  +              <map:parameter name="file" value="work/editor/authoring/{1}/{2}.xml"/>
                 <!-- FIXME: Error Message -->
                 <map:redirect-to uri="/lenya/index.html" />
               </map:act>
   
  -            <map:generate src="work/editor/authoring/matrix/{1}.xml"/>
  +            <map:generate src="work/editor/authoring/{1}/{2}.xml"/>
               <map:transform src="../../xslt/authoring/edit/unnumberTags.xsl"/>
               <map:transform src="../../xslt/authoring/edit/addSourceTags.xsl">
  -              <map:parameter name="source" value="content/authoring/matrix/{1}.xml"/>
  +              <map:parameter name="source" value="content/authoring/{1}/{2}.xml"/>
               </map:transform>
               <map:transform type="write-source"/>
               <map:transform src="../../xslt/authoring/edit/redirect-to.xsl">
  -              <map:parameter name="uri" value="{1}.html"/>
  +              <map:parameter name="uri" value="{2}.html"/>
               </map:transform>
               <map:serialize type="html" />
             </map:match>
  
  
  
  1.21      +1 -1      cocoon-lenya/src/webapp/lenya/pubs/oscom/config/menus/matrix.xsp
  
  Index: matrix.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/oscom/config/menus/matrix.xsp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- matrix.xsp	7 Aug 2003 16:29:01 -0000	1.20
  +++ matrix.xsp	11 Aug 2003 16:02:16 -0000	1.21
  @@ -35,7 +35,7 @@
       <menu name="File" label="File">
         <block>
           <item><xsp:attribute name="href"><xsp:expr>xsp_lenya_context_prefix+"/authoring/xopus2/matrix/"+projectid+".html"</xsp:expr>?documentid=matrix/<xsp:expr>projectid+".xml"</xsp:expr></xsp:attribute>Edit&#160;with&#160;Xopus2</item>
  -        <item uc:usecase="edit" href="?lenya.step=open">Edit&#160;with&#160;Forms</item>
  +        <item uc:usecase="edit" href="?lenya.step=open&amp;doctype=cmfs">Edit&#160;with&#160;Forms</item>
           <item><xsp:attribute name="href"><xsp:expr>xsp_lenya_context_prefix+"/authoring/matrix/"+projectid+".html"</xsp:expr>?lenya.usecase=rollback&amp;lenya.step=showscreen&amp;documentid=matrix/<xsp:expr>projectid+".xml"</xsp:expr></xsp:attribute>Rollback</item>
           <item><xsp:attribute name="href"><xsp:expr>xsp_lenya_context_prefix+"/authoring/lenya/publishScreen?uris=/lenya/oscom/matrix/"+projectid+".html,/lenya/oscom/matrix/index.html&amp;sources=/matrix/"+projectid+".xml"</xsp:expr></xsp:attribute>Publish</item>
         </block>
  
  
  
  1.1                  cocoon-lenya/src/webapp/lenya/pubs/oscom/xslt/editor/cmfs.xsl
  
  Index: cmfs.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="docid"/>
  
  <xsl:template match="/">
  <html>
  <body>
  Edit Document <xsl:value-of select="$docid"/>
  <form method="post" action="?lenya.usecase=edit&amp;lenya.step=close">
  <table>
  <tr>
    <td>Project Name</td><td><input type="text" name="element./system/system_name[{/system/system_name/@tagID}]" 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="element./system/description[{/system/description/@tagID}]" cols="40" rows="5"><xsl:value-of select="/system/description" /></textarea></td>
  </tr>
  <xsl:apply-templates select="/system/features/feature"/>
  <!--
  <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:template match="feature">
  <tr>
    <td>Feature Title</td><td><input type="text" name="element./system/features/feature/title[{title/@tagID}]" size="40"><xsl:attribute name="value"><xsl:value-of select="title" /></xsl:attribute></input></td>
  </tr>
  </xsl:template>
   
  </xsl:stylesheet>  
  
  
  

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