From 150756fc304002a15fee61d622c230494f814ba6 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 18 Aug 2011 01:15:41 +0000 Subject: multiple state links in FCC report, RT#13922 --- httemplate/search/477partVI_census.html | 14 +++++++++----- httemplate/search/cust_pkg.cgi | 3 ++- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'httemplate') diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html index 53b6db062..fc260bef8 100755 --- a/httemplate/search/477partVI_census.html +++ b/httemplate/search/477partVI_census.html @@ -31,10 +31,10 @@ 'fields' => [ sub { my $row = shift; $state_hash{substr($row->censustract, 0, 2)}++; - substr($row->censustract, 2, 3) || 'none' + substr($row->censustract, 2, 3) || 'None' }, sub { my $row = shift; - substr($row->censustract, 5) || 'none' + substr($row->censustract, 5) || 'None' }, 'upload', 'download', @@ -149,9 +149,13 @@ my $html_foot = sub { '
WARNING: multiple states found
'. ''. #nicer formatting someday join('', map { ''. - "". - qq('. + ''. + ''. ''; } keys %state_hash diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index d48ba1916..09b52d76b 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -154,7 +154,8 @@ for (qw( pkgpart classnum )) { $search_hash{$_} = [ $cgi->param($_) ]; } -for my $param ( qw(censustract) ) { +#scalars that need to be passed if empty +for my $param (qw(censustract censustract2 )) { $search_hash{$param} = $cgi->param($param) || '' if ( grep { /$param/ } $cgi->param ); } -- cgit v1.2.1
$_). - $state_hash{$_}. ''. + ( &FS::Report::FCC_477::statenum2state($_) || 'None' ). + ''. + qq(). + $state_hash{$_}. ' census tracts'. + '