[freeside-commits] freeside/httemplate/search/elements search.html,
1.16, 1.17
Ivan,,,
ivan at wavetail.420.am
Sat Aug 6 17:40:04 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/search/elements
In directory wavetail:/tmp/cvs-serv11217/httemplate/search/elements
Modified Files:
search.html
Log Message:
move cust_pkg search to new template, add active/suspended/cancelled customer packages to agent browse
Index: search.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/elements/search.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- search.html 14 Jul 2005 10:52:46 -0000 1.16
+++ search.html 7 Aug 2005 00:40:02 -0000 1.17
@@ -91,7 +91,12 @@
foreach my $field ( @{$opt{'fields'}} ) {
if ( ref($field) eq 'CODE' ) {
- push @line, &{$field}($row);
+ push @line, map {
+ ref($_) eq 'ARRAY'
+ ? '(N/A)' #unimplemented
+ : $_;
+ }
+ &{$field}($row);
} else {
push @line, $row->$field();
}
@@ -153,7 +158,11 @@
#}
if ( ref($field) eq 'CODE' ) {
foreach my $value ( &{$field}($row) ) {
- $worksheet->write($r, $c++, $value );
+ if ( ref($value) eq 'ARRAY' ) {
+ $worksheet->write($r, $c++, '(N/A)' ); #unimplemented
+ } else {
+ $worksheet->write($r, $c++, $value );
+ }
}
} else {
$worksheet->write($r, $c++, $row->$field() );
@@ -258,6 +267,52 @@
foreach my $field (
map {
+ if ( ref($_) eq 'ARRAY' ) {
+
+ my $tableref = $_;
+
+ '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0'.
+ ' STYLE="border:none">'.
+
+ join('', map {
+
+ my $rowref = $_;
+
+ '<tr>'.
+
+ join('', map {
+
+ my $element = $_;
+
+ '<TD STYLE="border:none"'.
+ ( $element->{'align'}
+ ? ' ALIGN="'. $element->{'align'}. '"'
+ : ''
+ ). '>'.
+ ( $element->{'link'}
+ ? '<A HREF="'. $element->{'link'}.'">'
+ : ''
+ ).
+ $element->{'data'}.
+ ( $element->{'link'}
+ ? '</A>'
+ : ''
+ ).
+ '</td>';
+
+ } @$rowref ).
+
+ '</tr>';
+ } @$tableref ).
+
+ '</table>';
+
+ } else {
+ $_;
+ }
+ }
+
+ map {
if ( ref($_) eq 'CODE' ) {
&{$_}($row);
} else {
More information about the freeside-commits
mailing list