incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r156684 - in incubator/graffito/trunk/applications/browser/src: java/org/apache/portals/graffito/portlets/ java/org/apache/portals/graffito/portlets/actions/ java/org/apache/portals/graffito/portlets/dto/ java/org/apache/portals/graffito/portlets/resources/ webapp/WEB-INF/ webapp/WEB-INF/tabs/ webapp/WEB-INF/velocity/ webapp/WEB-INF/view/document/ webapp/WEB-INF/view/folder/ webapp/kupu/
Date Wed, 09 Mar 2005 20:47:03 GMT
Author: clombart
Date: Wed Mar  9 12:46:52 2005
New Revision: 156684

URL: http://svn.apache.org/viewcvs?view=rev&rev=156684
Log:
Continue to work on The Graffito Browser.

Added:
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-content.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-metadata.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-text.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-type.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-upload.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-tab.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-view-text-html.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-children.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-metadata.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-tab.vm
Modified:
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/CmsObjectAction.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/DocumentAction.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/FolderAction.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/GeneralAction.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/dto/BrowserDTO.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages.properties
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/tabs/tabs.xml
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm
    incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java
Wed Mar  9 12:46:52 2005
@@ -151,7 +151,8 @@
         // Refresh the DTO object (retrieve data from the repository )
         if ((( ! browserDTO.isInsert() ) && ( ! browserDTO.isUpdate())) || (isNewUri))
         {
-            browserDTO = BrowserDTOUtil.createBrowserDTO(uri, request, response, this.documentTypes,
this.documentLanguages);        
+            browserDTO = BrowserDTOUtil.createBrowserDTO(uri, request, response, this.documentTypes,
this.documentLanguages);
+            browserDTO.setOperation(BrowserDTO.UPDATE);
             BrowserDTOUtil.setBrowserDTO(request, browserDTO);
         }
 
@@ -220,13 +221,13 @@
             Document document = (Document) cmsObject;
             if (document.getContentType().equals("text/plain"))
             {
-                request.setAttribute(PARAM_VIEW_PAGE, "/WEB-INF/view/document/document-text-html-view.vm");
+                request.setAttribute(PARAM_VIEW_PAGE, "/WEB-INF/view/document/document-view-text-html.vm");
                 return;
             }
 
             if (document.getContentType().equals("text/html"))
             {
-                request.setAttribute(PARAM_VIEW_PAGE, "/WEB-INF/view/document/document-text-html-view.vm");
+                request.setAttribute(PARAM_VIEW_PAGE, "/WEB-INF/view/document/document-view-text-html.vm");
 
             }
 
