[freeside-commits] branch master updated. c96f38c9a16df1fe84172e53cf58acd551b1937d

Ivan ivan at 420.am
Mon Feb 20 14:21:01 PST 2012


The branch, master has been updated
       via  c96f38c9a16df1fe84172e53cf58acd551b1937d (commit)
       via  34d2201188f7f58009b51e8df5cf0be2d9bb63aa (commit)
      from  07f4516dab899ff15a34e197a3622df6675f63cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c96f38c9a16df1fe84172e53cf58acd551b1937d
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Feb 20 14:14:18 2012 -0800

    add rows #s to fcc 477 census report

diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html
index 3883a1c..be3a9c0 100755
--- a/httemplate/search/477partVI_census.html
+++ b/httemplate/search/477partVI_census.html
@@ -1,64 +1,27 @@
 <% include( 'elements/search.html',
-                  'html_init'     => $html_init,
-                  'html_foot'     => $html_foot,
-                  'name'          => 'regions',
-                  'query'         => [ @sql_query ],
-                  'count_query'   =>  $count_query,
-                  'order_by'      => 'ORDER BY censustract',
-                  'avoid_quote'   => 1,
-                  'no_csv_header' => 1,
-                  'nohtmlheader'  => 1,
-                  'header'        => [
-                                       'County code',
-                                       'Census tract code',
-                                       'Upload rate',
-                                       'Download rate',
-                                       'Technology code',
-                                       'Technology code other',
-                                       'Quantity',
-                                       'Percentage residential',
-                                     ],
-                  'xml_elements'  => [
-                                       'county_fips',
-                                       'census_tract',
-                                       'upload_rate_code',
-                                       'download_rate_code',
-                                       'technology_code',
-                                       'technology_code_other',
-                                       'value',
-                                       'percentage',
-                                     ],
-                  'fields'        => [
-                    sub { my $row = shift; 
-                          my $state = substr($row->censustract, 0, 2);
-                          $state_hash{$state}++;
-                          substr($row->censustract, 2, 3) || 'None';
-                        },
-                    sub { my $row = shift;
-                          substr($row->censustract, 5) || 'None';
-                        },
-                    'upload',
-                    'download',
-                    'technology_code',
-                    sub { $cgi->param('_type') eq 'xml' ? '0' : '' },#broken
-                    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'        => [
-                    [ $link, $link_suffix ],
-                    [ $link, $link_suffix ],
-                    [ $link, $link_suffix ],
-                    [ $link, $link_suffix ],
-                    [ $link, $link_suffix ],
-                    [ $link, $link_suffix ],
-                    [ $link, $link_suffix ],
-                    [ $link, $link_suffix ],
-                  ],
-                  'url'          => $opt{url} || '',
+                  'html_init'       => '<H2>Part VI</H2>',
+                  'html_foot'       => $html_foot,
+                  'name'            => 'regions',
+                  'query'           => [ @sql_query ],
+                  'count_query'     =>  $count_query,
+                  'order_by'        => 'ORDER BY censustract',
+                  'avoid_quote'     => 1,
+                  'no_csv_header'   => 1,
+                  'nohtmlheader'    => 1,
+                  'header'          => \@header,
+                  'xml_elements'    => [
+                                         'county_fips',
+                                         'census_tract',
+                                         'upload_rate_code',
+                                         'download_rate_code',
+                                         'technology_code',
+                                         'technology_code_other',
+                                         'value',
+                                         'percentage',
+                                       ],
+                  'fields'          => \@fields,
+                  'links'           => \@links,
+                  'url'             => $opt{url} || '',
                   'xml_row_element' => 'Datarow',
               )
 %>
@@ -71,12 +34,52 @@ die "access denied"
 
 my %opt = @_;
 
-my $html_init = '<H2>Part VI</H2>';
+my %state_hash = ();
+my %state_pkgcount = ();
+
+my @header = ();
+my @fields = ();
+my @links = ();
+my $num = ($cgi->param('offset') =~ /^(\d+)$/) ? $1 : 0;
+unless ( $cgi->param('_type') eq 'xml' ) {
+  push @header, '#';
+  push @fields, sub { ++$num };
+  push @links,  '';
+}
+push @header,
+  'County code',
+  'Census tract code',
+  'Upload rate',
+  'Download rate',
+  'Technology code',
+  'Technology code other',
+  'Quantity',
+  'Percentage residential',
+;
+push @fields,
+  sub { my $row = shift; 
+        my $state = substr($row->censustract, 0, 2);
+        $state_hash{$state}++;
+        substr($row->censustract, 2, 3) || 'None';
+      },
+  sub { my $row = shift;
+        substr($row->censustract, 5) || 'None';
+      },
+  'upload',
+  'download',
+  'technology_code',
+  sub { $cgi->param('_type') eq 'xml' ? '0' : '' },#broken
+  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 },
+;
+push @links, ( [ $link, $link_suffix ] x 8 );
 
 my %search_hash = ();
 my @sql_query = ();
-my %state_hash = ();
-my %state_pkgcount = ();
   
 for ( qw(agentnum magic) ) {
   $search_hash{$_} = $cgi->param($_) if $cgi->param($_);

commit 34d2201188f7f58009b51e8df5cf0be2d9bb63aa
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Feb 20 14:06:40 2012 -0800

    current deb unstable perl path for "make dev" kludge

diff --git a/Makefile b/Makefile
index 65ab50a..7dde489 100644
--- a/Makefile
+++ b/Makefile
@@ -116,7 +116,7 @@ RT_PATH = /opt/rt3
 
 #only used for dev kludge now, not a big deal
 FREESIDE_PATH = `pwd`
-PERL_INC_DEV_KLUDGE = /usr/local/share/perl/5.10.1/
+PERL_INC_DEV_KLUDGE = /usr/local/share/perl/5.14.2/
 
 VERSION=2.5.0cvs
 TAG=freeside_2_5_0

-----------------------------------------------------------------------

Summary of changes:
 Makefile                                |    2 +-
 httemplate/search/477partVI_census.html |  129 ++++++++++++++++---------------
 2 files changed, 67 insertions(+), 64 deletions(-)




More information about the freeside-commits mailing list