diff options
author | ivan <ivan> | 2007-12-04 20:51:51 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-12-04 20:51:51 +0000 |
commit | 948b8acdd4b9b3864342062d0c397a11f57c5700 (patch) | |
tree | 4d39e731e1a46f062a143d448793e6ffbd9d598c /httemplate/search/elements | |
parent | 76c7355b1f97f99b5a3f673cf72429761924ee31 (diff) |
add some time-worked reporting
Diffstat (limited to 'httemplate/search/elements')
-rw-r--r-- | httemplate/search/elements/search.html | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index 7b1a515df..5649c8579 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -45,7 +45,7 @@ Example: #required unless 'query' is an SQL query string (shouldn't be...) 'count_query' => 'SELECT COUNT(*) FROM tablename', - 'count_addl' => [], #additional count fields listref of sprintf strings + 'count_addl' => [], #additional count fields listref of sprintf strings or coderefs # [ $money_char.'%.2f total paid', ], #listref of column labels, <TH> @@ -313,8 +313,14 @@ Example: <BR> % if ( $opt{'count_addl'} ) { -% my $n=0; foreach my $count ( @{$opt{'count_addl'}} ) { - <% sprintf( $count, $count_arrayref->[++$n] ) %><BR> +% my $n=0; +% foreach my $count ( @{$opt{'count_addl'}} ) { +% my $data = $count_arrayref->[++$n]; +% if ( ref($count) ) { + <% &{ $count }( $data ) %> +% } else { + <% sprintf( $count, $data ) %><BR> +% } % } % } </FORM> |