@@ -248,21 +249,11 @@
             CmsObject cmsObject = browserDTO.getCurrentCmsObject();
             if ((cmsObject == null) || (cmsObject instanceof Folder))
             {
-                request.setAttribute(PARAM_EDIT_PAGE, "/WEB-INF/view/folder/folder-edit.vm");
+                request.setAttribute(PARAM_EDIT_PAGE, "/WEB-INF/view/folder/folder-tab.vm");
             }
             else
             {
-                Document document = (Document) cmsObject;
-                if (document.getContentType().equals("text/plain"))
-                {
-                    request.setAttribute(PARAM_EDIT_PAGE, "/WEB-INF/view/document/document-text-edit.vm");
-                }
-
-                if (document.getContentType().equals("text/html"))
-                {
-                    request.setAttribute(PARAM_EDIT_PAGE, "/kupu/kupu.vm");
-                }
-
+                request.setAttribute(PARAM_EDIT_PAGE, "/WEB-INF/view/document/document-tab.vm");
             }
         }
         

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/CmsObjectAction.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/CmsObjectAction.java?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/CmsObjectAction.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/CmsObjectAction.java
Wed Mar  9 12:46:52 2005
@@ -38,9 +38,7 @@
 
     public void delete(PortletActionInfo portletActionInfo) throws PortletException
     {
-        ActionResponse actionResponse = portletActionInfo.getActionResponse();
         ActionRequest actionRequest = portletActionInfo.getActionRequest();
-        
         try
         {
             String[] uriToDelete = portletActionInfo.getActionRequest().getParameterValues("uri");
@@ -53,7 +51,7 @@
             ContentModelService modelService = ServiceUtil.getModelService();
             modelService.removeAll(uriToDelete);                        
             BrowserDTO browserDTO = BrowserDTOUtil.cleanBrowserDTO(actionRequest);
-            browserDTO.setTemplate("/WEB-INF/view/folder/folder-edit.vm");
+            browserDTO.setTemplate("/WEB-INF/view/folder/folder-tab.vm");
 
         }
         catch (ContentManagementException e)

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/DocumentAction.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/DocumentAction.java?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/DocumentAction.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/DocumentAction.java
Wed Mar  9 12:46:52 2005
@@ -42,7 +42,7 @@
 public class DocumentAction extends GraffitoAction
 {
 
-    public void createStep1(PortletActionInfo actionInfo) throws PortletException
+    public void createDefineType(PortletActionInfo actionInfo) throws PortletException
     {
         ActionRequest request = actionInfo.getActionRequest();
         ActionResponse response = actionInfo.getActionResponse();
@@ -53,7 +53,7 @@
             Document document = modelService.createDocument();
             browserDTO.setCurrentCmsObject(document);
             browserDTO.setOperation(BrowserDTO.INSERT);
-            browserDTO.setTemplate("/WEB-INF/view/document/document-type.vm");
+            browserDTO.setTemplate("/WEB-INF/view/document/document-edit-type.vm");
             BrowserDTOUtil.setBrowserDTO(request, browserDTO); 
         }
         catch (ContentManagementException e)
@@ -100,7 +100,7 @@
         if (type.equals("document.type.text"))
         {
             document.setContentType("text/plain");
-            browserDTO.setTemplate("/WEB-INF/view/document/document-text-edit.vm");
+            browserDTO.setTemplate("/WEB-INF/view/document/document-edit-text.vm");
         }
 
         if (type.equals("document.type.html"))
@@ -113,37 +113,13 @@
 
         if (type.equals("document.type.upload"))
         {
-            browserDTO.setTemplate("/WEB-INF/view/document/document-upload-edit.vm");
+            browserDTO.setTemplate("/WEB-INF/view/document/document-edit-upload.vm");
         }
 
         browserDTO.setCurrentCmsObject(document);
         BrowserDTOUtil.setBrowserDTO(request, browserDTO);
         
     }
-
-    public void edit(PortletActionInfo actionInfo) throws PortletException
-    {    
-        try
-        {
-            ActionRequest request = actionInfo.getActionRequest();
-            ActionResponse response = actionInfo.getActionResponse();
-            
-            BrowserDTO browserDTO = BrowserDTOUtil.getBrowserDTO(request);
-            String uri = request.getParameter("uri");
-            ContentModelService modelService = ServiceUtil.getModelService();          
-            Document document= modelService.getDocument(uri);
-            browserDTO.setCurrentCmsObject(document);
-            browserDTO.setOperation(BrowserDTO.UPDATE);
-            BrowserDTOUtil.setBrowserDTO(request, browserDTO);
-
-
-        }
-        catch (ContentManagementException e)
-        {
-            throw new PortletException("Impossible to create a folder ", e);
-        }        
-        
-    }
     
     public void save(PortletActionInfo actionInfo) throws PortletException
     {
@@ -179,7 +155,7 @@
             }
                         
             browserDTO = BrowserDTOUtil.cleanBrowserDTO(request);
-            browserDTO.setTemplate("/WEB-INF/view/folder/folder-edit.vm");
+            browserDTO.setTemplate("/WEB-INF/view/folder/folder-tab.vm");
         }
         catch (ContentManagementException e)
         {
@@ -216,7 +192,7 @@
             }
                         
             browserDTO = BrowserDTOUtil.cleanBrowserDTO(request);
