aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/geolocation/templates
diff options
context:
space:
mode:
authorJessica Tallon <jessica@megworld.co.uk>2014-09-15 19:34:42 +0100
committerJessica Tallon <jessica@megworld.co.uk>2014-10-09 19:16:54 +0100
commitc0434db46910e891313495b5ae94cbbe1dd08058 (patch)
tree9f7cfe31ca3bf4c5f49adf2daa964eafe91061dd /mediagoblin/plugins/geolocation/templates
parentd60d686a14d10af3f58867569622735ff9ecd068 (diff)
downloadmediagoblin-c0434db46910e891313495b5ae94cbbe1dd08058.tar.lz
mediagoblin-c0434db46910e891313495b5ae94cbbe1dd08058.tar.xz
mediagoblin-c0434db46910e891313495b5ae94cbbe1dd08058.zip
Add location model and migrations
Diffstat (limited to 'mediagoblin/plugins/geolocation/templates')
-rw-r--r--mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html13
1 files changed, 6 insertions, 7 deletions
diff --git a/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html b/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html
index 70f837ff..8da6f0ee 100644
--- a/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html
+++ b/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html
@@ -17,14 +17,13 @@
#}
{% block geolocation_map %}
- {% if media.media_data.gps_latitude is defined
- and media.media_data.gps_latitude
- and media.media_data.gps_longitude is defined
- and media.media_data.gps_longitude %}
- <h3>{% trans %}Location{% endtrans %}</h3>
+ {% if model.location
+ and model.get_location.position
+ and model.get_location.position.latitude
+ and model.get_location.position.longitude %}
<div>
- {%- set lon = media.media_data.gps_longitude %}
- {%- set lat = media.media_data.gps_latitude %}
+ {%- set lon = model.get_location.position.longitude %}
+ {%- set lat = model.get_location.position.latitude %}
{%- set osm_url = "http://openstreetmap.org/?mlat={lat}&mlon={lon}".format(lat=lat, lon=lon) %}
<div id="tile-map" style="width: 100%; height: 196px;">
<input type="hidden" id="gps-longitude"