added entrance locations

This commit is contained in:
Martin 2012-08-14 15:08:08 +02:00
parent 532b8e064b
commit 29c2c5f88d
2 changed files with 8 additions and 2 deletions

View File

@ -568,6 +568,12 @@ class Entrance(TroggleModel):
def __unicode__(self):
return unicode(self.slug())
def exact_location(self):
return SurvexStation.objects.lookup(self.exact_station)
def other_location(self):
return SurvexStation.objects.lookup(self.other_station)
def find_location(self):
if self.tag_station:
s = SurvexStation.objects.lookup(self.tag_station)

View File

@ -52,13 +52,13 @@
<dt>Bearings</dt><dd>{{ ent.entrance.bearings|safe }}</dd>
{% endif %}
{% if ent.entrance.exact_station %}
<dt>Exact Station</dt><dd>{{ ent.entrance.exact_station|safe }}</dd>
<dt>Exact Station</dt><dd>{{ ent.entrance.exact_station|safe }} {{ ent.exact_location.tag.y|safe }}, {{ ent.entrance.exact_location.x|safe }}, {{ ent.entrance.exact_location.z|safe }}m</dd>
{% endif %}
{% if ent.entrance.other_station %}
<dt>Other Station</dt><dd>{{ ent.entrance.other_station|safe }}
{% if ent.entrance.other_description %}
- {{ ent.entrance.other_description|safe }}
{% endif %}
{% endif %} {{ ent.entrance.other_location.y|safe }}, {{ ent.entrance.other_location.x|safe }}, {{ ent.entrance.other_location.z|safe }}m
</dd>
{% endif %}
</dl>