-            browserDTO.setTemplate("/WEB-INF/view/folder/folder-edit.vm");
+            browserDTO.setTemplate("/WEB-INF/view/folder/folder-tab.vm");
         }
         catch (Exception e)
         {

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/FolderAction.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/FolderAction.java?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/FolderAction.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/FolderAction.java
Wed Mar  9 12:46:52 2005
@@ -50,7 +50,7 @@
             Folder folder = modelService.createFolder();
             browserDTO.setCurrentCmsObject(folder);
             browserDTO.setOperation(BrowserDTO.INSERT);
-            browserDTO.setTemplate("/WEB-INF/view/folder/folder-detail.vm");
+            browserDTO.setTemplate("/WEB-INF/view/folder/folder-tab.vm");
             BrowserDTOUtil.setBrowserDTO(request, browserDTO);
         }
         catch (ContentManagementException e)
@@ -58,30 +58,7 @@
             throw new PortletException("Impossible to create a folder ", e);
         }
     }   
-    
-    public void edit(PortletActionInfo actionInfo) throws PortletException
-    {
-
-        try
-        {
-            ActionRequest request = actionInfo.getActionRequest();
-            ActionResponse response = actionInfo.getActionResponse();
-            
-            BrowserDTO browserDTO = BrowserDTOUtil.getBrowserDTO(request);
-            String uri = request.getParameter("uri");
-            ContentModelService modelService = ServiceUtil.getModelService();          
-            Folder folder = modelService.getFolder(uri);
-            browserDTO.setCurrentCmsObject(folder);
-            browserDTO.setOperation(BrowserDTO.UPDATE);
-            browserDTO.setTemplate("/WEB-INF/view/folder/folder-detail.vm");
-            BrowserDTOUtil.setBrowserDTO(request, browserDTO);
-        }
-        catch (ContentManagementException e)
-        {
-            throw new PortletException("Impossible to create a folder ", e);
-        }
-    }
-    
+        
     public void save(PortletActionInfo actionInfo) throws PortletException
     {
         try
@@ -131,7 +108,7 @@
             }
             
             browserDTO = BrowserDTOUtil.cleanBrowserDTO(request);
-            browserDTO.setTemplate("/WEB-INF/view/folder/folder-edit.vm");
+            browserDTO.setTemplate("/WEB-INF/view/folder/folder-tab.vm");
             
         }
         catch (ContentManagementException e)

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/GeneralAction.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/GeneralAction.java?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/GeneralAction.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/actions/GeneralAction.java
Wed Mar  9 12:46:52 2005
@@ -43,7 +43,7 @@
         
         if (browserDTO.isInsert() || browserDTO.isUpdate())
         {        
-           browserDTO.setTemplate("/WEB-INF/view/folder/folder-edit.vm");
+           browserDTO.setTemplate("/WEB-INF/view/folder/folder-tab.vm");
         }
         else
         {

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/dto/BrowserDTO.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/dto/BrowserDTO.java?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/dto/BrowserDTO.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/dto/BrowserDTO.java
Wed Mar  9 12:46:52 2005
@@ -200,7 +200,7 @@
             }
         }
         
-        if (currentCmsObject instanceof Document)
+        if ((currentCmsObject instanceof Document) && (! this.isInsert()))
         {
             cmsPath.add(currentCmsObject);
         }

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages.properties?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages.properties
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages.properties
Wed Mar  9 12:46:52 2005
@@ -37,8 +37,10 @@
 
 file.upload=Select a file to upload
 
-tab.folder = Folder Info
-tab.security=Security
+tab.folder-edit.children = Subfolders & Documents
+tab.folder-edit.metadata = Folder Info
+tab.document-edit.content= Document Content
+tab.document-edit.metadata = Document Info
 
 info.nocontent= No content found in this folder.
 error.servers=No content server found

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml Wed Mar 
9 12:46:52 2005
@@ -30,7 +30,7 @@
 		</init-param>
 		<init-param>
 			<name>EditPage</name>
-			<value>/WEB-INF/view/folder/folder-edit.vm</value>
+			<value>/WEB-INF/view/folder/folder-tab.vm</value>
 		</init-param>
 		<init-param>
 			<name>HelpPage</name>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/tabs/tabs.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/tabs/tabs.xml?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/tabs/tabs.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/tabs/tabs.xml Wed Mar
 9 12:46:52 2005
