[jboss-svn-commits] JBoss Portal SVN: r5534 - in trunk/core/src: bin/portal-core-war/images/cms/admin bin/portal-core-war/themes/renaissance main/org/jboss/portal/core/portlet/cms/admin resources/portal-core-war/WEB-INF resources/portal-core-war/WEB-INF/classes resources/portal-core-war/WEB-INF/jsp/cms/admin

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Oct 31 13:06:00 EST 2006


Author: roy.russo at jboss.com
Date: 2006-10-31 13:04:36 -0500 (Tue, 31 Oct 2006)
New Revision: 5534

Added:
   trunk/core/src/bin/portal-core-war/images/cms/admin/downarrow.gif
   trunk/core/src/bin/portal-core-war/images/cms/admin/style.css
Removed:
   trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/menu.jsp
Modified:
   trunk/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
   trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
   trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties
   trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_en.properties
   trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_es.properties
   trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_fr.properties
   trunk/core/src/resources/portal-core-war/WEB-INF/jboss-portlet.xml
   trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/main.jsp
   trunk/core/src/resources/portal-core-war/WEB-INF/portlet.xml
Log:
JBPORTAL-1088 - Finished main page changes

Added: trunk/core/src/bin/portal-core-war/images/cms/admin/downarrow.gif
===================================================================
(Binary files differ)


Property changes on: trunk/core/src/bin/portal-core-war/images/cms/admin/downarrow.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/core/src/bin/portal-core-war/images/cms/admin/style.css
===================================================================
--- trunk/core/src/bin/portal-core-war/images/cms/admin/style.css	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/bin/portal-core-war/images/cms/admin/style.css	2006-10-31 18:04:36 UTC (rev 5534)
@@ -0,0 +1,110 @@
+
+.menu {
+   width: 150px;
+   font-size: 0.85em;
+   position: relative;
+   z-index: 100;
+}
+
+/* remove all the bullets, borders and padding from the default list styling */
+.menu ul {
+   padding: 0;
+   margin: 0;
+   list-style-type: none;
+}
+
+.menu ul ul {
+   width: 150px;
+}
+
+/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
+.menu li {
+   float: left;
+   width: 150px;
+   position: relative;
+}
+
+/* style the links for the top level */
+.menu a, .menu a:visited {
+   display: block;
+   font-size: 11px;
+   text-decoration: none;
+   width: 139px;
+   height: 20px;
+   border: 1px solid #fff;
+   border-width: 1px 1px 0 0;
+   padding-left: 5px;
+   line-height: 20px;
+}
+
+/* a hack so that IE5.5 faulty box model is corrected */
+* html .menu a, * html .menu a:visited {
+   width: 150px;
+   w\idth: 139px;
+}
+
+/* style the second level background */
+.menu ul ul a.drop, .menu ul ul a.drop:visited {
+   background: #E2E2E2;
+}
+
+/* style the second level hover */
+.menu ul ul a.drop:hover {
+   background: #E2E2E2;
+}
+
+.menu ul ul :hover > a.drop {
+   background: #E2E2E2;
+}
+
+/* hide the sub levels and give them a positon absolute so that they take up no room */
+.menu ul ul {
+   visibility: hidden;
+   position: absolute;
+   height: 0;
+   top: 20px;
+   left: 0;
+   width: 150px;
+}
+
+/* another hack for IE5.5 */
+* html .menu ul ul {
+   top: 20px;
+   t\op: 20px;
+}
+
+/* style the table so that it takes no ppart in the layout - required for IE to work */
+.menu table {
+   position: absolute;
+   top: 0;
+   left: 0;
+}
+
+/* style the second level links */
+.menu ul ul a, .menu ul ul a:visited {
+   background: #EDECEC;
+   height: auto;
+   line-height: 20px;
+   padding: 5px 10px;
+   width: 129px /* yet another hack for IE5.5 */
+}
+
+* html .menu ul ul a {
+   width: 150px;
+   w\idth: 129px;
+}
+
+/* style the top level hover */
+.menu a:hover, .menu ul ul a:hover {
+}
+
+.menu :hover > a, .menu ul ul :hover > a {
+   background: #E2E2E2;
+}
+
+/* make the second level visible when hover on first level list OR link */
+.menu ul li:hover ul,
+   .menu ul a:hover ul {
+   visibility: visible;
+   background: #EDECEC;
+}
\ No newline at end of file

Modified: trunk/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
===================================================================
--- trunk/core/src/bin/portal-core-war/themes/renaissance/portal_style.css	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/bin/portal-core-war/themes/renaissance/portal_style.css	2006-10-31 18:04:36 UTC (rev 5534)
@@ -993,12 +993,10 @@
 }
 
 .portlet-section-alternate {
-   font-size: 12px;
    background-color: #E6E8E5;
 }
 
 .portlet-section-selected {
-   font-size: 12px;
    background-color: #CBD4E6;
 }
 

