X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Ftower.html;h=e2f9fd0bde6e25c2fe39d1f4501fe907bb27e3b8;hb=f19956cf9995fee8897542fafa6c7ec13afde381;hp=7767a3c36850fd5db0d13f72a67aecd04d0bd11e;hpb=c81adbf7bbaa537b650f39bb76ce0b7b8c069450;p=freeside.git
diff --git a/httemplate/browse/tower.html b/httemplate/browse/tower.html
index 7767a3c36..e2f9fd0bd 100644
--- a/httemplate/browse/tower.html
+++ b/httemplate/browse/tower.html
@@ -8,11 +8,13 @@
'count_query' => 'SELECT COUNT(*) FROM tower',
'disableable' => 1,
'disabled_statuspos' => 1,
- 'header' => [ 'Name', 'Sectors', ],
+ 'header' => [ 'Name', 'Location', 'Sectors', ],
'fields' => [ $tower_sub,
+ $coord_sub,
$sector_sub,
],
'links' => [ ],
+ 'cell_style' => [ $tagdesc_style ],
)
%>
<%init>
@@ -20,6 +22,9 @@
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;
@@ -49,6 +54,24 @@ my $num_svc_links = sub {
},
};
+my $coord_sub = sub {
+ my $tower = shift;
+
+ my $coords = $m->scomp("/elements/coord-links.html", $tower->latitude, $tower->longitude, $tower->towername);
+
+ [
+ [
+ { 'data' => "Latitude: ". $tower->latitude.
+ "
Longitude: ". $tower->longitude.
+ "
Altitude: ". $tower->altitude.
+ "
Height: ". $tower->height.
+ "
Veg. height: ". $tower->veg_height,
+ },
+ { 'data' => $coords, 'link' => "Coordinates", },
+ ],
+ ]
+};
+
my $tower_sub = sub {
my $tower = shift;
my $sectors = join(',',
@@ -56,7 +79,7 @@ my $tower_sub = sub {
);
[ #rows
[
- { 'data' => $tower->towername, },
+ { 'data' => $tower->towername. ' ', },
{ 'data' => ' (edit) ', size => '-1',
'link' => $p.'edit/tower.html?' . $tower->towernum },
],
@@ -75,7 +98,7 @@ my $sector_sub = sub {
my $sectornum = $sector->sectornum;
[
{
- 'data' => $sector->sectorname,
+ 'data' => $sector->sectorname. ' ',
'link' => ( $sector->ip_addr ? 'http://'. $sector->ip_addr : '' ),
},