@@ -1,6 +1,10 @@
 <tabs>
-	<tab id="folder">
-	    <page id="General" label="tab.general" view= "/WEB-INF/view/folder-general.vm" />
-  	    <page id="Security" label="tab.security" view= "/WEB-INF/view/security.vm" />
+	<tab id="folder-edit">
+	    <page id="children" label="tab.folder-edit.children" view= "/WEB-INF/view/folder/folder-children.vm"
/>
+  	    <page id="metadata" label="tab.folder-edit.metadata" view= "/WEB-INF/view/folder/folder-metadata.vm"
/>
 	</tab>	
+	<tab id="document-edit">
+	    <page id="content" label="tab.document-edit.content" view= "/WEB-INF/view/document/document-content.vm"
/>
+  	    <page id="metadata" label="tab.document-edit.metadata" view= "/WEB-INF/view/document/document-edit-type.vm"
/>
+	</tab>
 </tabs>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm
(original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm
Wed Mar  9 12:46:52 2005
@@ -122,7 +122,10 @@
 	
     [$MESSAGES.getString("div.server")] $server.getAlias()
 	#foreach($cmsObject in $cmsObjects)
-	   >> $cmsObject.getName()
+  	   #set($name = $cmsObject.getName())
+  	   #if($name)		
+  	     >> $cmsObject.getName()
+	   #end
 	#end
 #end
 
@@ -131,8 +134,11 @@
 	
     <a href="$renderResponse.createRenderURL()?uri=$server.getScope()"> [$MESSAGES.getString("div.server")]
$server.getAlias()</a>		
 	#foreach($cmsObject in $cmsObjects)
-		>> <a href="$renderResponse.createRenderURL()?uri=$cmsObject.getUri()">$cmsObject.getName()</a>
-	#end
+  	   #set($name = $cmsObject.getName())
+  	   #if($name)
+  		  >><a href="$renderResponse.createRenderURL()?uri=$cmsObject.getUri()">$cmsObject.getName()</a>
+	   #end
+   #end
 #end
 
 #macro (documentLink $document $graffitoTools $renderResponse)

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-content.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-content.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-content.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-content.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,36 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+
+#set ($document = $browserDTO.getCurrentCmsObject())
+#if($document.getContentType() == "text/plain")
+    #parse("/WEB-INF/view/document/document-edit-text.vm")
+#else
+	#if($document.getContentType() == "text/html")
+		#parse("/kupu/kupu.vm")
+	#else
+	    #parse("/WEB-INF/view/document/document-edit-upload.vm")
+	#end
+	
+#end
+               
\ No newline at end of file

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-metadata.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-metadata.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-metadata.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-metadata.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,62 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set ($document = $browserDTO.getCurrentCmsObject())
+
+#if($browserDTO.isInsert())
+   <div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPathLink($browserDTO.getCurrentServer()
$browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>
+
+   <div class="portlet-section-header">General Information</div>
+#end
+                                                                  
+
+
+<!-- div class="portlet-section-header">Folder Info </div -->
+<form action="$renderResponse.createActionURL()" method="post">
+    <input type="hidden" name="uri" value="$document.getUri()" size="100" maxlength="100"/>
+	<table border="0" cellspacing="2" cellpadding="3">				
+		#if($browserDTO.isUpdate())
+ 		   #formFieldText('field.name' "$!document.getName()" $MESSAGES $ERRORS)
+		#else	
+		   #formFieldInput('field.name' "$!document.getName()" "25" 'name' $MESSAGES $ERRORS)
+		#end
+		
+        #formFieldInput('field.title' "$!document.getTitle()" "25" 'title' $MESSAGES $ERRORS)
+        #formFieldInput('field.description' "$!document.getDescription()" "50" 'description'
$MESSAGES $ERRORS)		
+        #formFieldInput('field.owner' "$!document.getOwner()" "25" 'owner' $MESSAGES $ERRORS)
			
+		#formFieldSelect('field.language' $browserDTO.getDocumentLanguages() 'language' $MESSAGES
$ERRORS )
+		
+		#if($browserDTO.isInsert())
+ 		    #formFieldSelect('field.type' $browserDTO.getDocumentTypes() 'documentType' $MESSAGES
$ERRORS )
+		#end
+           
+	</table>
+	<div class="portlet-section-footer">
+		<input type="submit" name="portletAction_document.createStep2" value="Next" class="portlet-dlg-icon-label"/>
+
+		                           
+	</div>
+</form>
+
+
+#ErrorMessages($ERRORS)

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-text.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-text.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-text.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-text.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,43 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set ($document = $browserDTO.getCurrentCmsObject())
+
+#if ($browserDTO.isInsert())
+   <div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPathLink($browserDTO.getCurrentServer()
$browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>
+#end
+
+<div class="portlet-section-header">Text Editor</div>
+
+<!-- div class="portlet-section-header">Folder Info </div -->
+<form action="$renderResponse.createActionURL()" method="post">
+    <input type="hidden" name="uri" value="$document.getUri()" size="100" maxlength="100"/>
+	#formFieldTextArea($document.getContent().getContentAsString() "content" $MESSAGES $ERRORS)
   
+	<div class="portlet-section-footer">
+		<input type="submit" name="portletAction_document.save" value="Save" class="portlet-dlg-icon-label"/>
	
+		<!-- input type="submit" name="portletAction_general.cancel" value="Cancel" class="portlet-dlg-icon-label"/
-->		
+	</div>
+</form>
+
+
+#ErrorMessages($ERRORS)

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-type.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-type.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-type.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-type.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,62 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set ($document = $browserDTO.getCurrentCmsObject())
+
+#if($browserDTO.isInsert())
+   <div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPathLink($browserDTO.getCurrentServer()
$browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>
+
+   <div class="portlet-section-header">General Information</div>
+#end
+                                                                  
+
+
+<!-- div class="portlet-section-header">Folder Info </div -->
+<form action="$renderResponse.createActionURL()" method="post">
+    <input type="hidden" name="uri" value="$document.getUri()" size="100" maxlength="100"/>
+	<table border="0" cellspacing="2" cellpadding="3">				
+		#if($browserDTO.isUpdate())
+ 		   #formFieldText('field.name' "$!document.getName()" $MESSAGES $ERRORS)
+		#else	
+		   #formFieldInput('field.name' "$!document.getName()" "25" 'name' $MESSAGES $ERRORS)
+		#end
+		
+        #formFieldInput('field.title' "$!document.getTitle()" "25" 'title' $MESSAGES $ERRORS)
+        #formFieldInput('field.description' "$!document.getDescription()" "50" 'description'
$MESSAGES $ERRORS)		
+        #formFieldInput('field.owner' "$!document.getOwner()" "25" 'owner' $MESSAGES $ERRORS)
			
+		#formFieldSelect('field.language' $browserDTO.getDocumentLanguages() 'language' $MESSAGES
$ERRORS )
+		
+		#if($browserDTO.isInsert())
+ 		    #formFieldSelect('field.type' $browserDTO.getDocumentTypes() 'documentType' $MESSAGES
$ERRORS )
+		#end
+           
+	</table>
+	<div class="portlet-section-footer">
+		<input type="submit" name="portletAction_document.createStep2" value="Next" class="portlet-dlg-icon-label"/>
+
+		                           
+	</div>
+</form>
+
+
+#ErrorMessages($ERRORS)

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-upload.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-upload.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-upload.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-edit-upload.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,41 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set ($document = $browserDTO.getCurrentCmsObject())
+
+#if($browserDTO.isInsert())
+   <div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPathLink($browserDTO.getCurrentServer()
$browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>
+#end
+
+<div class="portlet-section-header">Upload Document</div>
+
+<form action="$renderResponse.createActionURL()" method="post" enctype="multipart/form-data"
>
+	<table border="0" cellspacing="2" cellpadding="3">
+		#formFieldFile('file.upload' "" "50" 'file' $MESSAGES $ERRORS)
+	</table>
+	<div class="portlet-section-footer">
+		<input type="submit" name="portletAction_document.upload" value="Upload" class="portlet-dlg-icon-label"/>
+		<!-- input type="submit" name="portletAction_general.cancel" value="Cancel" class="portlet-dlg-icon-label"
--/>
+	</div>
+</form>
+#ErrorMessages($ERRORS)

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-tab.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-tab.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-tab.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-tab.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,36 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+
+
+<div class="portlet-menu">
+	#if($browserDTO.isUpdate())
+           $MESSAGES.getString('div.updatedocument') 
+	#else	
+		   $MESSAGES.getString('div.newdocument') 
+	#end
+	#cmsPathLink($browserDTO.getCurrentServer() $browserDTO.getFolderPath() $renderResponse
$MESSAGES ) 
+</div>
+
+#tab($tabs.get("document-edit") $MESSAGES  $renderResponse.createActionURL())
+

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-view-text-html.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-view-text-html.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-view-text-html.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/document/document-view-text-html.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,28 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set ($document = $browserDTO.getCurrentCmsObject())
+
+<div class="portlet-menu">$MESSAGES.getString('div.path') #cmsPathLink($browserDTO.getCurrentServer()
$browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>
+<br>
+$document.getContent().getContentAsString()

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-children.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-children.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-children.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-children.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,94 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+
+
+
+<form action="$renderResponse.createActionURL()" method="post">
+	#set ($folders = $browserDTO.getFolders())
+	#set ($documents = $browserDTO.getDocuments())
+	#set ($count = 0)
+	#if($browserDTO.isEmpty())
+		<div class="portlet-msg-info">$MESSAGES.getString('info.nocontent')</div>
+	#else
+	<table>
+			
+		<tr>
+			<th class="portlet-section-header">$MESSAGES.getString('edit.tab.select')</th>
+			<th class="portlet-section-header">$MESSAGES.getString('edit.tab.type')</th>
+			<th class="portlet-section-header">$MESSAGES.getString('edit.tab.name')</th>
+			<th class="portlet-section-header">$MESSAGES.getString('edit.tab.title')</th>
+			<th class="portlet-section-header">$MESSAGES.getString('edit.tab.description')</th>
+			<th class="portlet-section-header">$MESSAGES.getString('edit.tab.creationdate')</th>
+			<th class="portlet-section-header">$MESSAGES.getString('edit.tab.modificationdate')</th>
+		</tr>
+
+		#foreach ($folder in $folders)
+			#set ($count = $count + 1)				
+			#set ($cssClass = "portlet-section-alternate")
+			#if (($count % 2)==0)
+				#set ($cssClass = "portlet-section-body")
+			#end			
+			<tr>
+				<td class="$cssClass"><input type="checkbox" name="uri" value="$folder.getUri()"
/></td>
+				<td class="$cssClass">$MESSAGES.getString('div.folder')</td>
+				<td class="$cssClass"><a href="$renderResponse.createRenderURL()?uri=$folder.getUri()">$folder.getName()</a></td>
+				<td class="$cssClass">$folder.getTitle()</td>
+				<td class="$cssClass">$folder.getDescription()</td>
+				<td class="$cssClass">$!folder.getCreationDate()</td>
+				<td class="$cssClass">$!folder.getLastModified()</td>				
+			</tr>
+
+		#end
+		
+		#foreach ($document in $documents)
+			#set ($count = $count + 1)
+			#set ($cssClass = "portlet-section-alternate")
+
+			#if (($count % 2)==0)
+				#set ($cssClass = "portlet-section-body")
+			#end			
+			<tr>
+				<td class="$cssClass"><input type="checkbox" name="uri" value="$document.getUri()"
 /></td>