Modified: trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java	2006-10-31 18:04:36 UTC (rev 5534)
@@ -370,472 +370,483 @@
       throws CMSException, PortletException
    {
       String op = aReq.getParameter("op");
-      if (CMSAdminConstants.OP_CREATE_COLLECTION.equals(op))
+
+      String dispatcher = aReq.getParameter("dispatch"); // Added for select box form post in main screen.
+      if (dispatcher == null)
       {
-         String sCreatePath = aReq.getParameter("destination");
-         String sFolderName = aReq.getParameter("newcollectionname");
-         String sFolderDescription = aReq.getParameter("newcollectiondescription");
-         if (!"".equals(sCreatePath) && !"".equals(sFolderName))
+         if (CMSAdminConstants.OP_CREATE_COLLECTION.equals(op))
          {
-            String sNewPath = FileUtil.cleanDoubleSlashes(sCreatePath + "/" + sFolderName);
+            String sCreatePath = aReq.getParameter("destination");
+            String sFolderName = aReq.getParameter("newcollectionname");
+            String sFolderDescription = aReq.getParameter("newcollectiondescription");
+            if (!"".equals(sCreatePath) && !"".equals(sFolderName))
+            {
+               String sNewPath = FileUtil.cleanDoubleSlashes(sCreatePath + "/" + sFolderName);
 
-            Folder folder = new FolderImpl();
-            folder.setCreationDate(new Date());
-            folder.setDescription(sFolderDescription);
-            folder.setTitle(sFolderName);
-            folder.setLastModified(new Date());
-            folder.setName(sFolderName);
-            folder.setBasePath(sNewPath);
+               Folder folder = new FolderImpl();
+               folder.setCreationDate(new Date());
+               folder.setDescription(sFolderDescription);
+               folder.setTitle(sFolderName);
+               folder.setLastModified(new Date());
+               folder.setName(sFolderName);
+               folder.setBasePath(sNewPath);
 
-            Command saveCMD = CMSService.getCommandFactory().createFolderSaveCommand(folder);
-            CMSService.execute(saveCMD);
+               Command saveCMD = CMSService.getCommandFactory().createFolderSaveCommand(folder);
+               CMSService.execute(saveCMD);
 
-            aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
-            aRes.setRenderParameter("path", sNewPath);
+               aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
+               aRes.setRenderParameter("path", sNewPath);
+            }
          }
-      }
-      else if (CMSAdminConstants.OP_UPLOADCONTENT.equals(op))
-      {
-         try
+         else if (CMSAdminConstants.OP_UPLOADCONTENT.equals(op))
          {
-            DiskFileItemFactory factory = new DiskFileItemFactory();
-            PortletFileUpload upload = new PortletFileUpload(factory); // TODO: configure uploader
-            String sPath = "";
-            String sDescription = "";
-            String sTitle = "";
-            String sLanguage = "";
-            List fileItems = upload.parseRequest(aReq);
-            Iterator itr = fileItems.iterator();
-            while (itr.hasNext())
+            try
             {
-               FileItem item = (FileItem)itr.next();
+               DiskFileItemFactory factory = new DiskFileItemFactory();
+               PortletFileUpload upload = new PortletFileUpload(factory); // TODO: configure uploader
+               String sPath = "";
+               String sDescription = "";
+               String sTitle = "";
+               String sLanguage = "";
+               List fileItems = upload.parseRequest(aReq);
+               Iterator itr = fileItems.iterator();
+               while (itr.hasNext())
+               {
+                  FileItem item = (FileItem)itr.next();
 
-               // check if the current item is a form field or an uploaded file
-               if (!item.isFormField())
-               {
-                  String sFilename = item.getName();
-                  int backslashIndex = sFilename.lastIndexOf("\\");
-                  if (backslashIndex > -1) // getWindows
+                  // check if the current item is a form field or an uploaded file
+                  if (!item.isFormField())
                   {
-                     sFilename = sFilename.substring(backslashIndex + 1);
-                  }
-                  else // unix
-                  {
-                     backslashIndex = sFilename.lastIndexOf("/");
-                     sFilename = sFilename.substring(backslashIndex + 1);
-                  }
+                     String sFilename = item.getName();
+                     int backslashIndex = sFilename.lastIndexOf("\\");
+                     if (backslashIndex > -1) // getWindows
+                     {
+                        sFilename = sFilename.substring(backslashIndex + 1);
+                     }
+                     else // unix
+                     {
+                        backslashIndex = sFilename.lastIndexOf("/");
+                        sFilename = sFilename.substring(backslashIndex + 1);
+                     }
 
-                  File file = new FileImpl();
-                  Content content = new ContentImpl();
+                     File file = new FileImpl();
+                     Content content = new ContentImpl();
 
-                  String fileExt = sFilename.substring(sFilename.lastIndexOf(".") + 1, sFilename.length());
-                  CMSMimeMappings mapper = new CMSMimeMappings();
-                  if (mapper.getMimeType(fileExt) != null)
-                  {
-                     content.setMimeType(mapper.getMimeType(fileExt));
-                  }
-                  else
-                  {
-                     content.setMimeType("application/octet-stream");
-                  }
+                     String fileExt = sFilename.substring(sFilename.lastIndexOf(".") + 1, sFilename.length());
+                     CMSMimeMappings mapper = new CMSMimeMappings();
+                     if (mapper.getMimeType(fileExt) != null)
+                     {
+                        content.setMimeType(mapper.getMimeType(fileExt));
+                     }
+                     else
+                     {
+                        content.setMimeType("application/octet-stream");
+                     }
 
-                  String sBasePath = FileUtil.cleanDoubleSlashes(sPath + "/" + sFilename);
-                  file.setBasePath(sBasePath);
+                     String sBasePath = FileUtil.cleanDoubleSlashes(sPath + "/" + sFilename);
+                     file.setBasePath(sBasePath);
 
-                  content.setTitle(sTitle);
-                  content.setDescription(sDescription);
-                  content.setBasePath(sBasePath + "/" + new Locale(sLanguage));
-                  content.setBytes(item.get());
-                  file.setContent(new Locale(sLanguage), content);
+                     content.setTitle(sTitle);
+                     content.setDescription(sDescription);
+                     content.setBasePath(sBasePath + "/" + new Locale(sLanguage));
+                     content.setBytes(item.get());
+                     file.setContent(new Locale(sLanguage), content);
 
-                  Command existsCMD = CMSService.getCommandFactory().createItemExistsCommand(content.getBasePath());
-                  Boolean bExists = (Boolean)CMSService.execute(existsCMD);
-                  if (bExists.booleanValue()) // if file exists, update contentNode
-                  {
-                     // force "make live"
-                     Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, true);
-                     CMSService.execute(cmdUpdate);
+                     Command existsCMD = CMSService.getCommandFactory().createItemExistsCommand(content.getBasePath());
+                     Boolean bExists = (Boolean)CMSService.execute(existsCMD);
+                     if (bExists.booleanValue()) // if file exists, update contentNode
+                     {
+                        // force "make live"
+                        Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, true);
+                        CMSService.execute(cmdUpdate);
+                     }
+                     else // if file doesnt exist, create the file and the contentNode.
+                     {
+                        Command newFileCMD = CMSService.getCommandFactory().createNewFileCommand(file, content);
+                        CMSService.execute(newFileCMD);
+                     }
+                     aRes.setRenderParameter("path", sBasePath);
                   }
-                  else // if file doesnt exist, create the file and the contentNode.
+                  else
                   {
-                     Command newFileCMD = CMSService.getCommandFactory().createNewFileCommand(file, content);
-                     CMSService.execute(newFileCMD);
+                     String fieldName = item.getFieldName();
+                     if ("destination".equals(fieldName))
+                     {
+                        sPath = item.getString();
+                     }
+                     else if ("description".equals(fieldName))
+                     {
+                        sDescription = item.getString();
+                     }
+                     else if ("title".equals(fieldName))
+                     {
+                        sTitle = item.getString();
+                     }
+                     else if ("language".equals(fieldName))
+                     {
+                        sLanguage = item.getString();
+                     }
                   }
-                  aRes.setRenderParameter("path", sBasePath);
                }
-               else
+            }
+            catch (Exception e)
+            {
+               throw new PortletException(e);
+            }
+            aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
+         }
+         else if (CMSAdminConstants.OP_UPLOADARCHIVE.equals(op))
+         {
+            try
+            {
+               DiskFileItemFactory factory = new DiskFileItemFactory();
+               PortletFileUpload upload = new PortletFileUpload(factory);
+               String sPath = "";
+               String sLanguage = "";
+               List fileItems = upload.parseRequest(aReq);
+               Iterator itr = fileItems.iterator();
+               while (itr.hasNext())
                {
-                  String fieldName = item.getFieldName();
-                  if ("destination".equals(fieldName))
+                  FileItem item = (FileItem)itr.next();
+
+                  // check if the current item is a form field or an uploaded file
+                  if (!item.isFormField())
                   {
-                     sPath = item.getString();
+                     InputStream is = item.getInputStream();
+                     Command storearchiveCMD = CMSService.getCommandFactory().createStoreArchiveCommand(sPath, is, sLanguage);
+                     List contentstoVersion = (List)CMSService.execute(storearchiveCMD);
+
+                     Command createVersions = CMSService.getCommandFactory().createContentCreateNewVersionCommand(contentstoVersion, true);
+                     CMSService.execute(createVersions);
+
+                     aRes.setRenderParameter("path", FileUtil.cleanDoubleSlashes(sPath));
                   }
-                  else if ("description".equals(fieldName))
+                  else
                   {
-                     sDescription = item.getString();
+                     String fieldName = item.getFieldName();
+                     if ("destination".equals(fieldName))
+                     {
+                        sPath = item.getString();
+                     }
+                     else if ("language".equals(fieldName))
+                     {
+                        sLanguage = item.getString();
+                     }
                   }
-                  else if ("title".equals(fieldName))
-                  {
-                     sTitle = item.getString();
-                  }
-                  else if ("language".equals(fieldName))
-                  {
-                     sLanguage = item.getString();
-                  }
                }
             }
+            catch (Exception e)
+            {
+               throw new PortletException(e);
+            }
+            aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
          }
-         catch (Exception e)
+         else if (CMSAdminConstants.OP_COPY.equals(op))
          {
-            throw new PortletException(e);
-         }
-         aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
-      }
-      else if (CMSAdminConstants.OP_UPLOADARCHIVE.equals(op))
-      {
-         try
-         {
-            DiskFileItemFactory factory = new DiskFileItemFactory();
-            PortletFileUpload upload = new PortletFileUpload(factory);
-            String sPath = "";
-            String sLanguage = "";
-            List fileItems = upload.parseRequest(aReq);
-            Iterator itr = fileItems.iterator();
-            while (itr.hasNext())
+            String sTo = aReq.getParameter("destination");
+            String sFrom = aReq.getParameter("source");
+            String sType = aReq.getParameter("type");
+            if (!"".equals(sTo) && !"".equals(sFrom) && !"".equals(sType))
             {
-               FileItem item = (FileItem)itr.next();
+               String sNodeName = sFrom.substring(sFrom.lastIndexOf("/") + 1, sFrom.length());
+               sTo = FileUtil.cleanDoubleSlashes(sTo + "/" + sNodeName);
 
-               // check if the current item is a form field or an uploaded file
-               if (!item.isFormField())
+               Command copyCommand = CMSService.getCommandFactory().createCopyCommand(sFrom, sTo);
+               CMSService.execute(copyCommand);
+
+               if ("fo".equalsIgnoreCase(sType))
                {
-                  InputStream is = item.getInputStream();
-                  Command storearchiveCMD = CMSService.getCommandFactory().createStoreArchiveCommand(sPath, is, sLanguage);
-                  List contentstoVersion = (List)CMSService.execute(storearchiveCMD);
-
-                  Command createVersions = CMSService.getCommandFactory().createContentCreateNewVersionCommand(contentstoVersion, true);
-                  CMSService.execute(createVersions);
-
-                  aRes.setRenderParameter("path", FileUtil.cleanDoubleSlashes(sPath));
+                  aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
                }
-               else
+               else if ("fi".equalsIgnoreCase(sType))
                {
-                  String fieldName = item.getFieldName();
-                  if ("destination".equals(fieldName))
-                  {
-                     sPath = item.getString();
-                  }
-                  else if ("language".equals(fieldName))
-                  {
-                     sLanguage = item.getString();
-                  }
+                  aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
                }
+               aRes.setRenderParameter("path", sTo);
             }
          }
-         catch (Exception e)
+         else if (CMSAdminConstants.OP_MOVE.equals(op))
          {
-            throw new PortletException(e);
-         }
-         aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
-      }
-      else if (CMSAdminConstants.OP_COPY.equals(op))
-      {
-         String sTo = aReq.getParameter("destination");
-         String sFrom = aReq.getParameter("source");
-         String sType = aReq.getParameter("type");
-         if (!"".equals(sTo) && !"".equals(sFrom) && !"".equals(sType))
-         {
-            String sNodeName = sFrom.substring(sFrom.lastIndexOf("/") + 1, sFrom.length());
-            sTo = FileUtil.cleanDoubleSlashes(sTo + "/" + sNodeName);
+            String sTo = aReq.getParameter("destination");
+            String sFrom = aReq.getParameter("source");
+            String sType = aReq.getParameter("type");
 
-            Command copyCommand = CMSService.getCommandFactory().createCopyCommand(sFrom, sTo);
-            CMSService.execute(copyCommand);
-
-            if ("fo".equalsIgnoreCase(sType))
+            if (!"".equals(sTo) && !"".equals(sFrom) && !"".equals(sType))
             {
-               aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
-            }
-            else if ("fi".equalsIgnoreCase(sType))
-            {
-               aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
-            }
-            aRes.setRenderParameter("path", sTo);
-         }
-      }
-      else if (CMSAdminConstants.OP_MOVE.equals(op))
-      {
-         String sTo = aReq.getParameter("destination");
-         String sFrom = aReq.getParameter("source");
-         String sType = aReq.getParameter("type");
+               String sNodeName = sFrom.substring(sFrom.lastIndexOf("/") + 1, sFrom.length());
+               sTo = FileUtil.cleanDoubleSlashes(sTo + "/" + sNodeName);
+               if ("fo".equalsIgnoreCase(sType))
+               {
+                  aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
+               }
+               else if ("fi".equalsIgnoreCase(sType))
+               {
+                  aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
+               }
+               Command moveCommand = CMSService.getCommandFactory().createMoveCommand(sFrom, sTo);
+               CMSService.execute(moveCommand);
 
-         if (!"".equals(sTo) && !"".equals(sFrom) && !"".equals(sType))
-         {
-            String sNodeName = sFrom.substring(sFrom.lastIndexOf("/") + 1, sFrom.length());
-            sTo = FileUtil.cleanDoubleSlashes(sTo + "/" + sNodeName);
-            if ("fo".equalsIgnoreCase(sType))
-            {
-               aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
+               aRes.setRenderParameter("path", sTo);
             }
-            else if ("fi".equalsIgnoreCase(sType))
-            {
-               aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
-            }
-            Command moveCommand = CMSService.getCommandFactory().createMoveCommand(sFrom, sTo);
-            CMSService.execute(moveCommand);
-
-            aRes.setRenderParameter("path", sTo);
          }
-      }
-      else if (CMSAdminConstants.OP_DELETE.equals(op))
-      {
-         String sPath = aReq.getParameter("path");
-         if (!"".equals(sPath))
+         else if (CMSAdminConstants.OP_DELETE.equals(op))
          {
-            Command deleteCMD = CMSService.getCommandFactory().createDeleteCommand(sPath);
-            CMSService.execute(deleteCMD);
-            try
+            String sPath = aReq.getParameter("path");
+            if (!"".equals(sPath))
             {
-               String sParentPath = NodeUtil.getParentPath(sPath);
-               aRes.setRenderParameter("path", sParentPath);
-            }
-            catch (Exception e)
-            {
+               Command deleteCMD = CMSService.getCommandFactory().createDeleteCommand(sPath);
+               CMSService.execute(deleteCMD);
+               try
+               {
+                  String sParentPath = NodeUtil.getParentPath(sPath);
+                  aRes.setRenderParameter("path", sParentPath);
+               }
+               catch (Exception e)
+               {
 
+               }
             }
+            aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
          }
-         aRes.setRenderParameter("op", CMSAdminConstants.OP_MAIN);
-      }
-      else if (CMSAdminConstants.OP_EDIT_BINARY.equals(op))
-      {
-         try
+         else if (CMSAdminConstants.OP_EDIT_BINARY.equals(op))
          {
-            DiskFileItemFactory factory = new DiskFileItemFactory();
-            PortletFileUpload upload = new PortletFileUpload(factory); // TODO: configure uploader
-            String sPath = "";
-            String sDescription = "";
-            String sTitle = "";
-            String sLanguage = "";
-            String sMakeLive = "";
-            List fileItems = upload.parseRequest(aReq);
-            Iterator itr = fileItems.iterator();
-            while (itr.hasNext())
+            try
             {
-               FileItem item = (FileItem)itr.next();
+               DiskFileItemFactory factory = new DiskFileItemFactory();
+               PortletFileUpload upload = new PortletFileUpload(factory); // TODO: configure uploader
+               String sPath = "";
+               String sDescription = "";
+               String sTitle = "";
+               String sLanguage = "";
+               String sMakeLive = "";
+               List fileItems = upload.parseRequest(aReq);
+               Iterator itr = fileItems.iterator();
+               while (itr.hasNext())
+               {
+                  FileItem item = (FileItem)itr.next();
 
-               // check if the current item is a form field or an uploaded file
-               if (!item.isFormField())
-               {
-                  String sFilename = item.getName();
-                  int backslashIndex = sFilename.lastIndexOf("\\");
-                  if (backslashIndex > -1) // getWindows
+                  // check if the current item is a form field or an uploaded file
+                  if (!item.isFormField())
                   {
-                     sFilename = sFilename.substring(backslashIndex + 1);
-                  }
-                  else // unix
-                  {
-                     backslashIndex = sFilename.lastIndexOf("/");
-                     sFilename = sFilename.substring(backslashIndex + 1);
-                  }
+                     String sFilename = item.getName();
+                     int backslashIndex = sFilename.lastIndexOf("\\");
+                     if (backslashIndex > -1) // getWindows
+                     {
+                        sFilename = sFilename.substring(backslashIndex + 1);
+                     }
+                     else // unix
+                     {
+                        backslashIndex = sFilename.lastIndexOf("/");
+                        sFilename = sFilename.substring(backslashIndex + 1);
+                     }
 
-                  File file = new FileImpl();
-                  String sBasePath = FileUtil.cleanDoubleSlashes(sPath);
-                  file.setBasePath(sBasePath);
+                     File file = new FileImpl();
+                     String sBasePath = FileUtil.cleanDoubleSlashes(sPath);
+                     file.setBasePath(sBasePath);
 
-                  Content content = new ContentImpl();
-                  String fileExt = sFilename.substring(sFilename.lastIndexOf(".") + 1, sFilename.length());
-                  CMSMimeMappings mapper = new CMSMimeMappings();
-                  if (mapper.getMimeType(fileExt) != null)
-                  {
-                     content.setMimeType(mapper.getMimeType(fileExt));
-                  }
-                  else
-                  {
-                     content.setMimeType("");
-                  }
-                  content.setTitle(sTitle);
-                  content.setDescription(sDescription);
-                  content.setBasePath(sBasePath + "/" + sLanguage);
-                  content.setBytes(item.get());
-                  file.setContent(new Locale(sLanguage), content);
+                     Content content = new ContentImpl();
+                     String fileExt = sFilename.substring(sFilename.lastIndexOf(".") + 1, sFilename.length());
+                     CMSMimeMappings mapper = new CMSMimeMappings();
+                     if (mapper.getMimeType(fileExt) != null)
+                     {
+                        content.setMimeType(mapper.getMimeType(fileExt));
+                     }
+                     else
+                     {
+                        content.setMimeType("");
+                     }
+                     content.setTitle(sTitle);
+                     content.setDescription(sDescription);
+                     content.setBasePath(sBasePath + "/" + sLanguage);
+                     content.setBytes(item.get());
+                     file.setContent(new Locale(sLanguage), content);
 
-                  boolean bMakeLive = false;
-                  if ("on".equalsIgnoreCase(sMakeLive))
-                  {
-                     bMakeLive = true;
-                  }
-                  Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, bMakeLive);
-                  CMSService.execute(cmdUpdate);
+                     boolean bMakeLive = false;
+                     if ("on".equalsIgnoreCase(sMakeLive))
+                     {
+                        bMakeLive = true;
+                     }
+                     Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, bMakeLive);
+                     CMSService.execute(cmdUpdate);
 
-                  aRes.setRenderParameter("path", sBasePath);
-               }
-               else
-               {
-                  String fieldName = item.getFieldName();
-                  if ("destination".equals(fieldName))
-                  {
-                     sPath = item.getString();
+                     aRes.setRenderParameter("path", sBasePath);
                   }
-                  else if ("description".equals(fieldName))
+                  else
                   {
-                     sDescription = item.getString();
+                     String fieldName = item.getFieldName();
+                     if ("destination".equals(fieldName))
+                     {
+                        sPath = item.getString();
+                     }
+                     else if ("description".equals(fieldName))
+                     {
+                        sDescription = item.getString();
+                     }
+                     else if ("makelive".equals(fieldName))
+                     {
+                        sMakeLive = item.getString();
+                     }
+                     else if ("title".equals(fieldName))
+                     {
+                        sTitle = item.getString();
+                     }
+                     else if ("language".equals(fieldName))
+                     {
+                        sLanguage = item.getString();
+                     }
                   }
-                  else if ("makelive".equals(fieldName))
-                  {
-                     sMakeLive = item.getString();
-                  }
-                  else if ("title".equals(fieldName))
-                  {
-                     sTitle = item.getString();
-                  }
-                  else if ("language".equals(fieldName))
-                  {
-                     sLanguage = item.getString();
-                  }
                }
             }
+            catch (Exception e)
+            {
+               throw new PortletException(e);
+            }
+            aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
          }
