portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls AbstractPortletControl.java VelocityPortletControl.java
Date Mon, 29 Mar 2004 21:16:27 GMT
taylor      2004/03/29 13:16:27

  Modified:    src/java/org/apache/jetspeed/portal/controls
                        AbstractPortletControl.java
                        VelocityPortletControl.java
  Log:
  New option for JR.p: The portlet control can be either shown or hidden when a portlet does
not have view access
  Defaults to true, the decorator is now hidden
  
  Revision  Changes    Path
  1.22      +6 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/AbstractPortletControl.java
  
  Index: AbstractPortletControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/AbstractPortletControl.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- AbstractPortletControl.java	29 Mar 2004 21:02:29 -0000	1.21
  +++ AbstractPortletControl.java	29 Mar 2004 21:16:27 -0000	1.22
  @@ -37,6 +37,7 @@
   import org.apache.jetspeed.services.Registry;
   import org.apache.jetspeed.services.JetspeedSecurity;
   import org.apache.jetspeed.util.MimeType;
  +import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // Turbine imports
   import org.apache.turbine.util.RunData;
  @@ -348,7 +349,10 @@
               PortletWrapper wrapper = (PortletWrapper)portlet;
               if (!wrapper.getAllowView(rundata))
               {
  -                return new StringElement("");                
  +                if (JetspeedResources.getBoolean("defaultportletcontrol.hide.decorator",
true))
  +                {
  +                    return new StringElement("");
  +                }
               }
           }
           
  
  
  
  1.29      +6 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java
  
  Index: VelocityPortletControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- VelocityPortletControl.java	29 Mar 2004 21:02:29 -0000	1.28
  +++ VelocityPortletControl.java	29 Mar 2004 21:16:27 -0000	1.29
  @@ -29,6 +29,7 @@
   import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
   import org.apache.jetspeed.services.logging.JetspeedLogger;
   import org.apache.jetspeed.services.persistence.PersistenceManager;
  +import org.apache.jetspeed.services.resources.JetspeedResources;
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
   import org.apache.jetspeed.util.template.JetspeedTool;
   import org.apache.jetspeed.util.template.JetspeedLink;
  @@ -104,7 +105,10 @@
               PortletWrapper wrapper = (PortletWrapper)portlet;
               if (!wrapper.getAllowView(rundata))
               {
  -                return new StringElement("");                
  +                if (JetspeedResources.getBoolean("defaultportletcontrol.hide.decorator",
true))
  +                {                
  +                    return new StringElement("");
  +                }
               }
           }
   
  
  
  

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


Mime
View raw message