add direction to stop display

This commit is contained in:
Sanj 2012-02-23 19:21:59 +05:30
parent 4b0a9c2645
commit 40d1528895
2 changed files with 4 additions and 0 deletions

View File

@ -117,6 +117,7 @@ class Stop(models.Model):
'road': self.road.name,
'area': self.area.name,
'name_mr': self.name_mr,
'direction': self.dbdirection,
'routes': ", ".join([r.route.alias for r in RouteDetail.objects.filter(stop=self)]),
'alternative_names': ", ".join([a.name for a in self.alt_names.all().filter(typ='common')])
}

View File

@ -164,6 +164,7 @@ var API_BASE = "/1.0/",
var $displayName = $('<h2 />').text(stop.display_name).appendTo($div);
var $slug = $('<div />').addClass("stopSlug").text(stop.slug).appendTo($div);
var $road = $("<div />").addClass("stopRoad").text("Road: " + stop.road).appendTo($div);
var $direction = $("<div />").addClass("stopDirection").text("Direction: " + stop.direction).appendTo($div);
var $routes = $('<div />').text("Routes: " + stop.routes).appendTo($div);
// var $formLabel = $("<div />").text("Edit:").appendTo($div);
var $form = $('<form />').attr("id", "stopForm").appendTo($div);
@ -296,6 +297,8 @@ var API_BASE = "/1.0/",
clickout: false,
toggle: true
});
//map.addControl(new OpenLayers.Control.ZoomPanel());
map.addControl(mapControl);
mapControl.activate();