summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parsers/caves.py2
-rw-r--r--templates/cave.html3
-rw-r--r--templates/cave_entrances.html74
3 files changed, 4 insertions, 75 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index 5304599..a38434e 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -402,7 +402,7 @@ def read_entrance(filename, ent=None):
DataIssue.objects.create(parser="entrances", message=message, url=f"/cave/{slug}/edit/")
print(message)
- lastvisit = getXML(entrancecontents, "last visit date", maxItems=1, minItems=0, context=context)
+ lastvisit = getXML(entrancecontents, "lastvisit", maxItems=1, minItems=0, context=context)
alt = getXMLmax1("alt")
approach = getXMLmax1("approach")
diff --git a/templates/cave.html b/templates/cave.html
index 1bdb683..a8c0c5e 100644
--- a/templates/cave.html
+++ b/templates/cave.html
@@ -151,6 +151,9 @@
{% if ent.entrance.location_description %}
<dt>Location</dt><dd>{{ ent.entrance.location_description|safe }}</dd>
{% endif %}
+ {% if ent.entrance.lastvisit %}
+ <dt>Date last visited</dt><dd>{{ ent.entrance.lastvisit|safe }}</dd>
+ {% endif %}
{% if ent.entrance.approach %}
<dt>Approach</dt><dd>{{ ent.entrance.approach|safe }}</dd>
{% endif %}
diff --git a/templates/cave_entrances.html b/templates/cave_entrances.html
deleted file mode 100644
index ed02e68..0000000
--- a/templates/cave_entrances.html
+++ /dev/null
@@ -1,74 +0,0 @@
- <div id="entrances">
- <p>{% if cave.entrances %}
- <h2>Entrances</h2>
- <ul>
- {% for ent in cave.entrances %}
- <li>
- {{ ent.entrance_letter|safe }}
- {% if ent.entrance.name %}
- {{ ent.entrance.name|safe }}
- {% endif %}<a href="{% url "editentrance" cave.slug ent.entrance.slug %}">Edit</a>
- <dl>
- {% if ent.entrance.marking %}
- <dt>Marking</dt><dd>{{ ent.entrance.marking_val|safe }}</dd>
- {% endif %}
- {% if ent.entrance.marking_comment %}
- <dt>Marking Comment</dt><dd>{{ ent.entrance.marking_comment|safe }}</dd>
- {% endif %}
- {% if ent.entrance.findability %}
- <dt>Findability</dt><dd>{{ ent.entrance.findability_val|safe }}</dd>
- {% endif %}
- {% if ent.entrance.findability_comment %}
- <dt>Findability Comment</dt><dd>{{ ent.entrance.findability_comment|safe }}</dd>
- {% endif %}
- {% if ent.entrance.location_description %}
- <dt>Location</dt><dd>{{ ent.entrance.location_description|safe }}</dd>
- {% endif %}
- {% if ent.entrance.lastvisit %}
- <dt>Location</dt><dd>{{ ent.entrance.lastvisit|safe }}</dd>
- {% endif %}
- {% if ent.entrance.approach %}
- <dt>Approach</dt><dd>{{ ent.entrance.approach|safe }}</dd>
- {% endif %}
- {% if ent.entrance.map_description %}
- <dt>Map</dt><dd>{{ ent.entrance.map_description|safe }}</dd>
- {% endif %}
- {% if ent.entrance.underground_description %}
- <dt>Underground</dt><dd>{{ ent.entrance.underground_description|safe }}</dd>
- {% endif %}
- {% if ent.entrance.photo %}
- <dt>Photo</dt><dd>{{ ent.entrance.photo|safe }}</dd>
- {% endif %}
- {% if ent.entrance.entrance_description %}
- <dt>Description</dt><dd>{{ ent.entrance.entrance_description|safe }}</dd>
- {% endif %}
- {% if ent.entrance.explorers %}
- <dt>Explorers</dt><dd>{{ ent.entrance.explorers|safe }}</dd>
- {% endif %}
- {% if ent.entrance.northing %}
- <dt>Location</dt><dd>{{ ent.entrance.northing|safe }}, {{ ent.entrance.easting|safe }}, {{ ent.entrance.alt|safe }}m</dd>
- {% endif %}
- {% if ent.entrance.tag_station %}
- <dt>Tag Location</dt><dd>{{ ent.entrance.tag_station }} {{ ent.entrance.tag.y|safe }}, {{ ent.entrance.tag.x|safe }}, {{ ent.entrance.tag.z|safe }}m</dd>
- {% endif %}
- {% if ent.entrance.bearings %}
- <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 }} {{ ent.entrance.exact_location.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 %} {{ ent.entrance.other_location.y|safe }}, {{ ent.entrance.other_location.x|safe }}, {{ ent.entrance.other_location.z|safe }}m
- </dd>
- {% endif %}
- </dl>
- </li>
- {% endfor %}
- </ul>
-
-{% endif %}</p>
-<a href="{% url "newentrance" cave.slug %}">New Entrance</a>
- </div>