portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r482815 [1/2] - in /portals/jetspeed-2/trunk/applications/j2-admin/src: java/org/apache/jetspeed/portlets/site/ webapp/WEB-INF/ webapp/WEB-INF/velocity/ webapp/WEB-INF/view/ webapp/WEB-INF/view/site/ webapp/images/
Date Tue, 05 Dec 2006 22:52:36 GMT
Author: taylor
Date: Tue Dec  5 14:52:32 2006
New Revision: 482815

URL: http://svn.apache.org/viewvc?view=rev&rev=482815
Log:
https://issues.apache.org/jira/browse/JS2-306
New implementation of Site Manager portlet

Added:
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/edit-prefs.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view-header.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/application_edit.png
  (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/base.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/create.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/createsmall.gif   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/cut.png   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/cut_red.png   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/delete.png   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/down.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/downsmall.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/edit.png   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/folder.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/folder_new.gif   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/icon_link.gif   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/lightning_go.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/link.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/link_add.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/link_break.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/loading.jpg   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/lock.png   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/mouse_add.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/mouse_delete.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/move.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/new.png   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/note.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/page.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/page_edit.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/page_new.gif   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/page_white_go.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/plus.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/recyclebin.gif   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/removesmall.gif   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/table_edit.png   (with
props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/test.html
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/up.gif   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/upsmall.png   (with props)
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/images/wand.png   (with props)
Removed:
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/AbstractPSMLTreePortlet.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/LinkProxyBean.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/NodeInfo.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/PSMLTreeLoader.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/PageProxyBean.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/SiteBrowserPortlet.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/SiteDetailPortlet.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/SiteDetailsPortlet.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/add-link.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/add-page.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/add-subfolder.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/doc-order.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/folder-details.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/link-details.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/menus.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/page-details.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/security.vm
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-browser.jsp
Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/velocity/velocity-macros.vm

Added: portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java?view=auto&rev=482815
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
(added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
Tue Dec  5 14:52:32 2006
@@ -0,0 +1,185 @@
+/*
+ * Copyright 2000-2001,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.jetspeed.portlets.site;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletPreferences;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
+import org.apache.jetspeed.decoration.DecorationFactory;
+import org.apache.jetspeed.headerresource.HeaderResource;
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.portals.gems.dojo.AbstractDojoVelocityPortlet;
+import org.apache.velocity.context.Context;
+
+/**
+ * Manage the Portal Site
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class PortalSiteManager extends AbstractDojoVelocityPortlet 
+{
+    protected final Log log = LogFactory.getLog(this.getClass());
+    
+    // components
+    protected PageManager pageManager;
+    protected PortletRegistry registry;
+    protected DecorationFactory decorationFactory;
+    
+    // session
+    protected final static String SESSION_FOLDERS = "jetspeed.site.manager.folders";
+    protected final static String SESSION_ROOT = "jetspeed.site.manager.root";
+    
+    // context
+    public final static String FOLDERS = "folders";
+    public final static String JSROOT = "jsroot";   
+    public static final String ALL_SECURITY_REFS = "allSecurityRefs";
+    
+    
+    public void init(PortletConfig config)
+    throws PortletException 
+    {
+        super.init(config);
+        pageManager = (PageManager) getPortletContext().getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
       
+        if (null == pageManager) 
+        { 
+            PortletException pe = new PortletException("Failed to find the Page Manager on
SiteViewController initialization");
+            throw new RuntimeException(pe); 
+        }
+        registry = (PortletRegistry) getPortletContext().getAttribute(CommonPortletServices.CPS_REGISTRY_COMPONENT);
+        if (null == registry)
+        {
+            PortletException pe = new PortletException("Failed to find the Portlet Registry
on SiteViewController initialization");
+            throw new RuntimeException(pe);             
+        }
+        decorationFactory = (DecorationFactory) getPortletContext().getAttribute(CommonPortletServices.CPS_DECORATION_FACTORY);
+        if (null == decorationFactory)
+        {
+            PortletException pe = new PortletException("Failed to find the Decoration Factory
on SiteViewController initialization");
+            throw new RuntimeException(pe);             
+        }                
+        
+    }
+    
+    public void doView(RenderRequest request, RenderResponse response)
+            throws PortletException, IOException
+    {
+        try
+        {
+            String jsroot = determineRootFolder(request);
+            RequestContext requestContext = 
+                (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+            this.getContext(request).put("page-decorations", decorationFactory.getPageDecorations(requestContext));
+            this.getContext(request).put("portlet-decorations", decorationFactory.getPortletDecorations(requestContext));
+            this.getContext(request).put("themes", decorationFactory.getDesktopThemes(requestContext));
+            this.getContext(request).put("defaultLayout", request.getPreferences().getValue("defaultLayout",
"jetspeed-layouts::VelocityTwoColumns"));            
+            this.getContext(request).put(FOLDERS, retrieveFolders(request, jsroot));
+            this.getContext(request).put(ALL_SECURITY_REFS, pageManager.getPageSecurity().getSecurityConstraintsDefs());
                   
+        }
+        catch (Exception e)
+        {
+            throw new PortletException("Failed to get root folder");
+        }
+        
+        super.doView(request, response);
+    }
+    
+    protected String determineRootFolder(RenderRequest request)
+    {
+        String jsroot = request.getParameter(JSROOT);
+        if (jsroot == null || jsroot.equals(""))
+        {
+            jsroot = request.getPreferences().getValue("root", "/_user/" + request.getRemoteUser()
+ "/");
+        }
+        this.getContext(request).put(JSROOT, jsroot);
+        return jsroot;
+    }
+    
+    public Folder retrieveFolders(RenderRequest request, String root)
+    throws PortletException
+    {
+        try
+        {
+            Folder folder = pageManager.getFolder(root);
+            return folder;
+        }
+        catch (Exception e)
+        {
+            log.error("Failed to retrieve folders ", e);
+            throw new PortletException("Failed to get root folder");
+        }
+    }
+    
+    protected void includeHeaderContent(HeaderResource headerResource)
+    {
+        headerResource.dojoAddCoreLibraryRequire("dojo.lang.*");
+        headerResource.dojoAddCoreLibraryRequire("dojo.dnd.*");
+        headerResource.dojoAddCoreLibraryRequire("dojo.event.*");
+        headerResource.dojoAddCoreLibraryRequire("dojo.io");
+                
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.ContentPane");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.LayoutContainer");
+        
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Tree");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeRPCController");      
 
+        // headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeLoadingControllerV3");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeSelector");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeNode");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeContextMenu");
+        
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.ValidationTextbox");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.ComboBox");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Checkbox");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Dialog");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Button");
+        
+        headerResource.dojoAddModuleLibraryRequire( "jetspeed.desktop.core" );
+        headerResource.dojoAddModuleLibraryRequire( "jetspeed.widget.EditorTable" );    
   
+    }
+
+    public void doEdit(RenderRequest request, RenderResponse response)
+    throws PortletException, IOException
+    {
+        response.setContentType("text/html");
+        doPreferencesEdit(request, response);
+    }
+    
+    public void processAction(ActionRequest request, ActionResponse actionResponse) throws
PortletException, java.io.IOException
+    {
+        String add = request.getParameter("Save");
+        if (add != null)
+        { 
+            processPreferencesAction(request, actionResponse);
+        }
+    }    
+}

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml?view=diff&rev=482815&r1=482814&r2=482815
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
Tue Dec  5 14:52:32 2006
@@ -52,6 +52,7 @@
 	    <js:service name='SearchComponent'/>                
         <js:service name="SSO" />                 
         <js:service name='UserManager'/>     
+        <js:service name='DecorationFactory'/>        
 	</js:services>
 
 </portlet-app>

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml?view=diff&rev=482815&r1=482814&r2=482815
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml Tue Dec
 5 14:52:32 2006
@@ -838,84 +838,7 @@
       <short-title>PAD</short-title>
       <keywords>admin,registry,applications,apps,PAM</keywords>
     </portlet-info>
-</portlet>
-    
-<!-- TODO: delete this when new site completed -->
-<portlet id="PortalSiteBrowser">
-    <description>The Portal Site Browser displays a hierarchical view of the portal
site. From here you can add, edit, and delete folders and pages.</description>
-    <description xml:lang="ja">ポータルサイトブラウザは、ポータルサイトの階層的な表示をすることができます。このポートレットにより、フォルダとページの追加・編集・削除することができます。</description>
-    <description xml:lang="zh">树状显示门户站点地图。你可以添加、修改、删除目录或者页面。</description>
-    <description xml:lang="zh-TW">樹狀顯示門戶站點地圖。你可以添加、修改、刪除目錄或者頁面。</description>
   
-    <portlet-name>PortalSiteBrowser</portlet-name>
-    <display-name>Portal Site Browser</display-name>
-    <display-name xml:lang="ja">ポータルサイトブラウザ</display-name>
-    <display-name xml:lang="zh">门户站点浏览器</display-name>
-    <display-name xml:lang="zh-TW">門戶站點流覽器</display-name>
-    <portlet-class>org.apache.jetspeed.portlets.site.SiteBrowserPortlet</portlet-class>
-    <init-param>
-    	<description>This parameter sets the template used in view mode.</description>
-		<name>ViewPage</name>
-			<value>/WEB-INF/view/site/site-browser.jsp</value>
-     </init-param>   
-    <init-param>
-        <name>portlet-icon</name>
-        <value>user-home.png</value>
-    </init-param>                                                                 
                          
-    <expiration-cache>-1</expiration-cache>
-    <supports>
-      <mime-type>text/html</mime-type>
-      <portlet-mode>EDIT</portlet-mode>
-      <portlet-mode>VIEW</portlet-mode>
-      <portlet-mode>HELP</portlet-mode>
-    </supports>
-    <portlet-info>
-      <title>Portal Site Browser</title>
-      <short-title>Site</short-title>
-      <keywords>admin,site,portal,pages,folders</keywords>
-    </portlet-info>
-</portlet>
-
-<!-- TODO: delete this when new site completed -->    
-<portlet id="PortalSiteDetail">
-    <description>The Portal Site Detail portlet displays the details of a selected
folder/page. From here you can add, edit, and delete folders and pages.</description>
-    <description xml:lang="ja">ポータルサイト詳細ポートレットは、選択されたフォルダ・ページの詳細を表示します。このポートレットにより、フォルダとページの追加・編集・削除することができます。</description>
-    <description xml:lang="zh">显示选中的目录或者页面的详情。可以添加、修改和删除页面或者目录。</description>
-    <description xml:lang="zh-TW">顯示選中的目錄或者頁面的詳情。可以添加、修改和刪除頁面或者目錄。</description>
   
-    <portlet-name>PortalSiteDetail</portlet-name>
-    <display-name>Portal Site Detail</display-name>
-    <display-name xml:lang="ja">ポータルサイト詳細</display-name>
-    <display-name xml:lang="zh">门户站点详情</display-name>
-    <display-name xml:lang="zh-TW">門戶站點詳情</display-name>
-    <portlet-class>org.apache.jetspeed.portlets.site.SiteDetailsPortlet</portlet-class>
-	<init-param>
-		<name>spring-configuration</name>
-		<value>/WEB-INF/model/spring-portlet-configuration.xml</value>
-	</init-param>
-	<init-param>
-		<name>validator-configuration</name>
-		<value>/WEB-INF/model/validator-configuration.xml</value>
-	</init-param>	
-    <init-param>
-    	<description>This parameter sets the template used in view mode.</description>
-		<name>ViewPage</name>
-			<value>folder-view</value>
-     </init-param>   
-    <init-param>
-        <name>portlet-icon</name>
-        <value>user-home.png</value>
-    </init-param>                                                                 
                              
-    <expiration-cache>-1</expiration-cache>
-    <supports>
-      <mime-type>text/html</mime-type>
-      <portlet-mode>VIEW</portlet-mode>
-    </supports>
-     <resource-bundle>org.apache.jetspeed.portlets.site.resources.SiteResources</resource-bundle>
           	
-    <portlet-info>
-      <title>Portal Site Detail</title>
-      <short-title>Site</short-title>
-      <keywords>admin,site,portal,pages,folders</keywords>
-    </portlet-info>	
-</portlet>
+</portlet>    
 
 <portlet id="ProfilerAdmin">
     <description>The Profiler Admin portlet is used to administer profiling rules.
You can create new rules, edit rules and delete rules and criterion.</description>
@@ -1498,6 +1421,62 @@
       <keywords>site,sitemap,map,portal,view</keywords>
     </portlet-info>
 </portlet>
+    
+<portlet>
+    <description>The Portal Site Manager displays a hierarchical view of the entire
portal site. From here you can add, edit, and delete folders, links, and pages.</description>
+    <portlet-name>PortalSiteManager</portlet-name>
+    <display-name>Portal Site Manager</display-name>        
+    <portlet-class>org.apache.jetspeed.portlets.site.PortalSiteManager</portlet-class>
+    <init-param>
+        <name>ViewPage</name>
+        <value>/WEB-INF/view/site/site-view.vm</value>
+    </init-param>
+    <init-param>
+        <name>EditPage</name>
+        <value>/WEB-INF/view/edit-prefs.vm</value>
+    </init-param>        
+    <init-param>
+        <name>HeaderPage</name>
+        <value>/WEB-INF/view/site/site-view-header.vm</value>
+    </init-param> 
+    <init-param>
+        <name>dojo.requires.core</name>
+        <value>dojo.lang.*;dojo.event.*;dojo.io.*;dojo.dnd.*;dojo.widget.*;dojo.widget.Tree;dojo.widget.Button;dojo.widget.Checkbox;dojo.widget.Dialog;dojo.widget.TabContainer;dojo.widget.ContentPane;dojo.widget.LayoutContainer;dojo.widget.TreeRPCController;dojo.widget.TreeSelector;dojo.widget.TreeNode;dojo.widget.TreeContextMenu;dojo.widget.validate;dojo.widget.ComboBox;</value>
                                  
+    </init-param>                
+    <init-param>
+        <name>portlet-icon</name>
+        <value>user-home.png</value>
+    </init-param>              
+    <supports>
+        <mime-type>text/html</mime-type>
+        <portlet-mode>view</portlet-mode>
+        <portlet-mode>edit</portlet-mode>
+    </supports>
+    <resource-bundle>org.apache.jetspeed.portlets.site.resources.Site</resource-bundle>
+    <portlet-info>
+        <title>Portal Site Manager</title>
+        <short-title>Site</short-title>
+        <keywords>admin,site,portal,pages,folders</keywords>
+    </portlet-info>
+    <portlet-preferences>
+        <preference>
+            <name>defaultLayout</name>
+            <value>jetspeed-layouts::VelocityTwoColumns</value>
+        </preference>
+        <preference>
+            <name>root</name>
+            <value>/</value>
+        </preference>
+        <preference>
+            <name>viewInNewWindow</name>
+            <value>true</value>
+        </preference>          
+        <preference>
+            <name>showSearchTab</name>
+            <value>true</value>
+        </preference>                        
+    </portlet-preferences>
+</portlet>    
                  
 </portlet-app>
 

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/velocity/velocity-macros.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/velocity/velocity-macros.vm?view=diff&rev=482815&r1=482814&r2=482815
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/velocity/velocity-macros.vm
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/velocity/velocity-macros.vm
Tue Dec  5 14:52:32 2006
@@ -137,3 +137,38 @@
     <td width="5%" class="portlet-form-label" align="left">&nbsp;</td>
     </tr>    
 #end
+
+#macro (OnePref $pf)
+#set ($pv = $pf.Value)
+#foreach ($x in $pv)
+#set ($extr = $x)
+#end
+$pf.Key $!extr
+#end
+
+#macro (prefField $key $values $size)
+#if ($ERRORS)
+#set ($eflag = "$!ERRORS.get($id)")
+#else
+#set ($eflag = "")
+#end
+#set ($pv = $pf.Value)
+#foreach ($x in $pv)
+#set ($extr = $x)
+#end
+#foreach ($x in $values)
+#set ($extr = $x)
+#end
+  <tr colspan="4" align="right">
+  #if ($!eflag == "")
+    <td width="5%" align="left">&nbsp;</td>
+  #else
+    <td width="5%" class="portlet-msg-error" align="left">&nbsp;</td>  
+  #end
+    <td nowrap class="portlet-section-alternate" align="right">$!key:&nbsp;</td>
+    <td class="portlet-section-body" align="left">
+      <input id="$!id" type="text" name="$!key" size="$!size" value="$!extr" class="portlet-form-field-label">
+    </td>
+    <td width="5%" class="portlet-form-label" align="left">&nbsp;</td>
+  </tr>
+#end

Added: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/edit-prefs.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/edit-prefs.vm?view=auto&rev=482815
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/edit-prefs.vm (added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/edit-prefs.vm Tue
Dec  5 14:52:32 2006
@@ -0,0 +1,13 @@
+
+<h2 class="portlet-section-header">Edit Preferences</h2>
+
+<form action="$renderResponse.createActionURL()" method="post">
+<table>
+#foreach ($pref in $prefs)
+#prefField($pref.Key $pref.Value "40")
+#end
+</table>
+<input type="submit" name="Save" value="Save" />
+</form>
+
+

Added: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view-header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view-header.vm?view=auto&rev=482815
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view-header.vm
(added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view-header.vm
Tue Dec  5 14:52:32 2006
@@ -0,0 +1,62 @@
+<style type="text/css">
+
+#toolsDiv img {
+  vertical-align: middle;
+}
+.treeTable tr {
+  vertical-align: top;
+}
+.formQuestion {
+        background-color:#d0e3f5;
+        padding:0.3em;
+        font-weight:900;
+        font-family:Verdana, Arial, sans-serif;
+        font-size:0.8em;
+        color:#5a5a5a;
+    }
+.formAnswer {
+        background-color:#f5eede;
+        padding:0.3em;
+        margin-bottom:1em;
+        width: 100%;
+    }
+.pageSubContentTitle {
+            color:#8e8e8e;
+            font-size:1em;
+            font-family:Verdana, Arial, sans-serif;
+            margin-bottom:0.75em;
+    }
+.small {
+        width: 2.5em;
+    }
+.medium {
+        width: 15em;
+    }
+.long {
+        width: 30em;
+    }
+
+span.invalid, span.missing {
+        display: inline;
+        margin-left: 1em;
+        font-weight: bold;
+        font-style: italic;
+        font-family: Arial, Verdana, sans-serif;
+        color: #f66;
+        font-size: 0.9em;
+    }
+
+.noticeMessage {
+        display: block;
+        float: right;
+        font-weight: normal;
+        font-family:Arial, Verdana, sans-serif;
+        color:#663;
+        font-size:0.9em;
+    }
+    /* group multiple buttons in a row */
+    div .dojoButton {
+        float: left;
+        margin-left: 10px;
+    }
+</style>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message