incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r155071 - in incubator/graffito/trunk/applications/browser/src: java/org/apache/portals/graffito/portlets/ java/org/apache/portals/graffito/portlets/resources/ java/org/apache/portals/graffito/portlets/tabs/ java/org/apache/portals/graffito/servlets/ webapp/WEB-INF/ webapp/WEB-INF/velocity/ webapp/WEB-INF/view/folder/
Date Wed, 23 Feb 2005 20:54:14 GMT
Author: clombart
Date: Wed Feb 23 12:54:11 2005
New Revision: 155071

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

Added:
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/TabReader.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTab.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTabPage.java
Modified:
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserInfo.java
    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/GenericTabVelocityPortlet.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages.properties
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages_en.properties
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/jetspeed-portlet.xml
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-detail.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-edit.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserInfo.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserInfo.java?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserInfo.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserInfo.java
Wed Feb 23 12:54:11 2005
@@ -220,8 +220,14 @@
         }
     }
     
+    public boolean isUpdate()
+    {
+        return this.operation.equals(UPDATE);
+    }
     
-    
-    
-    
+    public boolean isInsert()
+    {
+        return this.operation.equals(INSERT);
+    }
+            
 }

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=155070&r2=155071
==============================================================================
--- 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 Feb 23 12:54:11 2005
@@ -16,9 +16,6 @@
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.Date;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
 
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -156,8 +153,7 @@
         response.setContentType("text/html");
         Context velocityContext = this.getContext(request);
 
-        BrowserInfo browserInfo = this.getSessionBrowserInfo(request);
-        browserInfo.setOperation(BrowserInfo.UPDATE);
+        BrowserInfo browserInfo = this.getSessionBrowserInfo(request);        
         this.selectEditTemplate(browserInfo, request, response);
         velocityContext.put(VELOCITY_BROWSER_INFO, browserInfo);
 
@@ -179,6 +175,12 @@
                 this.createFolder(request, response);
                 return;
             }
+            
+            if (this.hasFieldForm(request, diskFileUpload, "folder.update"))
+            {
+                this.updateFolder(request, response);
+                return;
+            }            
 
             if (this.hasFieldForm(request, diskFileUpload, "document.add"))
             {
@@ -278,6 +280,26 @@
             throw new PortletException("Impossible to create a folder ", e);
         }
     }
+    
+    protected void updateFolder(ActionRequest request, ActionResponse response) throws PortletException
+    {
+
+        try
+        {
+            BrowserInfo browserInfo = this.getSessionBrowserInfo(request);
+            String uri = request.getParameter("uri");
+            Folder folder = modelService.getFolder(uri);
+            browserInfo.setCurrentCmsObject(folder);
+            browserInfo.setOperation(BrowserInfo.UPDATE);
+            this.setSessionContentBrowser(request, browserInfo);            
+            response.setRenderParameter(PARAM_EDIT_PAGE, "/WEB-INF/view/folder/folder-detail.vm");
+
+        }
+        catch (ContentManagementException e)
+        {
+            throw new PortletException("Impossible to create a folder ", e);
+        }
+    }    
 
     protected void createDocument(ActionRequest request, ActionResponse response) throws
PortletException
     {
@@ -369,28 +391,36 @@
         {
             BrowserInfo browserInfo = this.getSessionBrowserInfo(request);
             Folder folder = (Folder) browserInfo.getCurrentCmsObject();
-            String name = request.getParameter("name");
-            String title = request.getParameter("title");
-            String description = request.getParameter("description");
-
-            folder.setCreationDate(new Date());
-            folder.setDescription(description);
-            folder.setLastModified(new Date());
-            folder.setName(name);
-            folder.setTitle(title);
-
-            String parentFolderUri = null;
-            if (browserInfo.getCurrentFolder() == null)
+            if (browserInfo.isInsert())
             {
-                parentFolderUri = browserInfo.getCurrentServer().getScope();
+                String name = request.getParameter("name");
+                folder.setCreationDate(new Date());
+                folder.setLastModified(new Date());  
+                folder.setName(name);
+                String parentFolderUri = null;
+                if (browserInfo.getCurrentFolder() == null)
+                {
+                    parentFolderUri = browserInfo.getCurrentServer().getScope();
+                }
+                else
+                {
+                    parentFolderUri = browserInfo.getCurrentFolder().getUri();
+                }
+
+                folder.setUri(parentFolderUri + "/" + name);
+                
             }
             else
             {
-                parentFolderUri = browserInfo.getCurrentFolder().getUri();
+                folder.setLastModified(new Date());    
             }
+            
+            String title = request.getParameter("title");
+            String description = request.getParameter("description");            
+            folder.setDescription(description);
+            folder.setTitle(title);
 
-            folder.setUri(parentFolderUri + "/" + name);
-            if (browserInfo.getOperation().equals(BrowserInfo.INSERT))
+            if (browserInfo.isInsert())
             {
                 modelService.addFolder(folder);
             }
@@ -406,7 +436,7 @@
         }
         catch (ContentManagementException e)
         {
-            throw new PortletException("Impossible to create a folder ", e);
+            throw new PortletException("Impossible to save a folder ", e);
         }
     }
 

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java
Wed Feb 23 12:54:11 2005
@@ -30,6 +30,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
+import org.apache.portals.graffito.portlets.tabs.TabReader;
+import org.apache.portals.graffito.portlets.tabs.VelocityTab;
 import org.apache.portals.graffito.portlets.util.GraffitoTools;
 import org.apache.velocity.context.Context;
 

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=155070&r2=155071
==============================================================================
--- 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 Feb 23 12:54:11 2005
@@ -8,6 +8,7 @@
 
 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

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages_en.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages_en.properties?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages_en.properties
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/resources/messages_en.properties
Wed Feb 23 12:54:11 2005
@@ -9,6 +9,7 @@
 
 div.path= You are in :
 div.newfolder= Add new folder in :  
