-<% 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',
+ '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;
[
[
- { 'data' => "Latitude: " . $tower->latitude . "<br>Longitude: " . $tower->longitude, },
+ { 'data' => "Latitude: ". $tower->latitude.
+ "<br>Longitude: ". $tower->longitude.
+ "<br>Altitude: ". $tower->altitude.
+ "<br>Height: ". $tower->height.
+ "<br>Veg. height: ". $tower->veg_height,
+ },
{ 'data' => $coords, 'link' => "Coordinates", },
],
]
);
[ #rows
[
- { 'data' => $tower->towername, },
+ { 'data' => $tower->towername. ' ', },
{ 'data' => ' (edit) ', size => '-1',
'link' => $p.'edit/tower.html?' . $tower->towernum },
],
my $sectornum = $sector->sectornum;
[
{
- 'data' => $sector->sectorname,
+ 'data' => $sector->sectorname. ' ',
'link' => ( $sector->ip_addr ? 'http://'. $sector->ip_addr : '' ),
},