note
moritz
<p>The trick is to add some more logic to your perl code:
<code>
my $has_approved_records = 0;
my $reqs;
while (my $row = $sth->fetchrow_arrayref) {
$has_approved_records 1 = if $row->{status} eq 'Approved';
push @$reqs, $row;
}
...
$template->param(REQS => $reqs, HAS_APPROVED_RECORDS => $has_approved_records);
</code>
<p>And in the template</p>
<code>
<TMPL_IF HAS_APPROVED_RECORDS>
<span class="hotspot" onmouseover="tooltip.show('<strong>Approved Vacation Requests</strong><br /><TMPL_VAR DATE>');" onmouseout="tooltip.hide();">
</TMPL_IF>
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-616540">
[http://perl6.org/|Perl 6 - the future is here, just unevenly distributed]
</div></div>
1026358
1026358