You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/02/13 21:30:30 UTC

svn commit: r627584 - in /lenya/sandbox/modules/propertiesdocument: config/menu.xml config/menu.xsp menus.xmap

Author: andreas
Date: Wed Feb 13 12:30:27 2008
New Revision: 627584

URL: http://svn.apache.org/viewvc?rev=627584&view=rev
Log:
Converted module menu from XSP to XML.

Added:
    lenya/sandbox/modules/propertiesdocument/config/menu.xml
      - copied, changed from r595679, lenya/sandbox/modules/propertiesdocument/config/menu.xsp
Removed:
    lenya/sandbox/modules/propertiesdocument/config/menu.xsp
    lenya/sandbox/modules/propertiesdocument/menus.xmap

Copied: lenya/sandbox/modules/propertiesdocument/config/menu.xml (from r595679, lenya/sandbox/modules/propertiesdocument/config/menu.xsp)
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/propertiesdocument/config/menu.xml?p2=lenya/sandbox/modules/propertiesdocument/config/menu.xml&p1=lenya/sandbox/modules/propertiesdocument/config/menu.xsp&r1=595679&r2=627584&rev=627584&view=diff
==============================================================================
--- lenya/sandbox/modules/propertiesdocument/config/menu.xsp (original)
+++ lenya/sandbox/modules/propertiesdocument/config/menu.xml Wed Feb 13 12:30:27 2008
@@ -6,9 +6,9 @@
   The ASF licenses this file to You 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
-
+  
+  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.
@@ -16,47 +16,14 @@
   limitations under the License.
 -->
 
-<!-- $Id: generic.xsp 155806 2005-03-01 17:55:42Z andreas $ -->
-
-<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"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-    xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
->
-
-  <xsp:structure>
-    <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
-    <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
-  </xsp:structure>
-  
-  <menu>
-
-    <menus>
-      <menu i18n:attr="name" name="Edit">
-        <xsp:logic>
-          try {
-              Object doc = <input:get-attribute module="page-envelope" as="object" name="document"/>;
-              if (doc instanceof Document &amp;&amp; ((Document) doc).exists()) {
-                  String doctype = <input:get-attribute module="page-envelope" as="string" name="document-type"/>;
-                  if ("properties".equals(doctype)) {
-                      <block areas="authoring">
-                        <item uc:usecase="editors.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
-                      </block>
-                  }
-              }
-          }
-          catch (Exception e) {
-              throw new ProcessingException("Error during menu generation: ", e);
-          }
-        </xsp:logic>
-      </menu>
-      
-    </menus>
-    
-  </menu>
-</xsp:page>
+<menu xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
+  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  <menus>
+    <menu i18n:attr="name" name="Edit">
+      <block areas="authoring" resourceTypes="properties">
+        <item uc:usecase="editors.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
+      </block>
+    </menu>
+  </menus>
+</menu>



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