Author: ludovic
Date: 2008-01-17 13:25:35 +0100 (Thu, 17 Jan 2008)
New Revision: 6914

Modified:
   xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm
Log:
CURRIKI-1502 Group image in view mode

Modified: 
xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm
===================================================================
--- xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm   
2008-01-17 12:06:20 UTC (rev 6913)
+++ xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm   
2008-01-17 12:25:35 UTC (rev 6914)
@@ -1018,10 +1018,7 @@
 #set($m_sm = $xwiki.csm)
 #set($s = $m_sm.getSpace($spacehome))
 #set($sUrl = $s.getHomeURL())
-
-
 #groupLogo( $s )
-
 <div id="asset-metadatas-block-groupname">
 <span style="font-size: 90%; color: 
#919179;">$msg.get("asset.groupfrom")</span>
  <a href="${sUrl}">$s.getDisplayTitle()</a>
@@ -2039,7 +2036,6 @@
 ##
 ## Group logo display
 #macro(groupLogo $space)
-  
   #set($logofilename = $space.display("logo","view"))
   #if($logofilename != "")
     #set($spacehome = $space.getSpaceName()+".WebHome")
@@ -2052,36 +2048,32 @@
        #set($logowidth = 120)
        #set($logoheight = 82)
   #end
-  
 #set( $image_resize = "" )
 #if($logowidth > 120 || $logoheight > 82)
   ## find out wich dimmension overflows the most and computes scaled sizes
   #set( $ratiox = $logowidth / 120)
   #set( $ratioy = $logoheight / 82)
-  #set( $ratio = $logowidth / $logoheight)
   #if($ratiox>$ratioy)
     #set($width = 120)
-    #set($height = $width / $ratio)
+    #set($height = $width * $logoheight /  $logowidth)
     #set( $image_resize = "?width=120")
   #else
     #set($height = 82)
-    #set($width = $height * $ratio)
+    #set($width = $height * $logowidth / $logoheight)
     #set( $image_resize = "?height=82")
   #end
 #else
   #set($height = $logoheight)
   #set($width = $logowidth)
 #end
-
-
   ##display logo
   <div class="frame-inset-logo">
     <a href="$space.getHomeURL()" title="$space.getDisplayTitle()" 
alt="$space.getDisplayTitle()">
       <img src="${m_logo}${image_resize}" width="$width" height="$height" 
title="${space.getDisplayTitle()}" alt="${space.getDisplayTitle()}" />
     </a>
   </div>
-  
 #end
+ 
 ##
 ## Group display
 #macro(mycurrikiGroupInfo $m_groupName $displayType) ## {

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to