Author: cvrabie
Date: 2008-01-10 11:52:08 +0100 (Thu, 10 Jan 2008)
New Revision: 6718

Modified:
   xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm
Log:
changed the group info macro to scale the logo image if is too large

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-10 10:26:52 UTC (rev 6717)
+++ xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm   
2008-01-10 10:52:08 UTC (rev 6718)
@@ -2057,8 +2057,19 @@
   #set($m_logo = $srcdoc.getAttachmentURL($logofilename))
 #else
   #set($srcdoc = $xwiki.getDocument("Groups.WebHome"))
+  #set($logofilename = "default_logo.png")
   #set($m_logo = $srcdoc.getAttachmentURL("default_logo.png"))
 #end
+#set($logowidth = $xwiki.image.getWidth($srcdoc.fullName,$logofilename))
+#set($logoheight = $xwiki.image.getHeight($srcdoc.fullName,$logofilename))
+#if($logowidth > 121)
+  #set($logowidth = 121)
+#end
+#if($logoheight > 83)
+  #set($logoheight = 83)
+#end
+
+
 #if("$!first_frame_done" == "") ## {
 <div class="frame">
 #else ## } {
@@ -2073,7 +2084,7 @@
 #end
 </div>
 <div class="frame-inset-logo">
-<img src="$m_logo" title="${s.getDisplayTitle()}" alt="${s.getDisplayTitle()}" 
/>
+<img src="$m_logo" width="$logowidth" height="$logoheight" 
title="${s.getDisplayTitle()}" alt="${s.getDisplayTitle()}" />
 </div>
 <div class="frame-inset-description">
 $s.getDescription()

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

Reply via email to