summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
authorivan <ivan>2005-05-15 13:01:00 +0000
committerivan <ivan>2005-05-15 13:01:00 +0000
commitae7a7aedd844e581638d435e432e08a76f8097d1 (patch)
treefcbf4da8a741ddfe9cbda13b1f5a97064de60d0f /httemplate/search/elements
parentccf0fd3e5cbdb4b3d88b11b7ab290d9a280a4c5c (diff)
move receivables report to search template
Diffstat (limited to 'httemplate/search/elements')
-rw-r--r--httemplate/search/elements/search.html42
1 files changed, 39 insertions, 3 deletions
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index 92889c5f7..529f48f20 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -245,11 +245,18 @@
%>
<TR>
<% if ( $opt{'fields'} ) {
- my $links = $opt{'links'} ? [ @{$opt{'links'}} ] : '';
+
+ my $links = $opt{'links'} ? [ @{$opt{'links'}} ] : '';
my $aligns = $opt{'align'} ? [ @{$opt{'align'}} ] : '';
+ my $colors = $opt{'color'} ? [ @{$opt{'color'}} ] : [];
+ my $sizes = $opt{'size'} ? [ @{$opt{'size'}} ] : [];
+ my $styles = $opt{'style'} ? [ @{$opt{'style'}} ] : [];
+
foreach my $field ( @{$opt{'fields'}} ) {
+
my $align = $aligns ? shift @$aligns : '';
$align = " ALIGN=$align" if $align;
+
my $a = '';
if ( $links ) {
my $link = shift @$links;
@@ -264,11 +271,32 @@
$a = qq(<A HREF="$a">);
}
}
+
+ my $font = '';
+ my $color = shift @$colors;
+ $color = &{$color}($row) if ref($color) eq 'CODE';
+ my $size = shift @$sizes;
+ $size = &{$size}($row) if ref($size) eq 'CODE';
+ if ( $color || $size ) {
+ $font = '<FONT '.
+ ( $color ? "COLOR=#$color " : '' ).
+ ( $size ? qq(SIZE="$size" ) : '' ).
+ '>';
+ }
+
+ my($s, $es) = ( '', '' );
+ my $style = shift @$styles;
+ $style = &{$style}($row) if ref($style) eq 'CODE';
+ if ( $style ) {
+ $s = join( '', map "<$_>", split('', $style) );
+ $es = join( '', map "</$_>", split('', $style) );
+ }
+
%>
<% if ( ref($field) eq 'CODE' ) { %>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"<%= $align %>><%= $a %><%= &{$field}($row) %><%= $a ? '</A>' : '' %></TD>
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"<%= $align %>><%= $font %><%= $a %><%= $s %><%= &{$field}($row) %><%= $es %><%= $a ? '</A>' : '' %><%= $font ? '</FONT>' : '' %></TD>
<% } else { %>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"<%= $align %>><%= $a %><%= $row->$field() %><%= $a ? '</A>' : '' %></TD>
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"<%= $align %>><%= $font %><%= $a %><%= $s %><%= $row->$field() %><%= $es %><%= $a ? '</A>' : '' %><%= $font ? '</FONT>' : '' %></TD>
<% } %>
<% } %>
<% } else { %>
@@ -278,6 +306,14 @@
<% } %>
</TR>
<% } %>
+
+ <% if ( $opt{'footer'} ) { %>
+ <TR>
+ <% foreach my $footer ( @{ $opt{'footer'} } ) { %>
+ <TD CLASS="grid" BGCOLOR="#dddddd" STYLE="border-top: dashed 1px black;"><i><%= $footer %></i></TH>
+ <% } %>
+ </TR>
+ <% } %>
</TABLE>
<%= $pager %>