[freeside-commits] freeside/httemplate/browse rate_region.html, 1.8, 1.9
Ivan,,,
ivan at wavetail.420.am
Mon Jul 6 14:34:24 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv3921
Modified Files:
rate_region.html
Log Message:
align, display countrycode with +, space between prefixes allowing wrapping
Index: rate_region.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/rate_region.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- rate_region.html 4 May 2009 00:22:44 -0000 1.8
+++ rate_region.html 6 Jul 2009 21:34:21 -0000 1.9
@@ -15,6 +15,7 @@
'header' => \@header,
'fields' => \@fields,
'links' => \@links,
+ 'align' => \@align,
'xls_format' => \@xls_format,
)
%>
@@ -40,12 +41,12 @@
" ELSE npa || '-' || nxx ".
" END";
my $prefixes_sql = "SELECT $prefix_sql $fromwhere AND npa IS NOT NULL";
- $select .= "( SELECT countrycode $fromwhere LIMIT 1 ) AS ccode,
- ARRAY_TO_STRING( ARRAY($prefixes_sql), ',' ) AS prefixes";
+ $select .= "( SELECT '+'||countrycode $fromwhere LIMIT 1 ) AS ccode,
+ ARRAY_TO_STRING( ARRAY($prefixes_sql), ', ' ) AS prefixes";
} elsif ( driver_name =~ /^mysql/i ) {
$join = 'LEFT JOIN rate_prefix USING ( regionnum )';
- $select .= "GROUP_CONCAT( DISTINCT countrycode ) AS ccode,
- GROUP_CONCAT( npa ORDER BY npa ) AS prefixes ";
+ $select .= "'+'||GROUP_CONCAT( DISTINCT countrycode ) AS ccode,
+ GROUP_CONCAT( npa ORDER BY npa SEPARATOR ', ' ) AS prefixes ";
$group_sql = 'GROUP BY regionnum, regionname';
} else {
die 'unknown database '. driver_name;
@@ -64,6 +65,7 @@
my @header = ( '#', 'Region', 'Country code', 'Prefixes' );
my @fields = ( 'regionnum', 'regionname', 'ccode', 'prefixes' );
my @links = ( ($link) x 4 );
+my @align = ( 'right', 'left', 'right', 'left' );
my @xls_format = ( ({ locked=>1, bg_color=>22 }) x 4 );
$cgi->param('dummy', 1);
More information about the freeside-commits
mailing list