[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 23dcc60dec006733f467fe58fd1fbfe9af3188c2
Brian Medley
bpm at 420.am
Sun Apr 22 08:50:03 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 23dcc60dec006733f467fe58fd1fbfe9af3188c2 (commit)
from 561fb1365f7d026f31475b595b301b8fb7a19bdf (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 23dcc60dec006733f467fe58fd1fbfe9af3188c2
Author: Brian Medley <bpm at snafu.org>
Date: Sun Apr 22 10:48:40 2012 -0500
support coordinates in gui, #15655
diff --git a/httemplate/browse/tower.html b/httemplate/browse/tower.html
index 7767a3c..7f096a7 100644
--- a/httemplate/browse/tower.html
+++ b/httemplate/browse/tower.html
@@ -8,9 +8,10 @@
'count_query' => 'SELECT COUNT(*) FROM tower',
'disableable' => 1,
'disabled_statuspos' => 1,
- 'header' => [ 'Name', 'Sectors', ],
+ 'header' => [ 'Name', 'Sectors', 'Coordinates'],
'fields' => [ $tower_sub,
$sector_sub,
+ $coord_sub,
],
'links' => [ ],
)
@@ -49,6 +50,19 @@ 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 . "<br>Longitude: " . $tower->longitude, },
+ { 'data' => $coords, 'link' => "Coordinates", },
+ ],
+ ]
+};
+
my $tower_sub = sub {
my $tower = shift;
my $sectors = join(',',
diff --git a/httemplate/edit/tower.html b/httemplate/edit/tower.html
index 5a0f2a8..8251308 100644
--- a/httemplate/edit/tower.html
+++ b/httemplate/edit/tower.html
@@ -12,12 +12,16 @@
m2_label => 'Sector',
m2_error_callback => $m2_error_callback,
},
+ 'latitude',
+ 'longitude',
],
labels => { 'towernum' => 'Tower',
'towername' => 'Name',
'sectornum' => 'Sector',
'disabled' => 'Disabled',
'default_ip_addr' => 'Tower IP address',
+ 'latitude', => 'Latitude',
+ 'longitude', => 'Longitude',
},
&>
<%init>
-----------------------------------------------------------------------
Summary of changes:
httemplate/browse/tower.html | 16 +++++++++++++++-
httemplate/edit/tower.html | 4 ++++
2 files changed, 19 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list