+div.updatefolder=Update folder : 
 div.folders = Folders
 div.documents = Documents 
 

Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/TabReader.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/TabReader.java?view=auto&rev=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/TabReader.java
(added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/TabReader.java
Wed Feb 23 12:54:11 2005
@@ -0,0 +1,102 @@
+/*
+ * 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.tabs;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * This utility class build a collection of {@link org.apache.portals.graffito.portlets.tabs.VelocityTab}
+ * from a xml config file. The structure of the xml file is : 
+ * <code>
+ * <tabs>
+ *	<tab id="document">
+ *	    <page id="General" label="tab.general" view= "/WEB-INF/view/doc-general.vm" />
+ * 	    <page id="Security" label="tab.security" view= "/WEB-INF/view/security.vm" />
+ * 	    <page id="History" label="tab.history" view= "/WEB-INF/view/version.vm" />
+ *	</tab>
+ *  <tab id="...">
+ *      <page ... />
+ *  </tab>	
+ * </tabs>
+ * </code>
+ *  
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
+ * @version $Id: Exp $
+ */
+public class TabReader
+{
+
+    /**
+     * Build a collection of {@link VelocityTab} from an xml file.
+     * 
+     * @param xmlFile
+     * @return a HashMap of {@link VelocityTab}
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static HashMap getTabs(String xmlFile) throws IOException, SAXException, ParserConfigurationException
+    {
+
+        HashMap tabs = new HashMap();
+
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder builder = factory.newDocumentBuilder();
+        Document document = builder.parse(xmlFile);
+        Node root = document.getFirstChild();
+        NodeList tabList = root.getChildNodes();
+        for (int tabIndex = 0; tabIndex < tabList.getLength(); tabIndex++)
+        {
+            Node tabNode = tabList.item(tabIndex);
+            if (tabNode.getNodeType() == Node.ELEMENT_NODE)
+            {
+
+                //String tabId = no
+                String tabId = tabNode.getAttributes().getNamedItem("id").getNodeValue();
+                VelocityTab tab = new VelocityTab(tabId);
+                NodeList pageList = tabNode.getChildNodes();
+                
+                for (int pageIndex = 0; pageIndex < pageList.getLength(); pageIndex++)
+                {
+                    Node pageNode = pageList.item(pageIndex);
+                    if (pageNode.getNodeType() == Node.ELEMENT_NODE)
+                    {
+                        String id = pageNode.getAttributes().getNamedItem("id").getNodeValue();
+                        String label = pageNode.getAttributes().getNamedItem("label").getNodeValue();
+                        String view = pageNode.getAttributes().getNamedItem("view").getNodeValue();
+                        VelocityTabPage page = new VelocityTabPage(id, label, view);
+                        tab.addPage(page);
+                    }
+                }
+
+                tabs.put(tabId, tab);
+            }
+        }
+
+        return tabs;
+
+    }
+
+}
\ No newline at end of file

Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTab.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTab.java?view=auto&rev=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTab.java
(added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTab.java
Wed Feb 23 12:54:11 2005
@@ -0,0 +1,76 @@
+/*
+ * 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.tabs;
+
+import java.util.ArrayList;
+
+/**
+ * Velocity Tab containse a series of {@link org.apache.portals.graffito.portlets.tabs.VelocityTabPage}
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
+ * @version $Id: Exp $
+ */
+public class VelocityTab
+{
+     private ArrayList tabPages = new ArrayList();
+     private int selectedPage = 0;
+     private String id;
+     
+     public VelocityTab(String id)
+     {
+         this.id = id;
+     }
+     
+     public String getId()
+     {
+         return id;
+     }
+     
+     
+     public void addPage(VelocityTabPage page)
+     {         
+         tabPages.add(page);
+     }
+     
+     public VelocityTabPage[] getPages()
+     {
+         return (VelocityTabPage[]) tabPages.toArray(new VelocityTabPage[tabPages.size()]);
+     }
+     
+     public VelocityTabPage getSelectedPage()
+     {
+         return (VelocityTabPage) tabPages.get(selectedPage);
+     }
+     
+     public void setSelectedPage(String pageId)
+     {
+         VelocityTabPage[] pages = this.getPages();
+         for (int i = 0; i<pages.length; i++)
+         {
+             if (pages[i].getId().equals(pageId))
+             {
+                 this.selectedPage= i;
+                 break;
+             }
+         }
+         
+     }
+     
+     public boolean isSelected(VelocityTabPage page)
+     {
+         return ((VelocityTabPage) tabPages.get(selectedPage)).getId().equals(page.getId());
  
+     }
+}

Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTabPage.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTabPage.java?view=auto&rev=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTabPage.java
(added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/tabs/VelocityTabPage.java
Wed Feb 23 12:54:11 2005
@@ -0,0 +1,67 @@
+/*
+ * 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.tabs;
+
+/**
+ * Information on one view in a VelocityTab. See {@link org.apache.portals.graffito.portlets.tabs.VelocityTab}
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
+ * @version $Id: Exp $
+ */
+public class VelocityTabPage
+{
+    private String id;
+    private String label;
+    private String view;    
+
+    /**
+     * @param label
+     * @param view
+     */
+    public VelocityTabPage(String id, String label, String view)
+    {
+        this.id = id;
+        this.label = label;
+        this.view = view;       
+    }
+    
+    
+    public String getId()
+    {
+        return id;
+    }
+    public void setId(String id)
+    {
+        this.id = id;
+    }
+    
+    public String getLabel()
+    {
+        return label;
+    }
+    public void setLabel(String label)
+    {
+        this.label = label;
+    }
+    public String getView()
+    {
+        return view;
+    }
+    public void setView(String view)
+    {
+        this.view = view;
+    }
+}

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
Wed Feb 23 12:54:11 2005
@@ -56,7 +56,7 @@
             throw new ServletException("Failed to find the content model service");
         }
         
-        String uri = (String) request.getParameter(URI_PARAM);
+        String uri = request.getParameter(URI_PARAM);
         try
         {        
             Document document = modelService.getDocument(uri);

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/jetspeed-portlet.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/jetspeed-portlet.xml?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/jetspeed-portlet.xml
(original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/jetspeed-portlet.xml
Wed Feb 23 12:54:11 2005
@@ -20,7 +20,7 @@
     xmlns:dc="http://www.purl.org/dc">
     
     <portlet>
-        <portlet-name>BrowserPortlet</portlet-name>
+        <portlet-name>graffitoBrowser</portlet-name>
         <dc:title>Graffito Browser Portlet</dc:title>
         <dc:creator>Graffito Team</dc:creator>
     </portlet>

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=155070&r2=155071
==============================================================================
--- 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 Feb 23 12:54:11 2005
@@ -17,6 +17,25 @@
 	</tr>
 #end
 
+#macro (formFieldText $label $value $MESSAGES $ERRORS)
+	#if ($ERRORS)
+		#set ($eflag = "$!ERRORS.get($id)")
+	#else
+		#set ($eflag = "")
+	#end
+	<tr>
+	    <th class="portlet-section-alternate"><font class="portlet-form-field-label">$!MESSAGES.getString($label)</font></th>
	
+		<td>
+			<p class="portlet-form-field">$!value</p>
+		</td>
+		#if ($!eflag == "")
+			<td width="5%" align="left">&nbsp;</td>
+		#else
+			<td width="5%" class="portlet-msg-error" align="left">&nbsp;</td>  
+		#end	
+	</tr>
+#end
+
 #macro (formFieldFile $label $value $size $id $MESSAGES $ERRORS)
 	#if ($ERRORS)
 		#set ($eflag = "$!ERRORS.get($id)")
@@ -118,14 +137,11 @@
 
 #macro (documentLink $document $graffitoTools $renderResponse)
 	
-	#if ($graffitoTools.requireGraffitoViewer($document))
-			<font class="portlet-menu-item">
-				<a href="$graffitoTools.getViewerServlet()?uri=$document.getUri()">$document.getTitle()</a>
-			</font>			
+	#if ($graffitoTools.requireGraffitoViewer($document))			
+		<a href="$graffitoTools.getViewerServlet()?uri=$document.getUri()">$document.getTitle()</a>
	
 	#else
-			<font class="portlet-menu-item">
-				<a href="$renderResponse.createRenderURL()?uri=$document.getUri()">$document.getTitle()</a>
-			</font>		
+		<a href="$renderResponse.createRenderURL()?uri=$document.getUri()">$document.getTitle()</a>
+
 	#end		
 	<font class="portlet-font-dim"> by $document.getOwner()</font>
 	<br>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm
(original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm
Wed Feb 23 12:54:11 2005
@@ -37,7 +37,7 @@
 							<tr>
 								#foreach ($folder in $folders)
 									<td>					
-										<img src="content/tigris/images/folder.gif" border="0"/><font class="portlet-portlet-item"><a
href="$renderResponse.createRenderURL()?uri=$folder.getUri()">$folder.getName()</a></font>

+										<img src="content/tigris/images/folder.gif" border="0"/><a href="$renderResponse.createRenderURL()?uri=$folder.getUri()">$folder.getName()</a>

 									</td>
 								#end
 							</tr>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-detail.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-detail.vm?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-detail.vm
(original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-detail.vm
Wed Feb 23 12:54:11 2005
@@ -23,15 +23,28 @@
 #set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
 #set ($folder = $browserInfo.getCurrentCmsObject())
 
-<div class="portlet-menu">$MESSAGES.getString('div.newfolder') #cmsPath($browserInfo.getCurrentServer()
$browserInfo.getFolderPath() $renderResponse $MESSAGES ) </div>
+
+<div class="portlet-menu">
+	#if($browserInfo.isUpdate())
+           $MESSAGES.getString('div.updatefolder') 
+	#else	
+		   $MESSAGES.getString('div.newfolder') 
+	#end
+	#cmsPath($browserInfo.getCurrentServer() $browserInfo.getFolderPath() $renderResponse $MESSAGES
) 
+</div>
 
 <div class="portlet-section-header">Folder Info </div>
 
 <!-- div class="portlet-section-header">Folder Info </div -->
 <form action="$renderResponse.createActionURL()" method="post">
-    <input type="hidden" name="uri" value="$folde.getUri()" size="100" maxlength="100"/>
-	<table border="0" cellspacing="2" cellpadding="3">
-		#formFieldInput('field.name' "$!folder.getName()" "25" 'name' $MESSAGES $ERRORS)
+    <input type="hidden" name="uri" value="$folder.getUri()" size="100" maxlength="100"/>

+	<table border="0" cellspacing="2" cellpadding="3">		
+		
+		#if($browserInfo.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>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-edit.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-edit.vm?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-edit.vm
(original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-edit.vm
Wed Feb 23 12:54:11 2005
@@ -52,11 +52,11 @@
 			<tr>
 				<td class="$cssClass"><input type="checkbox" name="uri" value="$folder.getUri()"
/></td>
 				<td class="$cssClass"><img src="content/tigris/images/folder.gif" border="0"/></td>
-				<td class="$cssClass">$folder.getName()</td>
+				<td class="$cssClass"><a href="$renderResponse.createActionURL()?uri=$folder.getUri()&folder.update=selected">$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.getModificationDate()</td>				
+				<td class="$cssClass">$!folder.getLastModified()</td>				
 			</tr>
 
 		#end
@@ -71,11 +71,11 @@
 			<tr>
 				<td class="$cssClass"><input type="checkbox" name="uri" value="$document.getUri()"
 /></td>
 				<td class="$cssClass">$document.getContentType() </td>		
-				<td class="$cssClass">$document.getName()</td>
+				<td class="$cssClass"><a href="$renderResponse.createActionURL()?uri=$document.getUri()&document.update=selected">$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.getModificationDate()</td>								
+				<td class="$cssClass">$!document.getLastModified()</td>								
 			</tr>
 
 		#end

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml?view=diff&r1=155070&r2=155071
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml Wed Feb 23 12:54:11
2005
@@ -24,6 +24,7 @@
 		<description>MVC Servlet for Jetspeed Portlet Applications</description>
 		<servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
 	</servlet>
+	
 	<!-- Define Velocity Servlet -->
 	<servlet>
 		<servlet-name>velocity</servlet-name>



Mime
View raw message