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 2006/11/19 12:07:27 UTC

svn commit: r476796 - in /lenya/trunk/src: pubs/blog/ pubs/blog/config/ac/ pubs/blog/config/ac/policies/admin/ pubs/blog/config/ac/policies/authoring/ pubs/blog/config/menus/ pubs/default/config/menus/ webapp/lenya/xslt/menu/

Author: andreas
Date: Sun Nov 19 03:07:26 2006
New Revision: 476796

URL: http://svn.apache.org/viewvc?view=rev&rev=476796
Log:
Menus: use @areas instead of @info=false etc., added some permissions for blog publication

Added:
    lenya/trunk/src/pubs/blog/config/menus/default.xsp
Modified:
    lenya/trunk/src/pubs/blog/config/ac/policies/admin/subtree-policy.acml
    lenya/trunk/src/pubs/blog/config/ac/policies/authoring/subtree-policy.acml
    lenya/trunk/src/pubs/blog/config/ac/usecase-policies.xml
    lenya/trunk/src/pubs/blog/menus.xmap
    lenya/trunk/src/pubs/default/config/menus/generic.xsp
    lenya/trunk/src/webapp/lenya/xslt/menu/filter-menu.xsl
    lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl

Modified: lenya/trunk/src/pubs/blog/config/ac/policies/admin/subtree-policy.acml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/config/ac/policies/admin/subtree-policy.acml?view=diff&rev=476796&r1=476795&r2=476796
==============================================================================
--- lenya/trunk/src/pubs/blog/config/ac/policies/admin/subtree-policy.acml (original)
+++ lenya/trunk/src/pubs/blog/config/ac/policies/admin/subtree-policy.acml Sun Nov 19 03:07:26 2006
@@ -23,5 +23,4 @@
   <group id="admin">
     <role id="visit" method="grant"/>
   </group>
-
 </policy> 

Modified: lenya/trunk/src/pubs/blog/config/ac/policies/authoring/subtree-policy.acml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/config/ac/policies/authoring/subtree-policy.acml?view=diff&rev=476796&r1=476795&r2=476796
==============================================================================
--- lenya/trunk/src/pubs/blog/config/ac/policies/authoring/subtree-policy.acml (original)
+++ lenya/trunk/src/pubs/blog/config/ac/policies/authoring/subtree-policy.acml Sun Nov 19 03:07:26 2006
@@ -19,9 +19,10 @@
 <!-- $Id$ -->
 
 <policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
   <group id="admin">
     <role id="edit" method="grant"/>
   </group>
-
+  <group id="admin">
+    <role id="visit" method="grant"/>
+  </group>
 </policy> 

Modified: lenya/trunk/src/pubs/blog/config/ac/usecase-policies.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/config/ac/usecase-policies.xml?view=diff&rev=476796&r1=476795&r2=476796
==============================================================================
--- lenya/trunk/src/pubs/blog/config/ac/usecase-policies.xml (original)
+++ lenya/trunk/src/pubs/blog/config/ac/usecase-policies.xml Sun Nov 19 03:07:26 2006
@@ -24,4 +24,5 @@
   <usecase id="editors.forms"><role id="edit" method="grant"/></usecase>
   <usecase id="workflow.publish"><role id="edit" method="grant"/></usecase>
   <usecase id="ac.logout"><role id="edit" method="grant"/></usecase>
+  <usecase id="admin.users"><role id="edit" method="grant"/></usecase>
 </usecases>