-         catch (Exception e)
+         else if (CMSAdminConstants.OP_SAVENEWTEXT.equals(op))
          {
-            throw new PortletException(e);
-         }
-         aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
-      }
-      else if (CMSAdminConstants.OP_SAVENEWTEXT.equals(op))
-      {
-         String sFileName = aReq.getParameter("filename");
-         String sDirectory = aReq.getParameter("savetopath");
-         String sTitle = aReq.getParameter("title");
-         String sDescription = aReq.getParameter("description");
-         String sLanguage = aReq.getParameter("language");
-         if (!"".equals(sFileName) && !"".equals(sDirectory))
-         {
-            String sContent = aReq.getParameter("elm1");
-            String sNewFilePath = FileUtil.cleanDoubleSlashes(sDirectory + "/" + sFileName);
+            String sFileName = aReq.getParameter("filename");
+            String sDirectory = aReq.getParameter("savetopath");
+            String sTitle = aReq.getParameter("title");
+            String sDescription = aReq.getParameter("description");
+            String sLanguage = aReq.getParameter("language");
+            if (!"".equals(sFileName) && !"".equals(sDirectory))
+            {
+               String sContent = aReq.getParameter("elm1");
+               String sNewFilePath = FileUtil.cleanDoubleSlashes(sDirectory + "/" + sFileName);
 
-            File file = new FileImpl();
-            Content content = new ContentImpl();
+               File file = new FileImpl();
+               Content content = new ContentImpl();
 
-            String fileExt = sFileName.substring(sFileName.lastIndexOf(".") + 1, sFileName.length());
-            CMSMimeMappings mapper = new CMSMimeMappings();
-            if (mapper.getMimeType(fileExt) != null)
-            {
-               content.setMimeType(mapper.getMimeType(fileExt));
-            }
-            else
-            {
-               content.setMimeType("text/plain");
-            }
+               String fileExt = sFileName.substring(sFileName.lastIndexOf(".") + 1, sFileName.length());
+               CMSMimeMappings mapper = new CMSMimeMappings();
+               if (mapper.getMimeType(fileExt) != null)
+               {
+                  content.setMimeType(mapper.getMimeType(fileExt));
+               }
+               else
+               {
+                  content.setMimeType("text/plain");
+               }
 
-            String sBasePath = FileUtil.cleanDoubleSlashes(sNewFilePath);
-            file.setBasePath(sBasePath);
+               String sBasePath = FileUtil.cleanDoubleSlashes(sNewFilePath);
+               file.setBasePath(sBasePath);
 
-            content.setTitle(sTitle);
-            content.setDescription(sDescription);
-            content.setBasePath(sBasePath + "/" + new Locale(sLanguage));
-            content.setBytes(sContent.getBytes());
-            file.setContent(new Locale(sLanguage), content);
+               content.setTitle(sTitle);
+               content.setDescription(sDescription);
+               content.setBasePath(sBasePath + "/" + new Locale(sLanguage));
+               content.setBytes(sContent.getBytes());
+               file.setContent(new Locale(sLanguage), content);
 
 
-            Command existsCMD = CMSService.getCommandFactory().createItemExistsCommand(content.getBasePath());
-            Boolean bExists = (Boolean)CMSService.execute(existsCMD);
-            if (bExists.booleanValue()) // if file exists, update contentNode
-            {
-               Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, true);
-               CMSService.execute(cmdUpdate);
+               Command existsCMD = CMSService.getCommandFactory().createItemExistsCommand(content.getBasePath());
+               Boolean bExists = (Boolean)CMSService.execute(existsCMD);
+               if (bExists.booleanValue()) // if file exists, update contentNode
+               {
+                  Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, true);
+                  CMSService.execute(cmdUpdate);
+               }
+               else // if file doesnt exist, create the file and the contentNode.
+               {
+                  Command newFileCMD = CMSService.getCommandFactory().createNewFileCommand(file, content);
+                  CMSService.execute(newFileCMD);
+               }
+               aRes.setRenderParameter("path", sNewFilePath);
             }
-            else // if file doesnt exist, create the file and the contentNode.
-            {
-               Command newFileCMD = CMSService.getCommandFactory().createNewFileCommand(file, content);
-               CMSService.execute(newFileCMD);
-            }
-            aRes.setRenderParameter("path", sNewFilePath);
-         }
 
