[freeside-commits] freeside/httemplate/search 477partVI_census.html, 1.2.2.4, 1.2.2.5
Ivan,,,
ivan at wavetail.420.am
Wed Aug 17 18:23:06 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv23698/httemplate/search
Modified Files:
Tag: FREESIDE_2_1_BRANCH
477partVI_census.html
Log Message:
multiple state links in FCC report, RT#13922
Index: 477partVI_census.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/477partVI_census.html,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -w -d -r1.2.2.4 -r1.2.2.5
--- 477partVI_census.html 18 Aug 2011 01:15:45 -0000 1.2.2.4
+++ 477partVI_census.html 18 Aug 2011 01:23:04 -0000 1.2.2.5
@@ -30,7 +30,8 @@
],
'fields' => [
sub { my $row = shift;
- $state_hash{substr($row->censustract, 0, 2)}++;
+ my $state = substr($row->censustract, 0, 2);
+ $state_hash{$state}++;
substr($row->censustract, 2, 3) || 'None'
},
sub { my $row = shift;
@@ -40,7 +41,11 @@
'download',
'technology_code',
sub { $cgi->param('_type') eq 'xml' ? '0' : '' },#broken
- 'quantity',
+ sub { my $row = shift;
+ my $state = substr($row->censustract, 0, 2);
+ $state_pkgcount{$state} += $row->quantity;
+ $row->quantity;
+ },
sub { my $row = shift; sprintf "%.2f", $row->residential },
],
'links' => [
@@ -71,6 +76,7 @@
my %search_hash = ();
my @sql_query = ();
my %state_hash = ();
+my %state_pkgcount = ();
for ( qw(agentnum magic) ) {
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
@@ -154,7 +160,8 @@
'</TD>'.
'<TD>'.
qq(<A HREF="${link}censustract2=$_">).
- $state_hash{$_}. ' census tracts</A>'.
+ $state_pkgcount{$_}. ' packages</A> in '.
+ $state_hash{$_}. ' census tracts'.
'</TD>'.
'</TR>';
}
More information about the freeside-commits
mailing list