X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Ftower.html;h=555b8a39f955d434e942324e704905f9cc426d2f;hp=7f096a74865fde78b7a51230438ad5ee581c0670;hb=877a4eb85cb847bd314d6a9192fedb1dc35c5d02;hpb=ccc2208b2b7d09a9b1671846bc76a060649e64a4 diff --git a/httemplate/browse/tower.html b/httemplate/browse/tower.html index 7f096a748..555b8a39f 100644 --- a/httemplate/browse/tower.html +++ b/httemplate/browse/tower.html @@ -1,26 +1,35 @@ -<% include( 'elements/browse.html', - 'title' => 'Towers', - 'name' => 'towers', - 'menubar' => [ 'Add a new tower' => - $p.'edit/tower.html', - ], - 'query' => { 'table' => 'tower', }, - 'count_query' => 'SELECT COUNT(*) FROM tower', - 'disableable' => 1, - 'disabled_statuspos' => 1, - 'header' => [ 'Name', 'Sectors', 'Coordinates'], - 'fields' => [ $tower_sub, - $sector_sub, - $coord_sub, - ], - 'links' => [ ], - ) -%> +<& elements/browse.html, + 'title' => 'Towers', + 'name' => 'towers', + 'menubar' => [ 'Add a new tower' => + $p.'edit/tower.html', + #'Sector coverage maps' => + # $p.'search/sector.html', + 'Tower map' => + $p.'search/tower-map.html', + 'Download CSV for towercoverage.com' => + $p.'misc/tower-export.html?format=tc' + ], + 'query' => { 'table' => 'tower', }, + 'count_query' => 'SELECT COUNT(*) FROM tower', + 'disableable' => 1, + 'disabled_statuspos' => 1, + 'header' => [ 'Name', 'Location', 'Sectors', ], + 'fields' => [ $tower_sub, + $coord_sub, + $sector_sub, + ], + 'links' => [ ], + 'cell_style' => [ $tagdesc_style ], +&> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +#false laziness w/ browse/part_tag.html +my $tagdesc_style = sub { 'background-color:#'.shift->color }; + my $num_svc_links = sub { my ($query_string, $sectors) = @_; return if !$sectors; @@ -57,7 +66,12 @@ my $coord_sub = sub { [ [ - { 'data' => "Latitude: " . $tower->latitude . "
Longitude: " . $tower->longitude, }, + { 'data' => "Latitude: ". $tower->latitude. + "
Longitude: ". $tower->longitude. + "
Altitude: ". $tower->altitude. + "
Height: ". $tower->height. + "
Veg. height: ". $tower->veg_height, + }, { 'data' => $coords, 'link' => "Coordinates", }, ], ] @@ -70,7 +84,7 @@ my $tower_sub = sub { ); [ #rows [ - { 'data' => $tower->towername, }, + { 'data' => $tower->towername. ' ', }, { 'data' => ' (edit) ', size => '-1', 'link' => $p.'edit/tower.html?' . $tower->towernum }, ], @@ -89,7 +103,7 @@ my $sector_sub = sub { my $sectornum = $sector->sectornum; [ { - 'data' => $sector->sectorname, + 'data' => $sector->sectorname. ' ', 'link' => ( $sector->ip_addr ? 'http://'. $sector->ip_addr : '' ), },