freeside/httemplate/search/elements search.html,1.13,1.14

ivan ivan at pouncequick.420.am
Sun May 15 06:01:05 PDT 2005


Update of /home/cvs/cvsroot/freeside/httemplate/search/elements
In directory pouncequick:/tmp/cvs-serv6263/httemplate/search/elements

Modified Files:
	search.html 
Log Message:
move receivables report to search template

Index: search.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/elements/search.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- search.html	10 Apr 2005 10:16:04 -0000	1.13
+++ search.html	15 May 2005 13:01:00 -0000	1.14
@@ -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 { %>
@@ -277,6 +305,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>




More information about the freeside-commits mailing list