| <?xml version="1.0"?> |
| <!-- |
| 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: 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> |
| |
| <xsp:logic> |
| String documentId = <input:get-attribute module="page-envelope" as="string" name="context-prefix"/> + "/" + <input:get-attribute module="page-envelope" as="string" name="publication-id"/> + "/authoring" + <input:get-attribute module="page-envelope" as="string" name="document-id"/> + "_" + <input:get-attribute module="page-envelope" as="string" name="document-language"/>; |
| String area = <input:get-attribute module="page-envelope" as="string" name="area"/>; |
| |
| Object documentObject = <input:get-attribute as="object" module="page-envelope" name="document"/>; |
| Document document = null; |
| String visible = null; |
| if (documentObject != null && !"".equals(documentObject)) { |
| document = (Document) documentObject; |
| |
| visible = <input:get-attribute module="doc-info" as="string"> |
| <input:param name="name"><xsp:expr>document.getPublication().getId() + ":" + document.getArea() + ":" + document.getUUID() + ":" + document.getLanguage() + ":visibleInNav"</xsp:expr></input:param> |
| </input:get-attribute>; |
| } |
| |
| boolean isDocument = false; |
| try { |
| if (document != null && document.exists()) { |
| isDocument = true; |
| } |
| } |
| catch (Exception e) { |
| throw new ProcessingException(e); |
| } |
| |
| |
| </xsp:logic> |
| |
| <menus> |
| <menu i18n:attr="name" name="File"> |
| <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 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> |
| </menu> |
| |
| <menu i18n:attr="name" name="Edit"> |
| |
| <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 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 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="?"> |
| <xsp:attribute name="checked"><xsp:expr>visible</xsp:expr></xsp:attribute> |
| <i18n:text>Visible in Navigation</i18n:text> |
| </item> |
| </block> |
| <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 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> |
| </block> |
| |
| </menu> |
| |
| <menu i18n:attr="name" name="Workflow"> |
| <block areas="authoring site"> |
| <item uc:usecase="workflow.submit" wf:event="submit" href="?"><i18n:text>workflow.submit</i18n:text></item> |
| <item uc:usecase="workflow.reject" wf:event="reject" href="?"><i18n:text>workflow.reject</i18n:text></item> |
| <item uc:usecase="workflow.publish" wf:event="publish" href="?"><i18n:text>workflow.publish</i18n:text></item> |
| <item uc:usecase="workflow.deactivate" wf:event="deactivate" href="?"><i18n:text>workflow.deactivate</i18n:text></item> |
| </block> |
| <block areas="authoring site"> |
| <item uc:usecase="workflow.multiWorkflow" href="?"><i18n:text>workflow.multiWorkflow</i18n:text></item> |
| </block> |
| </menu> |
| |
| <menu i18n:attr="name" name="Help"> |
| <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 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> |
| </menu> |
| </menus> |
| |
| </menu> |
| </xsp:page> |