[freeside-commits] branch master updated. ccc2208b2b7d09a9b1671846bc76a060649e64a4

Brian Medley bpm at 420.am
Sun Apr 22 08:49:50 PDT 2012


The branch, master has been updated
       via  ccc2208b2b7d09a9b1671846bc76a060649e64a4 (commit)
      from  7dd79523c75c3cd238fb1c0cb7ccb346a6569811 (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 ccc2208b2b7d09a9b1671846bc76a060649e64a4
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