-         aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
-      }
-      else if (CMSAdminConstants.OP_SAVETEXT.equals(op))
-      {
-         String sFilePath = aReq.getParameter("savetopath");
-         String sTitle = aReq.getParameter("title");
-         String sDescription = aReq.getParameter("description");
-         String sLanguage = aReq.getParameter("language");
-         String sMakeLive = "off";
-         if (aReq.getParameterValues("makelive") != null)
-         {
-            sMakeLive = "on";
+            aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
          }
-
-         if (!"".equals(sFilePath))
+         else if (CMSAdminConstants.OP_SAVETEXT.equals(op))
          {
-            String sContent = aReq.getParameter("elm1");
-
-            File file = new FileImpl();
-            Content content = new ContentImpl();
-
-            String fileExt = sFilePath.substring(sFilePath.lastIndexOf(".") + 1, sFilePath.length());
-            CMSMimeMappings mapper = new CMSMimeMappings();
-            if (mapper.getMimeType(fileExt) != null)
+            String sFilePath = aReq.getParameter("savetopath");
+            String sTitle = aReq.getParameter("title");
+            String sDescription = aReq.getParameter("description");
+            String sLanguage = aReq.getParameter("language");
+            String sMakeLive = "off";
+            if (aReq.getParameterValues("makelive") != null)
             {
-               content.setMimeType(mapper.getMimeType(fileExt));
+               sMakeLive = "on";
             }
-            else
+
+            if (!"".equals(sFilePath))
             {
-               content.setMimeType("text/plain");
-            }
+               String sContent = aReq.getParameter("elm1");
 
-            file.setBasePath(sFilePath);
+               File file = new FileImpl();
+               Content content = new ContentImpl();
 
-            content.setTitle(sTitle);
-            content.setDescription(sDescription);
-            content.setBasePath(sFilePath + "/" + new Locale(sLanguage).getLanguage());
-            content.setBytes(sContent.getBytes());
-            file.setContent(new Locale(sLanguage), content);
+               String fileExt = sFilePath.substring(sFilePath.lastIndexOf(".") + 1, sFilePath.length());
+               CMSMimeMappings mapper = new CMSMimeMappings();
+               if (mapper.getMimeType(fileExt) != null)
+               {
+                  content.setMimeType(mapper.getMimeType(fileExt));
+               }
+               else
+               {
+                  content.setMimeType("text/plain");
+               }
 
-            boolean bMakeLive = false;
-            if ("on".equalsIgnoreCase(sMakeLive))
-            {
-               bMakeLive = true;
-            }
+               file.setBasePath(sFilePath);
 
-            Command existsCMD = CMSService.getCommandFactory().createItemExistsCommand(content.getBasePath());
-            Boolean bExists = (Boolean)CMSService.execute(existsCMD);
-            if (bExists.booleanValue()) // if file exists, update contentNode
-            {
-               // force "make live"
-               Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, bMakeLive);
-               CMSService.execute(cmdUpdate);
+               content.setTitle(sTitle);
+               content.setDescription(sDescription);
+               content.setBasePath(sFilePath + "/" + new Locale(sLanguage).getLanguage());
+               content.setBytes(sContent.getBytes());
+               file.setContent(new Locale(sLanguage), content);
+
+               boolean bMakeLive = false;
+               if ("on".equalsIgnoreCase(sMakeLive))
+               {
+                  bMakeLive = true;
+               }
+
+               Command existsCMD = CMSService.getCommandFactory().createItemExistsCommand(content.getBasePath());
+               Boolean bExists = (Boolean)CMSService.execute(existsCMD);
+               if (bExists.booleanValue()) // if file exists, update contentNode
+               {
+                  // force "make live"
+                  Command cmdUpdate = CMSService.getCommandFactory().createUpdateFileCommand(file, content, bMakeLive);
+                  CMSService.execute(cmdUpdate);
+               }
+               else // if file doesnt exist, create the file and the contentNode.
+               {
+                  Command newFileCMD = CMSService.getCommandFactory().createNewFileCommand(file, content);
+                  CMSService.execute(newFileCMD);
+               }
+               aRes.setRenderParameter("path", sFilePath);
             }
-            else // if file doesnt exist, create the file and the contentNode.
-            {
-               Command newFileCMD = CMSService.getCommandFactory().createNewFileCommand(file, content);
-               CMSService.execute(newFileCMD);
-            }
-            aRes.setRenderParameter("path", sFilePath);
+            aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
          }
