jford       2005/04/02 09:33:42

  Added:       webapp/WEB-INF/templates/vm/controls/html
                        jetspeed-buffered.vm
  Log:
  New velocity for buffering content and the displaying title and content.
  Allows the title to be changed during render phase.
  
  PR: JS1-541
  
  Revision  Changes    Path
  1.1                  
jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed-buffered.vm
  
  Index: jetspeed-buffered.vm
  ===================================================================
  #*
  Copyright 2005 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.
  *#
  
  ##<!-- begin jetspeed-buffered.vm -->
  ## ----------------------
  ## Set portlet style
  ## ----------------------
  #if (${skin.TitleBackgroundColor})
    #set ($portletStyle="border-color: ${skin.TitleBackgroundColor}")
  #end
  ## ----------------------
  ## Set title style
  ## ----------------------
  #if (${skin.TitleBackgroundColor})
    #if (${skin.TitleTextColor})
      #set ($titlestyle = "background-color: $skin.TitleBackgroundColor; color: 
$skin.TitleTextColor;" )
    #else
      #set ($titlestyle = "background-color: $skin.TitleBackgroundColor;" )
    #end
  #else
    #if (${$skin.TitleTextColor})
      #set ($titlestyle = "color: $skin.TitleTextColor;" )
    #end
  #end
  ## ----------------------
  ## Set content style
  ## ----------------------
  #if (${skin.BackgroundColor})
    #if (${skin.TextColor})
      #set ($contentstyle = "background-color: $skin.BackgroundColor; color: 
$skin.TextColor;" )
    #else
      #set ($contentstyle = "background-color: $skin.BackgroundColor;" )
    #end
  #else
    #if (${$skin.TextColor})
      #set ($contentstyle = "color: $skin.TextColor;" )
    #end
  #end
  
  #if( ! $portlet.isClosed($data) )
  ##
  ## Here we set a global css for the portlet using div tag
  ##
  <div #if (${skin.PortletSkinClass}) class="${skin.PortletSkinClass}" #end>
  <table border="0" cellpadding="0" cellspacing="0" width="100%" #if( 
${skin.PortletStyleClass}) class="$!{skin.PortletStyleClass}" #end #if 
(${portletStyle}) style="${portletStyle}" #end>
  ##
  ## Portlet Title Bar
  ##
  
  ##$!portlet.getClass().getName()
  
  #set($portletContent = $portlet.getContent($data))
        
  #set ($cspan = 2)
  
  #if( $portlet_instance.isShowTitleBar() )
    <tr>
      #if (${skin.PortletSkinClass})
      <td class="PTitleLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
      #else 
          ## There's an extra column created for the portlet icon
          #if ($portlet_instance.Image && $portlet_instance.Image != 
"images/dot.gif")
          #set ($cspan = 3)
          <td nowrap="true" width="1%" #if (${skin.TitleStyleClass}) 
class="${skin.TitleStyleClass}" #end #if (${titlestyle}) style="${titlestyle}" 
#end><IMG SRC="$portlet_instance.Image"></td>    
          #end
      #end
      <td align="left" valign="middle" #if (${skin.TitleStyleClass}) 
class="${skin.TitleStyleClass}" #else class="PTitle" #end #if (${titlestyle}) 
style="${titlestyle}" #end>
         $portlet_instance.Title
      </td>
      <td align="right" valign="middle" #if (${skin.TitleStyleClass}) 
class="${skin.TitleStyleClass}" #else class="PTitle" #end #if (${titlestyle}) 
style="${titlestyle}" #end>
        #foreach ( $action in $actions )
        <a href="${action.Link}" title="${action.Name}" ><img 
src="${skin.getImage($action.Name,"images/${action.Name}.gif")}" 
alt="${action.Alt}" border="0"></a>
        #end
      </td>
      #if (${skin.PortletSkinClass})
      <td class="PTitleRight" style="font-size:1pt;" nowrap="true">&nbsp;</td>
      #end
    </tr>
  
  #end
  
  ##
  ## Portlet Content
  ##
  #if( ! $portlet.isMinimized($data) )
    <tr>
      #if (${skin.PortletSkinClass} && $portlet_instance.isShowTitleBar())
      <td class="PContentLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
      #end
      <td colspan="$cspan" #if (${skin.ContentStyleClass}) 
class="${skin.ContentStyleClass}" #else class="PContent" #end #if 
(${contentstyle}) style="${contentstyle}" #end>
        $portletContent
        Buffered
      </td>
      #if (${skin.PortletSkinClass} && $portlet_instance.isShowTitleBar())
      <td class="PContentRight" style="font-size:1pt;" nowrap="true">&nbsp;</td>
      #end
    </tr>
  #end
  ##
  ## Portlet Bottom
  ##
    #if ($portlet_instance.isShowTitleBar() && ${skin.PortletSkinClass})
    <tr>
      <td class="PBottomLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
      <td colspan="2" class="PBottom" style="font-size:1pt;" 
nowrap="true">&nbsp;</td>
      <td class="PBottomRight" style="font-size:1pt;" nowrap="true">&nbsp;</td>
    </tr>
    #end
  </table>
  </div>
  #end
  ##<!-- end jetspeed-buffered.vm -->
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to