+				<td class="$cssClass">$document.getContentType() </td>		
+				<td class="$cssClass"><a href="$renderResponse.createRenderURL()?uri=$document.getUri()">$document.getName()</a></td>
+				<td class="$cssClass">$document.getTitle()</td>
+				<td class="$cssClass">$document.getDescription()</td>
+				<td class="$cssClass">$!document.getCreationDate()</td>
+				<td class="$cssClass">$!document.getLastModified()</td>								
+			</tr>
+
+		#end
+	</table>	
+	#end
+	
+	<div class="portlet-menu">
+		<input type="submit" name="portletAction_folder.create" value="$MESSAGES.getString('link.addfolder')"
class="portlet-dlg-icon-label" />	
+		<input type="submit" name="portletAction_document.createDefineType" value="$MESSAGES.getString('link.adddocument')"
class="portlet-dlg-icon-label" />	
+		<input type="submit" name="portletAction_cmsobject.delete" value="$MESSAGES.getString('link.delete')"
class="portlet-dlg-icon-label" />	
+	</div>
+	
+</form>
+
+
+

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-metadata.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-metadata.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-metadata.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-metadata.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,47 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set ($folder = $browserDTO.getCurrentCmsObject())
+
+
+<!-- div class="portlet-section-header">Folder Info </div -->
+<form action="$renderResponse.createActionURL()" method="post">
+    <input type="hidden" name="uri" value="$folder.getUri()" size="100" maxlength="100"/>