-         aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
-      }
-      else if (CMSAdminConstants.OP_EXPORTARCHIVE.equals(op))
-      {
-         String sTarget = aReq.getParameter("destination");
-         String sLanguage = aReq.getParameter("language");
-
-         if (sTarget != null)
+         else if (CMSAdminConstants.OP_EXPORTARCHIVE.equals(op))
          {
-            // build export
-            Command getArchiveCMD = CMSService.getCommandFactory().createGetArchiveCommand(sTarget, sLanguage);
-            java.io.File zipOut = (java.io.File)CMSService.execute(getArchiveCMD);
+            String sTarget = aReq.getParameter("destination");
+            String sLanguage = aReq.getParameter("language");
 
-            aRes.setRenderParameter("path", sTarget);
-            aRes.setRenderParameter("op", CMSAdminConstants.OP_EXPORTARCHIVE_PICKUP);
-            try
+            if (sTarget != null)
             {
-               aRes.setRenderParameter("filepath", zipOut.getCanonicalPath());
+               // build export
+               Command getArchiveCMD = CMSService.getCommandFactory().createGetArchiveCommand(sTarget, sLanguage);
+               java.io.File zipOut = (java.io.File)CMSService.execute(getArchiveCMD);
+
+               aRes.setRenderParameter("path", sTarget);
+               aRes.setRenderParameter("op", CMSAdminConstants.OP_EXPORTARCHIVE_PICKUP);
+               try
+               {
+                  aRes.setRenderParameter("filepath", zipOut.getCanonicalPath());
+               }
+               catch (IOException ioe)
+               {
+                  ioe.printStackTrace();
+               }
             }
-            catch (IOException ioe)
-            {
-               ioe.printStackTrace();
-            }
          }
       }
