summaryrefslogtreecommitdiffstats
path: root/templates/cave.html
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-04-03 20:52:35 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2021-04-03 20:52:35 +0100
commitf6ae46e3521924fa9e0fc6b9bca76d2ee6af50f5 (patch)
tree24b419671998d80172fb89f2831d1423a4a447f1 /templates/cave.html
parent7ee7a05ea1c994fd9fb571f792dc8dda50871270 (diff)
downloadtroggle-f6ae46e3521924fa9e0fc6b9bca76d2ee6af50f5.tar.gz
troggle-f6ae46e3521924fa9e0fc6b9bca76d2ee6af50f5.tar.bz2
troggle-f6ae46e3521924fa9e0fc6b9bca76d2ee6af50f5.zip
3d CaveView regeneates .3d file in cache
Diffstat (limited to 'templates/cave.html')
-rw-r--r--templates/cave.html101
1 files changed, 54 insertions, 47 deletions
diff --git a/templates/cave.html b/templates/cave.html
index 0ccef4b..8d382c0 100644
--- a/templates/cave.html
+++ b/templates/cave.html
@@ -3,7 +3,10 @@
{% block extraheaders %}
{% if cave.survex_file %}
<style>
+# This is presumably very similar caveview.css but why is it copied here ?
+# Because it is NOT the same as the distrubuted CaveView code.
+# Needs to be separated out into JSLIB local. (PMS 3/4/2021)
div.cv-panel {
position: absolute;
@@ -420,16 +423,17 @@ div#scene {
// the configuration object specifies the location of CaveView, surveys and terrain files
CV.UI.init( 'scene', {
home: '/javascript/CaveView/',
- surveyDirectory: '/cave/3d/',
- terrainDirectory: '/loser/surface/terrain/'
+ surveyDirectory: '/expowebcache/3d/',
+ terrainDirectory: '/loser/surface/terrain/'
} );
// load a single survey to display
- CV.UI.loadCave( '{% if cave.kataster_number %}{{ cave.kataster_number }}{% else %}{{ cave.unofficial_number }}{% endif %}.3d' );
+ // Note the special code in views.caves.py to do this. The appropriate .svx/.3d file may not be simply the cave name +.3d
+ CV.UI.loadCave('{{svx3d}}.3d');
}
window.onload = onLoad;
</script>
-{% endif %}
+{% endif %} <!-- all the above only loads if cave.survex_file is not empty-->
{% endblock %}
@@ -460,6 +464,52 @@ div#scene {
{% block related %}
{% endblock %}{% endblock %}
+
+
+<div id="Description">
+
+<p>{% if cave.explorers %}
+ <h2>Explorers</h2>
+ {{ cave.explorers|safe }}
+{% endif %}
+{% if cave.underground_description %}
+ <h2>Underground Description</h2>
+ {{ cave.underground_description|safe }}
+{% endif %}
+{% if cave.equipment %}
+ <h2>Equipment</h2>
+ {{ cave.equipment|safe }}
+{% endif %}
+{% if cave.references %}
+ <h2>References</h2>
+ {{ cave.references|safe }}
+{% endif %}
+{% if cave.survey %}
+ <h2>Survey</h2>
+ {{ cave.survey|safe }}
+{% endif %}
+{% if cave.kataster_status %}
+ <h2>Kataster_status</h2>
+ {{ cave.kataster_status|safe }}
+{% endif %}
+{% if cave.underground_centre_line %}
+ <h2>Underground Centre Line</h2>
+ {{ cave.underground_centre_line|safe }}
+{% endif %}
+{% if cave.survex_file %}
+ <h2>Survex File</h2>
+ <a href="{% url "survexcavessingle" cave.kataster_number %}">All survex files</a> &nbsp;&nbsp;&nbsp;
+ <a href="{% if cave.kataster_number %}{% url "cave3d" cave.kataster_number %}{% else %}{% url "cave3d" cave.unofficial_number %}{% endif %}">3d file download</a>&nbsp;&nbsp;&nbsp;
+ <a href="{% url "svx" svxstem %}">This survex file</a> &nbsp;&nbsp;&nbsp;
+
+ <div id='scene'></div>
+{% endif %}
+{% if cave.notes %}
+ <h2>Notes</h2>
+ {{ cave.notes|safe }}
+{% endif %}</p>
+
+</div>
<div id="entrances">
<p>{% if cave.entrances %}
<h2>Entrances</h2>
@@ -531,47 +581,4 @@ div#scene {
{% endif %}</p>
<a href="{% url "newentrance" cave.slug %}">New Entrance</a>
</div>
-
-<div id="Description">
-
-<p>{% if cave.explorers %}
- <h2>Explorers</h2>
- {{ cave.explorers|safe }}
-{% endif %}
-{% if cave.underground_description %}
- <h2>Underground Description</h2>
- {{ cave.underground_description|safe }}
-{% endif %}
-{% if cave.equipment %}
- <h2>Equipment</h2>
- {{ cave.equipment|safe }}
-{% endif %}
-{% if cave.references %}
- <h2>References</h2>
- {{ cave.references|safe }}
-{% endif %}
-{% if cave.survey %}
- <h2>Survey</h2>
- {{ cave.survey|safe }}
-{% endif %}
-{% if cave.kataster_status %}
- <h2>Kataster_status</h2>
- {{ cave.kataster_status|safe }}
-{% endif %}
-{% if cave.underground_centre_line %}
- <h2>Underground Centre Line</h2>
- {{ cave.underground_centre_line|safe }}
-{% endif %}
-{% if cave.survex_file %}
- <h2>Survex File</h2>
- {{ cave.survex_file|safe }} <a href="{% if cave.kataster_number %}{% url "cave3d" cave.kataster_number %}{% else %}{% url "cave3d" cave.unofficial_number %}{% endif %}">3d file</a>
- <div id='scene'></div>
-{% endif %}
-{% if cave.notes %}
- <h2>Notes</h2>
- {{ cave.notes|safe }}
-{% endif %}</p>
-
-</div>
-
{% endblock content %}