+	<table border="0" cellspacing="2" cellpadding="3">		
+		
+		#if($browserDTO.isUpdate())
+ 		   #formFieldText('field.name' "$!folder.getName()" $MESSAGES $ERRORS)
+		#else	
+		   #formFieldInput('field.name' "$!folder.getName()" "25" 'name' $MESSAGES $ERRORS)
+		#end
+        #formFieldInput('field.title' "$!folder.getTitle()" "25" 'title' $MESSAGES $ERRORS)
+        #formFieldInput('field.description' "$!folder.getDescription()" "50" 'description'
$MESSAGES $ERRORS)		
+	</table>
+	<div class="portlet-section-footer">
+		<input type="submit" name="portletAction_folder.save" value="Save" class="portlet-dlg-icon-label"/>
+		<!-- input type="submit" name="portletAction_general.cancel" value="Cancel" class="portlet-dlg-icon-label"/
-->
+	</div>
+</form>
+
+
+#ErrorMessages($ERRORS)

Added: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-tab.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-tab.vm?view=auto&rev=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-tab.vm
(added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-tab.vm
Wed Mar  9 12:46:52 2005
@@ -0,0 +1,40 @@
+#*
+Copyright 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.
+*#
+
+#**
+
+@author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+@version $Id:  Exp $
+
+*#
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+
+
+<div class="portlet-menu">
+	#if($browserDTO.isUpdate())
+           $MESSAGES.getString('div.updatefolder') 
+	#else	
+		   $MESSAGES.getString('div.newfolder') 
+	#end
+	#cmsPathLink($browserDTO.getCurrentServer() $browserDTO.getFolderPath() $renderResponse
$MESSAGES ) 
+</div>
+
+#if($browserDTO.isUpdate())
+	#tab($tabs.get("folder-edit") $MESSAGES  $renderResponse.createActionURL())
+#else
+	#parse("/WEB-INF/view/folder/folder-metadata.vm");
+#end
+

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?view=diff&r1=156683&r2=156684
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm Wed Mar  9 12:46:52
2005
@@ -21,9 +21,13 @@
     <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupusourceedit.js">
</script>
     <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupudrawers.js">
</script>
   </head>
-  <body onload="kupu = startKupu()">    
-    <div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPathLink($browserDTO.getCurrentServer()
$browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>	
-    <form action="$renderResponse.createActionURL()" method="POST">
+  <body onload="kupu = startKupu()">   
+	#if($browserDTO.isInsert())
+		<div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPathLink($browserDTO.getCurrentServer()
$browserDTO.getFolderPath() $renderResponse $MESSAGES ) </div>	
+	#end
+    
+	
+	<form action="$renderResponse.createActionURL()" method="POST">
       <div style="display: none;">
         <xml id="kupuconfig">
           <kupuconfig>



Mime
View raw message