Added: lenya/trunk/src/pubs/blog/config/menus/default.xsp
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/config/menus/default.xsp?view=auto&rev=476796
==============================================================================
--- lenya/trunk/src/pubs/blog/config/menus/default.xsp (added)
+++ lenya/trunk/src/pubs/blog/config/menus/default.xsp Sun Nov 19 03:07:26 2006
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  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
+
+  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: feed.xsp 473861 2006-11-12 03:51:14Z gregor $ -->
+ 
+<xsp:page
+  language="java"
+  xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
+  xmlns:xsp="http://apache.org/xsp"
+  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
+  xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
+  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+  xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
+>
+ 
+<menu>
+
+  <tabs>
+    <tab label="info" show="false"/>
+  </tabs>
+ 
+  <menus>
+    <menu i18n:attr="name" name="File">
+
+      <block>
+        <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
+      </block>
+    </menu>
+
+    <menu i18n:attr="name" name="Help">
+      <block>
+        <item href="http://lenya.apache.org/1_4/index.html"><i18n:text>Documentation</i18n:text></item>
+        <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
+      </block>
+      <block>
+          <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute>About&#160;Apache&#160;Lenya</item>
+      </block>
+    </menu>
+
+    <menu i18n:attr="name" name="Debug">
+      <block>
+        <item href="index.xml"><i18n:text>Echo/Atom Feed</i18n:text></item>
+        <item href="index.rss"><i18n:text>RSS Feed</i18n:text></item>
+        <item href="lenya-page-body.xml"><i18n:text>Body</i18n:text></item>
+        <item href="index.html.lenyamenu"><i18n:text>Lenya Menu XSLT</i18n:text></item>
+      </block>
+      <block>
+        <item href="/lenya/blog/atomapi/">introspection</item>
+        <item href="/lenya/blog/atomapi/search?atom-all">atom-all</item>
+      </block>
+    </menu>
+
+  </menus>
+ 
+</menu>
+ 
+</xsp:page>
+

Modified: lenya/trunk/src/pubs/blog/menus.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/menus.xmap?view=diff&rev=476796&r1=476795&r2=476796
==============================================================================
--- lenya/trunk/src/pubs/blog/menus.xmap (original)
+++ lenya/trunk/src/pubs/blog/menus.xmap Sun Nov 19 03:07:26 2006
@@ -39,6 +39,10 @@
         <map:generate type="serverpages" src="config/menus/entry.xsp"/>
         <map:serialize type="xml"/>
       </map:match>
+      <map:match pattern="authoring/**.xml">
+        <map:generate type="serverpages" src="config/menus/default.xsp"/>
+        <map:serialize type="xml"/>
+      </map:match>
       <map:match pattern="live/**.xml">
         <map:generate type="serverpages" src="fallback://lenya/content/menus/live.xsp"/>
         <map:serialize type="xml"/>

Modified: lenya/trunk/src/pubs/default/config/menus/generic.xsp
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/config/menus/generic.xsp?view=diff&rev=476796&r1=476795&r2=476796
==============================================================================
--- lenya/trunk/src/pubs/default/config/menus/generic.xsp (original)
+++ lenya/trunk/src/pubs/default/config/menus/generic.xsp Sun Nov 19 03:07:26 2006
@@ -66,11 +66,11 @@
     
     <menus>
       <menu i18n:attr="name" name="File">
-        <block>
+        <block areas="authoring site">
           <item uc:usecase="sitemanagement.createLanguage" href="?"><i18n:text>New Language Version</i18n:text></item>
           <item uc:usecase="sitemanagement.deleteLanguage" href="?"><i18n:text>Remove Language Version</i18n:text></item>
         </block>
-        <block>
+        <block areas="authoring site admin">
           <item uc:usecase="admin.changePassword" href="?"><i18n:text>Change Password</i18n:text></item>
           <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
         </block>
@@ -78,19 +78,19 @@
       
       <menu i18n:attr="name" name="Edit">
         
-        <block info="false">
-          <item wf:event="edit" uc:usecase="tab.meta"><xsp:attribute name="href"><xsp-request:get-context-path/>/<input:get-attribute module="page-envelope" as="string" name="publication-id"/>/<input:get-attribute module="page-envelope" as="string" name="area"/><input:get-attribute module="page-envelope" as="string" name="document-url"/>?</xsp:attribute><i18n:text>Edit Metadata</i18n:text></item>
+        <block areas="authoring">
+          <item wf:event="edit" uc:usecase="tab.meta" href="?"><i18n:text>Edit Metadata</i18n:text></item>
           <item wf:event="edit" uc:usecase="sitemanagement.changeLabel" href="?"><i18n:text>Edit Navigation Title</i18n:text></item>
         </block>
 
-        <block authoring="false">
+        <block areas="site">
           <item uc:usecase="sitemanagement.cut" href="?"><i18n:text>Cut</i18n:text></item>
           <item uc:usecase="sitemanagement.copy" href="?"><i18n:text>Copy</i18n:text></item>
           <item uc:usecase="sitemanagement.paste" href="?"><i18n:text>Paste</i18n:text></item>
         </block>
         
         
-      <block authoring="false">
+      <block areas="site">
         <item uc:usecase="sitemanagement.changeNodeID" href="?"><i18n:text>Rename URL</i18n:text></item>
         <item uc:usecase="sitemanagement.changeLabel" href="?"><i18n:text>Edit Navigation Title</i18n:text></item>
         <item uc:usecase="sitemanagement.changeVisibility" href="?">
