give all blocks an ID, not just those which toggle

git-svn-id: file:///home/shish/svn/shimmie2/trunk@284 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-16 06:43:49 +00:00
parent 2e574edef6
commit 68172f94b6

View file

@ -78,15 +78,15 @@ EOD;
$h = $block->header;
$b = $block->body;
$html = "";
$i = str_replace(' ', '_', $h);
if($hidable) {
$i = str_replace(' ', '_', $h);
if(!is_null($h)) $html .= "\n<h3 id='$i-toggle' onclick=\"toggle('$i')\">$h</h3>\n";
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
$toggle = " onclick=\"toggle('$i')\"";
}
else {
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n";
if(!is_null($b)) $html .= "<div>$b</div>\n";
$toggle = "";
}
if(!is_null($h)) $html .= "\n<h3 id='$i-toggle'$toggle>$h</h3>\n";
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
return $html;
}
}