+      else
+      {
+         aRes.setRenderParameter("path", aReq.getParameter("path"));
+         aRes.setRenderParameter("type", aReq.getParameter("type"));
+         aRes.setRenderParameter("op", op);
+      }
    }
 
    /**

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties	2006-10-31 18:04:36 UTC (rev 5534)
@@ -334,7 +334,7 @@
 CMS_UPLOAD=Upload
 CMS_MODIFY=Modify
 CMS_CREATEFOLDER= Create Folder
-CMS_CREATEFILE=Create Directory
+CMS_CREATEFILE=Create File
 CMS_UPLOADARCHIVE=Upload Archive
 CMS_BACKTOBROWSER=Back to Directory Browser
 CMS_TRANSFER=Import/Export

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_en.properties
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_en.properties	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_en.properties	2006-10-31 18:04:36 UTC (rev 5534)
@@ -332,7 +332,7 @@
 CMS_UPLOAD=Upload
 CMS_MODIFY=Modify
 CMS_CREATEFOLDER= Create Folder
-CMS_CREATEFILE=Create Directory
+CMS_CREATEFILE=Create File
 CMS_UPLOADARCHIVE=Upload Archive
 CMS_BACKTOBROWSER=Back to Directory Browser
 CMS_TRANSFER=Import/Export

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_es.properties
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_es.properties	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_es.properties	2006-10-31 18:04:36 UTC (rev 5534)
@@ -313,6 +313,49 @@
 TITLE_CREATE=Crear fichero
 TITLE_UPLOAD=Subir fichero
 
+CMS_MENU=Action Menu
+CMS_ACTION=Action
+CMS_NAME=Name
+CMS_TYPE=Type
+CMS_CREATED=Created
+CMS_MODIFIED=Modified
+CMS_DESCRIPTION=Description
+CMS_VIEW=View
+CMS_COPY=Copy
+CMS_MOVE=Move
+CMS_DELETE=Delete
+CMS_FOLDER=Folder
+CMS_FILE=File
+CMS_CREATE=Create
+CMS_EDIT=Edit
+CMS_UPLOAD=Upload
+CMS_MODIFY=Modify
+CMS_CREATEFOLDER= Create Folder
+CMS_CREATEFILE=Create File
+CMS_UPLOADARCHIVE=Upload Archive
+CMS_BACKTOBROWSER=Back to Directory Browser
+CMS_TRANSFER=Import/Export
+CMS_EXPORTARCHIVE=Export Folder
+
+CMS_CREATEFILEINDIR=Creating File in Directory
+CMS_FILENAME=FileName
+CMS_TITLE=Title
+CMS_LANGUAGE=Language
+
+CMS_DELETEPATH=Confirm Deletion of
+CMS_DELETEWARN1=WARNING! You will not be able to undo these change\!
+CMS_DELETEWARN2=Are you sure you want to delete this resource\?
+
+CMS_DESTINATION=Destination
+CMS_SOURCE=Source
+
+CMS_EDITING=Editing File
+CMS_LIVE=Make \"Live\"
+CMS_VERSION=Version
+
+CMS_LIVEVERSION=Live Version
+CMS_SIZE=Size
+
 VALIDATIONEMAIL_1=Un usuario con esta dirección de email se ha registado en nuestro sitio.
 VALIDATIONEMAIL_2=Por favor, mantenga este correo para su registro. La información de su cuenta es la siguiente
 VALIDATIONEMAIL_3=Su cuenta está actualmente inactiva. No puede usarla hasta que visite el siguiente enlace

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_fr.properties
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_fr.properties	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_fr.properties	2006-10-31 18:04:36 UTC (rev 5534)
@@ -283,6 +283,49 @@
 TITLE_CREATE=Creer le fichier
 TITLE_UPLOAD=Charger le fichier
 
+CMS_MENU=Action Menu
+CMS_ACTION=Action
+CMS_NAME=Name
+CMS_TYPE=Type
+CMS_CREATED=Created
+CMS_MODIFIED=Modified
+CMS_DESCRIPTION=Description
+CMS_VIEW=View
+CMS_COPY=Copy
+CMS_MOVE=Move
+CMS_DELETE=Delete
+CMS_FOLDER=Folder
+CMS_FILE=File
+CMS_CREATE=Create
+CMS_EDIT=Edit
+CMS_UPLOAD=Upload
+CMS_MODIFY=Modify
+CMS_CREATEFOLDER= Create Folder
+CMS_CREATEFILE=Create File
+CMS_UPLOADARCHIVE=Upload Archive
+CMS_BACKTOBROWSER=Back to Directory Browser
+CMS_TRANSFER=Import/Export
+CMS_EXPORTARCHIVE=Export Folder
+
+CMS_CREATEFILEINDIR=Creating File in Directory
+CMS_FILENAME=FileName
+CMS_TITLE=Title
+CMS_LANGUAGE=Language
+
+CMS_DELETEPATH=Confirm Deletion of
+CMS_DELETEWARN1=WARNING! You will not be able to undo these change\!
+CMS_DELETEWARN2=Are you sure you want to delete this resource\?
+
+CMS_DESTINATION=Destination
+CMS_SOURCE=Source
+
+CMS_EDITING=Editing File
+CMS_LIVE=Make \"Live\"
+CMS_VERSION=Version
+
+CMS_LIVEVERSION=Live Version
+CMS_SIZE=Size
+
 VALIDATIONEMAIL_1=Un utilisateur s'est enregistre avec cette adresse email.
 VALIDATIONEMAIL_2=Merci de garder cet email. Vos informations sont les suivantes
 VALIDATIONEMAIL_3=Votre compte est desactive pour le moment. Vous en pouvez pas l'utiliser tant que vous n'aurez pas clique sur le lien suivant

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jboss-portlet.xml	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jboss-portlet.xml	2006-10-31 18:04:36 UTC (rev 5534)
@@ -34,13 +34,13 @@
          <script type="text/javascript" language="javascript">
             function hideShow(id)
             {
-               var navpoint = document.getElementById(id);
-               if (navpoint.className == 'hidden') {
-                  navpoint.className = 'shown';
-               } else {
-                  navpoint.className = 'hidden';
-               }
+            var navpoint = document.getElementById(id);
+            if (navpoint.className == 'hidden') {
+            navpoint.className = 'shown';
+            } else {
+            navpoint.className = 'hidden';
             }
+            }
          </script>
       </header-content>
       <transaction>
@@ -48,7 +48,10 @@
       </transaction>
    </portlet>
    <portlet>
-      <portlet-name>AdminCMSPortlet</portlet-name>
+      <portlet-name>CMSAdminPortlet</portlet-name>
+      <header-content>
+         <link rel="stylesheet" type="text/css" href="/images/cms/admin/style.css" title="" media="screen"/>
+      </header-content>
       <transaction>
          <trans-attribute>Required</trans-attribute>
       </transaction>

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/main.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/main.jsp	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/main.jsp	2006-10-31 18:04:36 UTC (rev 5534)
@@ -1,6 +1,10 @@
 <%@ page import="org.jboss.portal.cms.model.File" %>
 <%@ page import="org.jboss.portal.cms.model.Folder" %>
+<%@ page import="org.jboss.portal.core.portlet.cms.admin.CMSAdminConstants" %>
+<%@ page import="java.text.Format" %>
+<%@ page import="java.text.SimpleDateFormat" %>
 <%@ page import="java.util.List" %>
+<%@ page import="java.util.StringTokenizer" %>
 <%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
 <%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
@@ -10,80 +14,177 @@
 
 
 <%
-   String sCurrPath = (String) request.getAttribute("currpath");
-   List folders = (List) request.getAttribute("folders");
-   List files = (List) request.getAttribute("files");
+   String sCurrPath = (String)request.getAttribute("currpath");
+   List folders = (List)request.getAttribute("folders");
+   List files = (List)request.getAttribute("files");
+   String createDate = "";
+   String modifiedDate = "";
 %>
 
 <br>
 
-<div align="center"><b>${n:i18n("TITLE_BROWSE")}</b></div>
+Use the CMS Administration portlet to manage the content of your portal.
 
-<%@ include file="menu.jsp" %>
+<hr/>
 
+<!-- Currently browsing -->
+Browsing: <a href="<portlet:renderURL>
+<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
+<portlet:param name="path" value="/"/>
+        </portlet:renderURL>">Home</a>
 <%
-   if(folders.size() > 0 || files.size() > 0)
+   StringTokenizer parser = new StringTokenizer(sCurrPath, "/");
+   String sPathBuilder = "";
+   while (parser.hasMoreTokens())
    {
+      String sPathChunk = parser.nextToken();
+      sPathBuilder += "/" + sPathChunk;
+      if (parser.hasMoreTokens())
+      {
 %>
+>&nbsp;<a href="
+<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
+   <portlet:param name="path" value="<%= sPathBuilder %>"/>
+</portlet:renderURL>
+"><%= sPathChunk %>
+</a>
+<%
+}
+else
+{
+%>
+>&nbsp;<%= sPathChunk %>
+<%
+      }
+   }
+%>
 
+<br/><br/>
+
+<!-- folder-level action dropdown -->
+<div class="menu">
+   <ul>
+      <li><a href="#">Select Action <img
+         src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/downarrow.gif"
+         border="0"></a>
+         <ul>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRM_CREATE_COLLECTION %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   </portlet:renderURL>">${n:i18n("CMS_CREATEFOLDER")}</a></li>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CREATENEWTEXT %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   </portlet:renderURL>">${n:i18n("CMS_CREATEFILE")}</a></li>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_UPLOADCONFIRM %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   </portlet:renderURL>">${n:i18n("TITLE_UPLOAD")}</a></li>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_UPLOADARCHIVECONFIRM %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   </portlet:renderURL>">${n:i18n("CMS_UPLOADARCHIVE")}</a></li>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_EXPORTARCHIVE %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   </portlet:renderURL>">${n:i18n("CMS_EXPORTARCHIVE")}</a></li>
+            <%
+               if (!"/".equals(sCurrPath))
+               {
+            %>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMCOPY %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   <portlet:param name="type" value="fo"/>
+   </portlet:renderURL>">${n:i18n("CMS_COPY")}</a></li>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMMOVE %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   <portlet:param name="type" value="fo"/>
+   </portlet:renderURL>">${n:i18n("CMS_MOVE")}</a></li>
+            <li><a href="<portlet:renderURL>
+   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMDELETE %>"/>
+   <portlet:param name="path" value="<%= sCurrPath %>"/>
+   </portlet:renderURL>">${n:i18n("CMS_DELETE")}</a></li>
+            <% } %>
+         </ul>
+      </li>
+   </ul>
+</div>
+
+<br/><br/>
+
+<%
+
+   if (folders.size() > 0 || files.size() > 0)
+   {
+
+%>
+
 <table width="100%" border="0" cellspacing="2" cellpadding="2">
 <tr>
+   <td class="portlet-section-header">${n:i18n("CMS_NAME")}</td>
    <td class="portlet-section-header">${n:i18n("CMS_ACTION")}</td>
-   <td class="portlet-section-header">${n:i18n("CMS_NAME")}</td>
-   <td class="portlet-section-header">${n:i18n("CMS_TYPE")}</td>
    <td class="portlet-section-header">${n:i18n("CMS_CREATED")}</td>
    <td class="portlet-section-header">${n:i18n("CMS_MODIFIED")}</td>
-   <td class="portlet-section-header">${n:i18n("CMS_DESCRIPTION")}</td>
 </tr>
 
 <%
-   if(folders.size() > 0)
+   if (folders.size() > 0)
    {
-      for(int i = 0; i < folders.size(); i++)
+      for (int i = 0; i < folders.size(); i++)
       {
-         Folder folder = (Folder) folders.get(i);
+         Folder folder = (Folder)folders.get(i);
 %>
 <tr onmouseover="this.className='portlet-section-alternate';" onmouseout="this.className='portlet-section-body';">
+   <td><img
+      src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/folder.gif"
+      alt="${n:i18n("CMS_FOLDER")}"
+      border="0">&nbsp;<a href="<portlet:renderURL>
+          <portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
+          <portlet:param name="path" value="<%= folder.getBasePath() %>"/>
+        </portlet:renderURL>"><%=
+      folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, folder.getBasePath().length()) %>
+   </a>
+   </td>
    <td>
-      <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
-   <portlet:param name="path" value="<%= folder.getBasePath() %>"/>
-        </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/view.gif"
-              alt="${n:i18n("CMS_VIEW")}" border="0"></a>
-      <a href="<portlet:renderURL>
-    <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMCOPY %>"/>
+      <form method="POST" style="padding:0;margin:0;" action="<portlet:actionURL>
     <portlet:param name="path" value="<%= folder.getBasePath() %>"/>
     <portlet:param name="type" value="fo"/>
-   </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/copy.gif"
-              alt="${n:i18n("CMS_COPY")}" border="0"></a>
-      <a href="<portlet:renderURL>
-    <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMMOVE %>"/>
-    <portlet:param name="path" value="<%= folder.getBasePath() %>"/>
-    <portlet:param name="type" value="fo"/>
-   </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/move.gif"
-              alt="${n:i18n("CMS_MOVE")}" border="0"></a>
-      <a href="<portlet:renderURL>
-    <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMDELETE %>"/>
-    <portlet:param name="path" value="<%= folder.getBasePath() %>"/>
-   </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/delete.gif"
-              alt="${n:i18n("CMS_DELETE")}" border="0"></a>
+    <portlet:param name="dispatch" value="1"/>
+   </portlet:actionURL>">
+         <select name="op">
+            <option value="<%= CMSAdminConstants.OP_MAIN %>">${n:i18n("CMS_VIEW")}</option>
+            <option value="<%= CMSAdminConstants.OP_CONFIRMCOPY %>">${n:i18n("CMS_COPY")}</option>
+            <option value="<%= CMSAdminConstants.OP_CONFIRMMOVE %>">${n:i18n("CMS_MOVE")}</option>
+            <option value="<%= CMSAdminConstants.OP_CONFIRMDELETE %>">${n:i18n("CMS_DELETE")}</option>
+         </select>
+         <input type="submit" value="Go" name="Go" class="portlet-form-button"/>
+      </form>
    </td>
    <td>
-      <a href="<portlet:renderURL>
-          <portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
-          <portlet:param name="path" value="<%= folder.getBasePath() %>"/>
-        </portlet:renderURL>">
-         <%= folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, folder.getBasePath().length()) %></a>
+      <%
+         if (folder.getCreationDate() != null)
+         {
+            Format formatter;
+            formatter = new SimpleDateFormat("MM/dd/yy HH:mm");
+            createDate = formatter.format(folder.getCreationDate());
+         }
+      %>
+      <%= createDate %>
    </td>
-   <td align="center"><img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/folder.gif" alt="${n:i18n("CMS_FOLDER")}"
-            border="0"></td>
-   <td><%= folder.getLastModified() %></td>
-   <td><%= folder.getCreationDate() %></td>
-   <td><%= folder.getDescription() %></td>
+   <td>
+      <%
+         if (folder.getLastModified() != null)
+         {
+            Format formatter;
+            formatter = new SimpleDateFormat("MM/dd/yy HH:mm");
+            modifiedDate = formatter.format(folder.getLastModified());
+         }
+      %>
+      <%= modifiedDate %>
+   </td>
 </tr>
 <%
       }
@@ -91,53 +192,60 @@
 %>
 
 <%
-   if(files.size() > 0)
+   if (files.size() > 0)
    {
-      for(int j = 0; j < files.size(); j++)
+      for (int j = 0; j < files.size(); j++)
       {
-         File file = (File) files.get(j);
+         File file = (File)files.get(j);
 %>
 <tr onmouseover="this.className='portlet-section-alternate';" onmouseout="this.className='portlet-section-body';">
+   <td><img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/file.gif"
+            alt="${n:i18n("CMS_FILE")}"
+            border="0">&nbsp;<a href="<portlet:renderURL>
+          <portlet:param name="op" value="<%= CMSAdminConstants.OP_VIEWFILE %>"/>
+          <portlet:param name="path"
+            value="<%= file.getBasePath() %>"/>
+        </portlet:renderURL>"><%=
+      file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, file.getBasePath().length()) %>
+   </a>
+   </td>
    <td>
-      <a href="<portlet:renderURL>
-          <portlet:param name="op" value="<%= CMSAdminConstants.OP_VIEWFILE %>"/>
-          <portlet:param name="path" value="<%= file.getBasePath() %>"/>
-        </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/view.gif"
-              alt="${n:i18n("CMS_VIEW")}" border="0"></a>
-      <a href="<portlet:renderURL>
-    <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMCOPY %>"/>
+      <form method="POST" style="padding:0;margin:0;" action="<portlet:actionURL>
     <portlet:param name="path" value="<%= file.getBasePath() %>"/>
     <portlet:param name="type" value="fi"/>
-   </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/copy.gif"
-              alt="${n:i18n("CMS_COPY")}" border="0"></a>
-      <a href="<portlet:renderURL>
-    <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMMOVE %>"/>
-    <portlet:param name="path" value="<%= file.getBasePath() %>"/>
-    <portlet:param name="type" value="fi"/>
-   </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/move.gif"
-              alt="${n:i18n("CMS_MOVE")}" border="0"></a>
-      <a href="<portlet:renderURL>
-    <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMDELETE %>"/>
-    <portlet:param name="path" value="<%= file.getBasePath() %>"/>
-   </portlet:renderURL>">
-         <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/delete.gif"
-              alt="${n:i18n("CMS_DELETE")}" border="0"></a>
+    <portlet:param name="dispatch" value="1"/>
+   </portlet:actionURL>">
+         <select name="op">
+            <option value="<%= CMSAdminConstants.OP_VIEWFILE %>">${n:i18n("CMS_VIEW")}</option>
+            <option value="<%= CMSAdminConstants.OP_CONFIRMCOPY %>">${n:i18n("CMS_COPY")}</option>
+            <option value="<%= CMSAdminConstants.OP_CONFIRMMOVE %>">${n:i18n("CMS_MOVE")}</option>
+            <option value="<%= CMSAdminConstants.OP_CONFIRMDELETE %>">${n:i18n("CMS_DELETE")}</option>
+         </select>
+         <input type="submit" value="Go" name="Go" class="portlet-form-button"/>
+      </form>
    </td>
    <td>
-      <a href="<portlet:renderURL>
-          <portlet:param name="op" value="<%= CMSAdminConstants.OP_VIEWFILE %>"/>
-          <portlet:param name="path"
-            value="<%= file.getBasePath() %>"/>
-        </portlet:renderURL>">
-         <%= file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, file.getBasePath().length()) %></a>
+      <%
+         if (file.getCreationDate() != null)
+         {
+            Format formatter;
+            formatter = new SimpleDateFormat("MM/dd/yy HH:mm");
+            createDate = formatter.format(file.getCreationDate());
+         }
+      %>
+      <%= createDate %>
    </td>
-   <td align="center"><img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/file.gif" alt="${n:i18n("CMS_FILE")}"
-            border="0"></td>
-   <td><%= file.getLastModified() %></td>
-   <td><%= file.getCreationDate() %></td>
+   <td>
+      <%
+         if (file.getLastModified() != null)
+         {
+            Format formatter;
+            formatter = new SimpleDateFormat("MM/dd/yy HH:mm");
+            modifiedDate = formatter.format(file.getLastModified());
+         }
+      %>
+      <%= modifiedDate %>
+   </td>
 </tr>
 <%
       }
@@ -145,5 +253,7 @@
 %>
 </table>
 <%
+
    }
+
 %>

Deleted: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/menu.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/menu.jsp	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/menu.jsp	2006-10-31 18:04:36 UTC (rev 5534)
@@ -1,120 +0,0 @@
-<%@ page import="org.jboss.portal.core.portlet.cms.admin.CMSAdminConstants" %>
-<%@ page import="java.util.StringTokenizer" %>
-<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
-<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
-<%@ page isELIgnored="false" %>
-<portlet:defineObjects/>
-
-<table width="100%" border="0">
-   <tr>
-      <td colspan="3" class="portlet-section-header">${n:i18n("CMS_MENU")}</td>
-   </tr>
-   <tr>
-      <td align="left" class="portlet-section-alternate">${n:i18n("CMS_CREATE")}</td>
-      <td align="left" class="portlet-section-alternate">${n:i18n("CMS_TRANSFER")}</td>
-      <td align="left" class="portlet-section-alternate">${n:i18n("CMS_MODIFY")}</td>
-   </tr>
-   <tr>
-      <td align="left" class="portlet-section-alternate">
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRM_CREATE_COLLECTION %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/createfolder.gif"
-                 alt="${n:i18n("CMS_CREATEFOLDER")}" border="0"/>
-         </a>&nbsp;
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CREATENEWTEXT %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/createfile.gif"
-                 alt="${n:i18n("CMS_CREATEFILE")}" border="0"/></a>
-      </td>
-      <td align="left" class="portlet-section-alternate">
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_UPLOADCONFIRM %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/upload.gif"
-                 alt="${n:i18n("TITLE_UPLOAD")}" border="0"/></a>&nbsp;
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_UPLOADARCHIVECONFIRM %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/upload_archive.gif"
-                 alt="${n:i18n("CMS_UPLOADARCHIVE")}" border="0"></a>&nbsp;
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_EXPORTARCHIVE %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/export_archive.gif"
-                 alt="${n:i18n("CMS_EXPORTARCHIVE")}" border="0"></a>
-      </td>
-      <td align="left" class="portlet-section-alternate">
-         <%
-            if(!"/".equals(sCurrPath))
-            {
-         %>
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMCOPY %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   <portlet:param name="type" value="fo"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/copy.gif"
-                 alt="${n:i18n("CMS_COPY")}" border="0"></a>&nbsp;
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMMOVE %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   <portlet:param name="type" value="fo"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/move.gif"
-                 alt="${n:i18n("CMS_MOVE")}" border="0"></a>&nbsp;
-         <a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_CONFIRMDELETE %>"/>
-   <portlet:param name="path" value="<%= sCurrPath %>"/>
-   </portlet:renderURL>">
-            <img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/delete.gif"
-                 alt="${n:i18n("CMS_DELETE")}" border="0">
-         </a>
-         <%
-            }
-         %>
-      </td>
-   </tr>
-</table>
-
-<br><br>
-
-<a href="<portlet:renderURL>
-<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
-<portlet:param name="path" value="/"/>
-        </portlet:renderURL>">
-   <img align="absmiddle"
-        src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/folder_home.gif"
-        border="0"></a>
-
-<%
-   StringTokenizer parser = new StringTokenizer(sCurrPath, "/");
-   String sPathBuilder = "";
-   while(parser.hasMoreTokens())
-   {
-      String sPathChunk = parser.nextToken();
-      sPathBuilder += "/" + sPathChunk;
-      if (parser.hasMoreTokens())
-      {
-%>
-:&nbsp;<a href="<portlet:renderURL>
-   <portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
-   <portlet:param name="path" value="<%= sPathBuilder %>"/>
-</portlet:renderURL>"><%= sPathChunk %></a>
-<%
-      }
-      else
-      {
-%>
-:&nbsp;<%= sPathChunk %>   
-<%
-      }
-   }
-%>

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/portlet.xml	2006-10-31 17:47:48 UTC (rev 5533)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/portlet.xml	2006-10-31 18:04:36 UTC (rev 5534)
@@ -133,7 +133,7 @@
       <supported-locale>es</supported-locale>
       <resource-bundle>Resource</resource-bundle>
       <portlet-info>
-         <title>CMS Admin</title>
+         <title>CMS Administration</title>
       </portlet-info>
    </portlet>
    <portlet>




More information about the jboss-svn-commits mailing list