You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2005/05/23 21:04:02 UTC
svn commit: r178023 [2/2] - in
/incubator/graffito/trunk/applications/browser: ./
src/java/org/apache/portals/graffito/portlets/
src/java/org/apache/portals/graffito/portlets/browser/
src/java/org/apache/portals/graffito/portlets/browser/actions/
src/java/org/apache/portals/graffito/portlets/browser/dto/
src/java/org/apache/portals/graffito/portlets/browser/resources/
src/java/org/apache/portals/graffito/portlets/browser/session/
src/webapp/WEB-INF/ src/webapp/kupu/
Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/dto/PermissionsDTO.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/dto/PermissionsDTO.java?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/dto/PermissionsDTO.java (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/dto/PermissionsDTO.java Mon May 23 14:04:00 2005
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.portlets.browser.dto;
+
+import java.security.Permissions;
+
+import org.apache.portals.graffito.model.CmsPermission;
+
+
+/**
+ * Information on the current cms object permissions.
+ * This is the DTO used between the velocity template and the portlet methods
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class PermissionsDTO
+{
+ /** Permissions assigned to the cms object */
+ private Permissions permissions;
+
+
+
+ public Permissions getPermissions()
+ {
+ return permissions;
+ }
+
+ public void setPermissions(Permissions permissions)
+ {
+ this.permissions = permissions;
+ }
+
+
+}
\ No newline at end of file
Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages.properties?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages.properties (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages.properties Mon May 23 14:04:00 2005
@@ -0,0 +1,79 @@
+javax.portlet.title = Graffito Content Browser
+javax.portlet.short-title = Content Browser
+javax.portlet.keywords = cms, document management
+help.title= Help Mode
+
+help.text.view = This Graffito portlet provides a browser of the portal content. Use the view mode to navigate across the content repository.
+help.text.edit = Use the edit mode to modify, add or delete folders & documents.
+
+div.path= You are in :
+div.newfolder= Add new folder in :
+div.updatefolder=Update folder :
+div.newdocument= Add new document in :
+div.updatedocument = Update Document :
+div.folders = Folders
+div.folder = Folder
+div.documents = Documents
+div.security = Apply access control in :
+div.server = Server
+div.permission = Permission
+
+div.newpermission= Add new permission for :
+
+edit.tab.select=Select
+edit.tab.type=Type
+edit.tab.name=Name
+edit.tab.title=Title
+edit.tab.description=Description
+edit.tab.creationdate=Creation Date
+edit.tab.modificationdate=Modification Date
+
+edit.tab.scope=Scope
+edit.tab.actions=Actions
+edit.tab.principals= Users - Groups - Roles
+
+
+field.name = Name
+field.title= Title
+field.description= Description
+field.type= Document Type
+field.owner = Owner
+field.language = Document Language
+field.permissionActions = Actions
+field.permissionAttributes = Scope
+field.permissionPrincipals = User - Group - Role
+
+link.addfolder= Add Folder
+link.adddocument = Add Document
+link.delete = Delete
+link.addPermission = Add Permission
+
+file.upload=Select a file to upload
+
+tab.folder-edit.children = Subfolders & Documents
+tab.folder-edit.metadata = Folder Info
+tab.document-edit.content= Document Content
+tab.document-edit.metadata = Document Info
+tab.security = Security
+
+info.nocontent= No content found in this folder.
+info.nopermission= No permission found
+error.servers=No content server found
+
+document.type.upload = Updload a Document
+document.type.text = Simple Text
+document.type.html = Html page
+document.type.news = Graffito News
+
+
+document.en = English
+document.fr = French
+
+permission.simple=Apply only on the current cms object
+permission.recursive=Apply on all documents & each subfolders
+permission.wildcard = Apply on this level (not on subfolders)
+
+permission.actions.all = All actions
+permission.actions.view = View
+permission.actions.edit = Edit
+permission.actions.insert = Insert
Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_en.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_en.properties?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_en.properties (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_en.properties Mon May 23 14:04:00 2005
@@ -0,0 +1,30 @@
+javax.portlet.title = Graffito Content Browser
+javax.portlet.short-title = Content Browser
+javax.portlet.keywords = cms, document management
+help.title = Help Mode
+
+help.text.view = This Graffito portlet provides a browser of the portal content. Use the view mode to navigate across the content repository.
+help.text.edit = Use the edit mode to modity, add or delete folders & documents.
+
+
+div.path= You are in :
+div.newfolder= Add new folder in :
+div.updatefolder=Update folder :
+div.folders = Folders
+div.documents = Documents
+
+edit.tab.select=Select
+edit.tab.name=Name
+edit.tab.title=Title
+edit.tab.description=Description
+
+link.addfolder= Add Folder
+link.adddocument = Add Document
+link.delete = Delete
+
+tab.general=General
+tab.security=Security
+
+
+info.nocontent= No content found in this folder. Use the edit mode to add new content.
+error.servers=No content server found
Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_fr.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_fr.properties?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_fr.properties (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_fr.properties Mon May 23 14:04:00 2005
@@ -0,0 +1,26 @@
+javax.portlet.title = Navigateur de contenu
+javax.portlet.short-title = Navigateur
+javax.portlet.keywords = cms, gestion de contenu, gestion documentaire
+help.title = Aide
+help.text.view = Ce portlet affiche l'ensemble du contenu disponible dans ce portail. Utilisez le mode view pour naviguer dans le répertoire documentaire.
+help.text.edit = Utilisez le mode edit pour ajouter, modifier ou effacer des documents et répertoires.
+
+div.path = Vous êtes dans
+div.newfolder= Ajout d'un nouveau répertoire dans
+div.folders = Répertoires
+div.documents = Documents
+
+edit.tab.select=Selection
+edit.tab.name=Nom
+edit.tab.title=Titre
+edit.tab.description=Description
+
+link.addfolder= Ajouter un répertoire
+link.adddocument = Ajouter un document
+link.delete = Supprimer
+
+tab.general=Information Générale
+tab.security=Securité
+
+info.nocontent= Ce répertoire n'a pas de contenu. Utilisez le mode d'édition pour gérer votre contenu.
+error.servers=Impossible de trouver un serveur de contenu
\ No newline at end of file
Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_ja.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_ja.properties?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_ja.properties (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/resources/messages_ja.properties Mon May 23 14:04:00 2005
@@ -0,0 +1,58 @@
+javax.portlet.title = Graffito \u30b3\u30f3\u30c6\u30f3\u30c4\u30d6\u30e9\u30a6\u30b6
+javax.portlet.short-title = \u30b3\u30f3\u30c6\u30f3\u30c4\u30d6\u30e9\u30a6\u30b6
+javax.portlet.keywords = CMS, \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u7ba1\u7406
+help.title = \u30d8\u30eb\u30d7\u30e2\u30fc\u30c9
+
+help.text.view = Graffito \u30dd\u30fc\u30c8\u30ec\u30c3\u30c8\u306f\u3001\u30dd\u30fc\u30bf\u30eb\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u3059\u3002\u30b3\u30f3\u30c6\u30f3\u30c4\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u306f\u8868\u793a\u30e2\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+help.text.edit = \u30d5\u30a9\u30eb\u30c0\u304a\u3088\u3073\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u30fb\u4fee\u6b63\u30fb\u524a\u9664\u3059\u308b\u305f\u3081\u306b\u306f\u7de8\u96c6\u30e2\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+
+
+div.path= \u73fe\u5728\u30d1\u30b9 :
+div.newfolder= \u65b0\u898f\u30d5\u30a9\u30eb\u30c0\u3092\u8ffd\u52a0\u3059\u308b\u30d1\u30b9 :
+div.updatefolder=\u66f4\u65b0\u5bfe\u8c61\u30d5\u30a9\u30eb\u30c0 :
+div.folders = \u30d5\u30a9\u30eb\u30c0
+div.documents = \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8
+div.newdocument= \u65b0\u898f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u30d1\u30b9 :
+div.updatedocument = \u66f4\u65b0\u5bfe\u8c61\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 :
+div.folder = \u30d5\u30a9\u30eb\u30c0
+div.server = \u30b5\u30fc\u30d0\u30fc
+
+edit.tab.select=\u9078\u629e
+edit.tab.name=\u540d\u524d
+edit.tab.title=\u30bf\u30a4\u30c8\u30eb
+edit.tab.description=\u8aac\u660e
+edit.tab.type=\u30bf\u30a4\u30d7
+edit.tab.creationdate=\u4f5c\u6210\u65e5\u6642
+edit.tab.modificationdate=\u4fee\u6b63\u65e5\u6642
+
+field.name = \u540d\u524d
+field.title= \u30bf\u30a4\u30c8\u30eb
+field.description= \u8aac\u660e
+field.type= \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30bf\u30a4\u30d7
+field.owner = \u6240\u6709\u8005
+field.language = \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u8a00\u8a9e
+
+link.addfolder= \u30d5\u30a9\u30eb\u30c0\u306e\u8ffd\u52a0
+link.adddocument = \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u8ffd\u52a0
+link.delete = \u524a\u9664
+
+file.upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e
+
+tab.general=\u5168\u822c
+tab.security=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3
+tab.folder-edit.children = \u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u3068\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8
+tab.folder-edit.metadata = \u30d5\u30a9\u30eb\u30c0\u60c5\u5831
+tab.document-edit.content= \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4
+tab.document-edit.metadata = \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u60c5\u5831
+
+info.nocontent= \u3053\u306e\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
+error.servers=\u30b3\u30f3\u30c6\u30f3\u30c4\u30b5\u30fc\u30d0\u30fc\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
+
+document.type.upload = \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
+document.type.text = \u30b7\u30f3\u30d7\u30eb\u30c6\u30ad\u30b9\u30c8
+document.type.html = HTML\u30da\u30fc\u30b8
+document.type.news = Graffito \u30cb\u30e5\u30fc\u30b9
+
+document.en = \u82f1\u8a9e
+document.fr = \u30d5\u30e9\u30f3\u30b9\u8a9e
+document.ja = \u65e5\u672c\u8a9e
Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/BrowserSession.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/BrowserSession.java?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/BrowserSession.java (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/BrowserSession.java Mon May 23 14:04:00 2005
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.portlets.browser.session;
+
+/**
+ * This class contains information about the browser stored in the user session.
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class BrowserSession
+{
+
+ /** the uri of the displayed cms object */
+ private String uri;
+
+ /** Store information used on different wizard step ( eg. create a new document) */
+ private Object wizardInfo;
+
+ /** Operation made on the displayed cms object (insert, update, delete) */
+ private String operation;
+
+ /** Insert operation */
+ public static final String INSERT = "insert";
+
+ /** Update operation */
+ public static final String UPDATE = "update";
+
+ /** Delete operation */
+ public static final String DELETE = "delete";
+
+
+ public String getUri()
+ {
+ return uri;
+ }
+ public void setUri(String uri)
+ {
+ this.uri = uri;
+ }
+
+
+ public Object getWizardInfo()
+ {
+ return wizardInfo;
+ }
+ public void setWizardInfo(Object wizardInfo)
+ {
+ this.wizardInfo = wizardInfo;
+ }
+ public String getOperation()
+ {
+ return operation;
+ }
+
+ public void setOperation(String operation)
+ {
+ this.operation = operation;
+ }
+
+
+ public boolean isUpdate()
+ {
+ if (this.operation == null)
+ {
+ return false ;
+ }
+ return this.operation.equals(UPDATE);
+ }
+
+ public boolean isInsert()
+ {
+
+ if (this.operation == null)
+ {
+ return false ;
+ }
+ return this.operation.equals(INSERT);
+ }
+}
Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java Mon May 23 14:04:00 2005
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.portlets.browser.session;
+
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletSession;
+
+
+/**
+ * This class manages the {@link org.apache.portals.graffito.portlets.browser.session.BrowserSession} per portlet session
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class SessionUtil
+{
+ /** The browser object session name */
+ public static final String BROWSER_SESSION = "browserSession";
+
+ /**
+ * Add in the user session a new Browser session object
+ * @param request the portlet request
+ * @param browserSession the browser session object to set
+ */
+ public static void setBrowserSession(PortletRequest request, BrowserSession browserSession)
+ {
+ request.getPortletSession().setAttribute(BROWSER_SESSION, browserSession);
+ }
+
+ /**
+ * Get the current Browser session object found in the portlet request
+ * @param request the portlet request
+ * @return the browser session object
+ */
+ public static BrowserSession getBrowserSession(PortletRequest request)
+ {
+
+ return (BrowserSession) request.getPortletSession().getAttribute(BROWSER_SESSION, PortletSession.PORTLET_SCOPE);
+ }
+
+ public static String getUri(PortletRequest request)
+ {
+ BrowserSession browserSession = getBrowserSession(request);
+ if (browserSession == null)
+ {
+ return null;
+ }
+
+ return browserSession.getUri();
+ }
+
+ public static void setUri(PortletRequest request, String uri)
+ {
+ BrowserSession browserSession = getBrowserSession(request);
+ if (browserSession == null)
+ {
+ browserSession = new BrowserSession();
+ }
+
+ browserSession.setUri(uri);
+ setBrowserSession(request, browserSession);
+ }
+
+
+ public static Object getWizardInfo(PortletRequest request)
+ {
+ BrowserSession browserSession = getBrowserSession(request);
+ if (browserSession == null)
+ {
+ return null;
+ }
+
+ return browserSession.getWizardInfo();
+ }
+
+ public static void setWizardInfo(PortletRequest request, Object wizardInfo)
+ {
+ BrowserSession browserSession = getBrowserSession(request);
+ if (browserSession == null)
+ {
+ browserSession = new BrowserSession();
+ }
+
+ browserSession.setWizardInfo(wizardInfo);
+ setBrowserSession(request, browserSession);
+ }
+
+
+ public static String getOperation(PortletRequest request)
+ {
+ BrowserSession browserSession = getBrowserSession(request);
+ if (browserSession == null)
+ {
+ return null;
+ }
+
+ return browserSession.getOperation();
+ }
+
+ public static void setOperation(PortletRequest request, String operation)
+ {
+ BrowserSession browserSession = getBrowserSession(request);
+ if (browserSession == null)
+ {
+ browserSession = new BrowserSession();
+ }
+
+ browserSession.setOperation(operation);
+ setBrowserSession(request, browserSession);
+ }
+
+
+}
Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml?rev=178023&view=auto
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml Mon May 23 14:04:00 2005
@@ -0,0 +1,65 @@
+<pages>
+ <actions>
+ <action id="cmsobject" class="org.apache.portals.graffito.portlets.browser.actions.CmsObjectAction" />
+ <action id="folder" class="org.apache.portals.graffito.portlets.browser.actions.FolderAction" />
+ <action id="document" class="org.apache.portals.graffito.portlets.browser.actions.DocumentAction" />
+ <action id="permission" class="org.apache.portals.graffito.portlets.browser.actions.PermissionAction" />
+ <action id="forward" class="org.apache.portals.graffito.portlets.browser.actions.ForwardAction" forward = "true" />
+ </actions>
+
+ <view>
+ <page id = "folderViewer" action="folder.retrieve" template="/WEB-INF/view/folder/folder-browser.vm" defaultPage="true" />
+ <page id = "documentHtmlTextViewer" action="document.retrieve"
+ template="/WEB-INF/view/document/document-view-text-html.vm">
+ <editpage portletPageId="documentEdit" />
+ </page>
+ <page id = "documentUploadViewer" action="document.retrieve" template="/WEB-INF/view/document/document-view-upload.vm">
+ <editpage portletPageId="documentEdit" />
+ </page>
+ </view>
+
+ <edit>
+ <page id = "folderEdit" template="/WEB-INF/view/folder/folder-tab.vm" defaultPage="true" action="folder.retrieve">
+ <tab id="folder-edit">
+ <page id="metadata" label="tab.folder-edit.metadata" template="/WEB-INF/view/folder/folder-metadata.vm" defaultTabPage="true" />
+ <page id="children" label="tab.folder-edit.children" template="/WEB-INF/view/folder/folder-children.vm" action = "folder.retrieveChildren" />
+ <page id="security" label="tab.security" template="/WEB-INF/view/security/security-browser.vm" action="permission.retrieve" />
+ </tab>
+ </page>
+
+ <page id = "folderCreate" action="folder.create" template="/WEB-INF/view/folder/folder-metadata.vm" >
+ <viewpage portletPageId="folderViewer" />
+ </page>
+
+ <page id = "documentEdit" template="/WEB-INF/view/document/document-tab.vm" action="document.retrieve" >
+ <tab id="document-edit">
+ <page id="metadata" label="tab.document-edit.metadata" template= "/WEB-INF/view/document/document-edit-metadata.vm" defaultTabPage="true" />
+ <page id="content-text" label="tab.document-edit.content" template="/WEB-INF/view/document/document-edit-text.vm" condition="documentDTO.isText()" />
+ <page id="content-html" label="tab.document-edit.content" template="/kupu/kupu.vm" condition="documentDTO.isHTML()" />
+ <page id="content-upload" label="tab.document-edit.content" template="/WEB-INF/view/document/document-edit-upload.vm" condition="documentDTO.isBinary()" />
+ <page id="security" label="tab.security" template= "/WEB-INF/view/security/security-browser.vm" />
+ </tab>
+
+ <!-- Order is important for the view page reference :
+ the engine will the select the first viewpage which has a condition returning true -->
+ <viewpage condition=" (! documentDTO.isBinary())" portletPageId="documentHtmlTextViewer" />
+ <viewpage portletPageId="documentUploadViewer" />
+ </page>
+
+ <page id = "documentCreate" action="document.createWizard" template="/WEB-INF/view/document/document-edit-metadata.vm" />
+
+ <page id = "textEdit" action="document.createWizard" template="/WEB-INF/view/document/document-edit-text.vm" >
+ <viewpage portletPageId="documentHtmlTextViewer" />
+ </page>
+
+ <page id = "htmlEdit" action="document.createWizard" template="/kupu/kupu.vm" >
+ <viewpage portletPageId="documentHtmlTextViewer" />
+ </page>
+
+ <page id = "uploadEdit" action="document.createWizard" template="/WEB-INF/view/document/document-edit-upload.vm" >
+ <viewpage portletPageId="documentUploadViewer" />
+ </page>
+
+ <page id = "permissionCreate" action="permission.create" template="/WEB-INF/view/security/security-permission.vm" />
+ </edit>
+</pages>
\ No newline at end of file
Modified: incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm?rev=178023&r1=178022&r2=178023&view=diff
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm Mon May 23 14:04:00 2005
@@ -1,6 +1,8 @@
#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
-#set ($document = $browserDTO.getCurrentCmsObject())
+#set ($document = $documentDTO.getDocument())
+#set ($browserSession = $renderRequest.getPortletSession().getAttribute("browserSession"))
+
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -22,12 +24,26 @@
<script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupudrawers.js"> </script>
</head>
<body onload="kupu = startKupu()">
- #if($browserDTO.isInsert())
- <div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPathLink($browserDTO.getCurrentServer() $browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>
+ <div class="portlet-menu">
+ #if($browserSession.isInsert())
+ $MESSAGES.getString('div.newdocument')
+ #else
+ $MESSAGES.getString('div.updatedocument')
+ #end
+ #cmsPathLink($pathDTO.getServer() $pathDTO.getPath() "folderEdit" $renderResponse $MESSAGES )
+ #if($browserSession.isUpdate())
+ >> $cmsObject.getName()
+ #end
+ </div>
+
+ #if($browserSession.isInsert())
+ #set($paramSubmit = "?portletAction_document.insert")
+ #else
+ #set($paramSubmit = "?portletAction_document.save")
#end
- <form action="$renderResponse.createActionURL()" method="POST">
+ <form action="$renderResponse.createActionURL()$paramSubmit" method="POST">
<div style="display: none;">
<xml id="kupuconfig">
<kupuconfig>
Modified: incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js?rev=178023&r1=178022&r2=178023&view=diff
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js Mon May 23 14:04:00 2005
@@ -226,7 +226,7 @@
var drawer = document.getElementById('kupu-librarydrawer');
drawer.parentNode.removeChild(drawer);
kupu.prepareForm(savebutton.form, 'documentContent');
- savebutton.form.action = savebutton.form.action + "?portletAction_document.save";
+ //savebutton.form.action = savebutton.form.action ;
savebutton.form.submit();
};
addEventHandler(savebutton, 'click', prepareForm, kupu);