Fix: theme

This commit is contained in:
Laurent Destailleur 2012-02-05 16:30:40 +01:00
parent 1574f4a795
commit 2d180635ef

View File

@ -573,21 +573,21 @@ foreach($mainmenuusedarray as $key => $val)
{ {
if (file_exists($dirroot."/".$val."/img/".$val.".png")) if (file_exists($dirroot."/".$val."/img/".$val.".png"))
{ {
$url=dol_buildpath($path.'/'.$val.'/img/'.$val.'.png', 1); $url=dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
$found=1; $found=1;
break; break;
} }
} }
// Img file not found // Img file not found
if (! $found && $generic <= 4) if (! $found)
{ {
$url=dol_buildpath($path.'/theme/eldy/img/menus/generic'.$generic.".png",1); $url=dol_buildpath($path.'/theme/eldy/img/menus/generic'.$generic.".png",1);
$found=1; $found=1;
$generic++; if ($generic < 4) $generic++;
print "/* A mainmenu entry but img file ".$val.".png not found, so we use a generic one */\n";
} }
if ($found) if ($found)
{ {
print "/* A mainmenu entry but img file ".$val.".png not found, so we use a generic one */\n";
print "div.mainmenu.".$val." {\n"; print "div.mainmenu.".$val." {\n";
print " background-image: url(".$url.");\n"; print " background-image: url(".$url.");\n";
print " height:28px;\n"; print " height:28px;\n";