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/01/14 01:58:23 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/xslt/formeditor sidebar.xsl
gregor 2004/01/13 16:58:23
Modified: src/webapp/lenya/pubs/blog/config/menus entry.xsp feed.xsp
archive.xsp
src/webapp/lenya/pubs/blog/lenya/xslt/formeditor sidebar.xsl
Log:
add support for editing of sidebar.
thanks to dale christ
Revision Changes Path
1.22 +0 -2 cocoon-lenya/src/webapp/lenya/pubs/blog/config/menus/entry.xsp
Index: entry.xsp
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/config/menus/entry.xsp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- entry.xsp 3 Dec 2003 12:58:28 -0000 1.21
+++ entry.xsp 14 Jan 2004 00:58:23 -0000 1.22
@@ -69,8 +69,6 @@
<menu name="Search" label="Search">
<block>
- <item><xsp:attribute name="href">http://www.google.com</xsp:attribute>Google</item>
- <item href="http://dict.leo.org">Translate E2G or G2E</item>
</block>
</menu>
1.10 +22 -20 cocoon-lenya/src/webapp/lenya/pubs/blog/config/menus/feed.xsp
Index: feed.xsp
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/config/menus/feed.xsp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- feed.xsp 17 Nov 2003 04:23:51 -0000 1.9
+++ feed.xsp 14 Jan 2004 00:58:23 -0000 1.10
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xsp:page
- language="java"
+
+<xsp:page
+ language="java"
xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-lenya="http://apache.org/cocoon/lenya/xsp/1.0"
@@ -9,11 +9,11 @@
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
>
-
+
<menu>
-
+
<xsp-lenya:util/>
-
+
<url-info>
<context-prefix><xsp-request:get-context-path/></context-prefix>
<publication-id><input:get-attribute module="page-envelope" as="string" name="publication-id"/></publication-id>
@@ -21,19 +21,21 @@
<document-id><input:get-attribute module="page-envelope" as="string" name="document-id"/></document-id>
<document-url><input:get-attribute module="page-envelope" as="string" name="document-url"/></document-url>
<!--
- <servlet-context-path><xsp:expr>publication.getServletContext().getCanonicalPath()</xsp:expr></servlet-context-path>
- <publication><input:get-attribute module="page-envelope" as="object" name="publication"/></publication>
+
+<servlet-context-path><xsp:expr>publication.getServletContext().getCanonicalPath()</xsp:expr></servlet-context-path>
+ <publication><input:get-attribute module="page-envelope" as="object"
+name="publication"/></publication>
-->
</url-info>
-
+
<!--
<live_uri>/index.html</live_uri>
-->
-
+
<tabs>
<tab label="info" show="false"/>
</tabs>
-
+
<menus>
<menu name="File" label="File">
<block>
@@ -41,30 +43,29 @@
</block>
<block>
<item uc:usecase="edit" href="../../sidebar.html?lenya.step=open&form=sidebar">Edit Sidebar with Forms</item>
+ <item uc:usecase="publish" href="../../sidebar.html?sources=sidebar.xml&uris=sidebar.html&lenya.step=showscreen">Publish Sidebar</item>
</block>
<block>
<item><xsp:attribute name="href">?lenya.usecase=logout</xsp:attribute>Logout</item>
</block>
</menu>
-
+
<menu name="Search" label="Search">
<block>
- <item><xsp:attribute name="href">http://www.google.com</xsp:attribute>Google</item>
- <item href="http://dict.leo.org">Translate E2G or G2E</item>
</block>
</menu>
-
+
<menu name="Help" label="Help">
<block>
<item><xsp:attribute name="href"><xsp:expr>xsp_lenya_context</xsp:expr>/docs-new/docs/index.html</xsp:attribute>Documentation</item>
<item href="http://wiki.cocoondev.org/Wiki.jsp?page=Lenya">Wiki Documentation</item>
</block>
<block>
- <item><xsp:attribute name="href"><xsp-request:get-context-path/>/index.html</xsp:attribute>Apache Lenya Start Page</item>
- <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute>About Apache Lenya</item>
+ <item><xsp:attribute name="href"><xsp-request:get-context-path/>/index.html</xsp:attribute>Apache Lenya Start Page</item>
+ <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute>About Apache Lenya</item>
</block>
</menu>
-
+
<menu name="Debug" label="Debug">
<block>
<item href="index.xml">Feed</item>
@@ -76,7 +77,8 @@
</block>
</menu>
</menus>
-
+
</menu>
-
+
</xsp:page>
+
1.4 +0 -2 cocoon-lenya/src/webapp/lenya/pubs/blog/config/menus/archive.xsp
Index: archive.xsp
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/config/menus/archive.xsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- archive.xsp 17 Nov 2003 04:23:51 -0000 1.3
+++ archive.xsp 14 Jan 2004 00:58:23 -0000 1.4
@@ -43,8 +43,6 @@
<menu name="Search" label="Search">
<block>
- <item><xsp:attribute name="href">http://www.google.com</xsp:attribute>Google</item>
- <item href="http://dict.leo.org">Translate E2G or G2E</item>
</block>
</menu>
1.8 +24 -29 cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/xslt/formeditor/sidebar.xsl
Index: sidebar.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/xslt/formeditor/sidebar.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sidebar.xsl 6 Nov 2003 23:13:09 -0000 1.7
+++ sidebar.xsl 14 Jan 2004 00:58:23 -0000 1.8
@@ -1,39 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="../../../../../xslt/authoring/edit/form.xsl"/>
<xsl:template match="sidebar">
-<xsl:apply-templates select="block"/>
+ <xsl:apply-templates select="block"/>
+
+ <node name="Add Block">
+ <action><insert name="<xupdate:insert-after select="/sidebar/block"><xupdate:element name="block"><title>New title</title><content>New content</content></xupdate:element></xupdate:insert-after>"/></action>
+ </node>
</xsl:template>
<xsl:template match="block">
-<node name="Block">
- <action><insert name="<xupdate:insert-before select="/sidebar/block[@tagID='{@tagID}']"><xupdate:element name="block"><title>New title</title><content>New content</content></xupdate:element></xupdate:insert-before>"/></action>
-</node>
-<node name="Block">
- <action><delete name="<xupdate:remove select="/sidebar/block[@tagID='{@tagID}']"/>"/></action>
-</node>
-<node name="Title" select="/sidebar/block/title[@tagID='{title/@tagID}']">
- <content type="plain"><input type="text" name="<xupdate:update select="/sidebar/block/title[@tagID='{title/@tagID}']">" size="40"><xsl:attribute name="value"><xsl:value-of select="title" /></xsl:attribute></input></content>
-</node>
-<node name="Content" select="/sidebar/block/content[@tagID='{content/@tagID}']">
- <content type="mixed">
- <textarea name="<xupdate:update select="/sidebar/block/content[@tagID='{content/@tagID}']">" cols="40" rows="3">
- <xsl:copy-of select="content/node()"/>
-<!--
- <xsl:apply-templates select="content/node()" mode="mixedcontent"/>
--->
- </textarea>
- </content>
-
-<!--
- <content type="non-editable"><pre><xsl:copy-of select="content/@*|content/node()" /></pre></content>
--->
-</node>
+ <node name="Add Block">
+ <action><insert name="<xupdate:insert-before select="/sidebar/block[@tagID='{@tagID}']"><xupdate:element name="block"><title>New title</title><content>New content</content></xupdate:element></xupdate:insert-before>"/></action>
+ </node>
+ <node name="Delete Block">
+ <action><delete name="<xupdate:remove select="/sidebar/block[@tagID='{@tagID}']"/>"/></action>
+ </node>
+ <node name="Title" select="/sidebar/block/title[@tagID='{title/@tagID}']">
+ <content type="plain"><input type="text" name="<xupdate:update select="/sidebar/block/title[@tagID='{title/@tagID}']">" size="40"><xsl:attribute name="value"><xsl:value-of select="title"/></xsl:attribute></input></content>
+ </node>
+ <node name="Content" select="/sidebar/block/content[@tagID='{content/@tagID}']">
+ <content type="mixed">
+ <textarea name="<xupdate:update select="/sidebar/block/content[@tagID='{content/@tagID}']">" cols="40" rows="3">
+ <xsl:copy-of select="content/node()"/>
+ </textarea>
+ </content>
+ </node>
</xsl:template>
-</xsl:stylesheet>
+</xsl:stylesheet>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org