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 2004/03/24 21:46:20 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/content/authoring create.xsp
gregor 2004/03/24 12:46:20
Modified: src/webapp/lenya/pubs/blog usecase-create.xmap
Added: src/webapp/lenya/pubs/blog/lenya/xslt/authoring create.xsl
src/webapp/lenya/pubs/blog/lenya/content/authoring
create.xsp
Removed: src/webapp/lenya/pubs/blog/xslt create.xsl
src/webapp/lenya/pubs/blog/content create.xsp
Log:
when will people finally use the proper location for files? geez.
Revision Changes Path
1.4 +3 -3 cocoon-lenya/src/webapp/lenya/pubs/blog/usecase-create.xmap
Index: usecase-create.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/usecase-create.xmap,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- usecase-create.xmap 13 Mar 2004 12:31:32 -0000 1.3
+++ usecase-create.xmap 24 Mar 2004 20:46:20 -0000 1.4
@@ -46,8 +46,8 @@
<map:match pattern="authoring/feeds/*/index.html">
<map:match type="usecase" pattern="create">
<map:match type="step" pattern="showscreen">
- <map:generate type="serverpages" src="content/create.xsp"/>
- <map:transform src="xslt/create.xsl"/>
+ <map:generate type="serverpages" src="lenya/content/authoring/create.xsp"/>
+ <map:transform src="lenya/xslt/authoring/create.xsl"/>
<map:call resource="style-cms-page"/>
</map:match>
1.1 cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/xslt/authoring/create.xsl
Index: create.xsl
===================================================================
<?xml version="1.0"?>
<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: create.xsl,v 1.1 2004/03/24 20:46:20 gregor Exp $ -->
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:session="http://www.apache.org/xsp/session/2.0"
xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
>
<xsl:template match="/">
<page:page>
<page:title>New Entry</page:title>
<page:body>
<div class="lenya-box">
<div class="lenya-box-title">New Entry</div>
<div class="lenya-box-body">
<xsl:apply-templates select="parent-child"/>
</div>
</div>
</page:body>
</page:page>
</xsl:template>
<xsl:template match="parent-child">
<xsl:apply-templates select="exception"/>
<xsl:if test="not(exception)">
<p>
<form method="POST" action="{/parent-child/referer}">
<input type="hidden" name="parentid" value="{/parent-child/parentid}"/>
<input type="hidden" name="lenya.usecase" value="create"/>
<input type="hidden" name="lenya.step" value="execute"/>
<input type="hidden" name="childtype" value="{/parent-child/childtype}"/>
<input type="hidden" name="doctype" value="{/parent-child/doctype}"/>
<input type="hidden" name="childname" value="Levi"/>
<table>
<tr>
<td>id:</td><td><input type="text" name="childid"/></td>
</tr>
<tr>
<td>title:</td><td><input type="text" name="title"/></td>
</tr>
</table>
<input type="submit" value="Create"/>   
<input type="button" onClick="location.href='{/parent-child/referer}';" value="Cancel"/>
</form>
</p>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/content/authoring/create.xsp
Index: create.xsp
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: create.xsp,v 1.2 2004/03/13 12:31:31 gregor Exp $ -->
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
>
<parent-child>
<xsp:logic>
String status = <xsp-request:get-parameter name="status"/>;
// Get the parentId
String parentId = "";
<!--
String parentId = <xsp-request:get-parameter name="parent-uri"/>; // get it from the query-string
-->
if (parentId == null) {
parentId = <input:get-attribute module="page-envelope" as="string" name="document-id"/>;
parentId = parentId.substring(0, parentId.length()-"/index".length());
}
// Get doctype
String doctype = <xsp-request:get-parameter name="doctype"/>; // get it from the query-string
if (doctype == null) {
doctype = "default";
}
if ((status != null) && (status.equals("failed"))) {
<xsp:content><exception/></xsp:content>
}
</xsp:logic>
<parentid><xsp:expr>parentId</xsp:expr></parentid>
<referer><xsp-request:get-uri/></referer>
<doctype><xsp:expr>doctype</xsp:expr></doctype>
<childtype>leaf</childtype>
</parent-child>
</xsp:page>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org