@@ -98,11 +98,11 @@
           <i18n:text>Visible in Navigation</i18n:text>
         </item>
       </block>
-      <block authoring="false">
+      <block areas="site">
         <item uc:usecase="sitetree.nudge" href="?direction=up"><i18n:text>Move Up</i18n:text></item>
         <item uc:usecase="sitetree.nudge" href="?direction=down"><i18n:text>Move Down</i18n:text></item>
       </block>
-      <block authoring="false">
+      <block areas="site">
         <item uc:usecase="sitemanagement.delete" href="?"><i18n:text>Delete</i18n:text></item>
         <item uc:usecase="sitemanagement.archive" href="?"><i18n:text>Archive</i18n:text></item>
         <item uc:usecase="sitemanagement.restore" href="?"><i18n:text>Restore</i18n:text></item>
@@ -111,7 +111,7 @@
       </menu>
       
       <menu i18n:attr="name" name="Workflow">
-        <block>
+        <block areas="authoring site">
           <item uc:usecase="workflow.submit" wf:event="submit" href="?"><i18n:text>Submit</i18n:text></item>
           <item uc:usecase="workflow.reject" wf:event="reject" href="?"><i18n:text>Reject</i18n:text></item>
           <item uc:usecase="workflow.publish" wf:event="publish" href="?"><i18n:text>Publish</i18n:text></item>
@@ -120,11 +120,11 @@
       </menu>
 
       <menu i18n:attr="name" name="Help">
-        <block>
-        <item href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></item>
-        <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
+        <block areas="authoring site admin">
+          <item href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></item>
+          <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
         </block>
-        <block>
+        <block areas="authoring site admin">
           <item><xsp:attribute name="href"><xsp-request:get-context-path/>/index.html</xsp:attribute><i18n:text>Apache Lenya Homepage</i18n:text></item>
           <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute><i18n:text>About Apache Lenya</i18n:text></item>
         </block>

Modified: lenya/trunk/src/webapp/lenya/xslt/menu/filter-menu.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/menu/filter-menu.xsl?view=diff&rev=476796&r1=476795&r2=476796
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/menu/filter-menu.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/menu/filter-menu.xsl Sun Nov 19 03:07:26 2006
@@ -37,9 +37,13 @@
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:template match="menu:block[(@info = 'false' and $currentTab = 'site') or (@*[local-name() = $currentTab] = 'false' and $currentTab != 'site')]"/>
-
-  <xsl:template match="menu:item[(@info = 'false' and $currentTab = 'site') or (@*[local-name() = $currentTab] = 'false' and $currentTab != 'site')]"/>
+  <xsl:template match="menu:block">
+    <xsl:if test="not(@areas) or contains(@areas, $currentTab)">
+      <xsl:copy>
+        <xsl:apply-templates select="@*|node()"/>
+      </xsl:copy>
+    </xsl:if>
+  </xsl:template>
 
   <xsl:template match="@*|node()">
     <xsl:copy>

Modified: lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl?view=diff&rev=476796&r1=476795&r2=476796
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl Sun Nov 19 03:07:26 2006
@@ -63,21 +63,15 @@
         <!-- ADMIN TAB -->
         <xsl:if test="not(menu:tabs/menu:tab[@label = 'admin']/@show = 'false')">
           <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area">admin</xsl:with-param>
+            <xsl:with-param name="tab-area">authoring</xsl:with-param>
             <xsl:with-param name="tabName">admin</xsl:with-param>
+            <xsl:with-param name="queryString">?lenya.usecase=admin.users</xsl:with-param>
           </xsl:call-template>
         </xsl:if>
           
-        <xsl:variable name="info-area">
-          <xsl:choose>
-            <xsl:when test="$area = 'admin'">authoring</xsl:when>
-            <xsl:otherwise><xsl:value-of select="$area"/></xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-          
         <xsl:if test="not(menu:tabs/menu:tab[@label = 'info']/@show = 'false')">
           <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area" select="$info-area"/>
+            <xsl:with-param name="tab-area">authoring</xsl:with-param>
             <xsl:with-param name="queryString">?lenya.usecase=tab.overview</xsl:with-param>
             <xsl:with-param name="tabName">site</xsl:with-param>
           </xsl:call-template>



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