forked from expo/troggle
201 lines
7.6 KiB
HTML
201 lines
7.6 KiB
HTML
{% extends "cavebase.html" %}
|
|
{% block extraheaders %}
|
|
<!-- cave.html - this text visible because this template has been included -->
|
|
{% if cave.survex_file %}
|
|
<!--
|
|
# We put every .3d file in the same folder as
|
|
# the .svx file, using the {{svx3d}} template variable set in rendercave() in
|
|
# core/views/caves.py but with a full path. THIS IS NOW DONE March 2022.
|
|
#-->
|
|
<link type="text/css" href="/javascript/CaveView/css/caveview.css" rel="stylesheet"/>
|
|
<script type="text/javascript" src="/javascript/CaveView/js/CaveView2.js" ></script>
|
|
|
|
<script type="text/javascript" >
|
|
function onLoad () {
|
|
|
|
// display the user interface - and a blank canvas
|
|
// the configuration object specifies the location of CaveView, surveys and terrain files
|
|
const viewer = new CV2.CaveViewer( 'scene', {
|
|
home: '/javascript/CaveView/',
|
|
surveyDirectory: '/expowebcache/3d/',
|
|
terrainDirectory: '/loser/surface/terrain/' // cannot work, apache not handling this url
|
|
} );
|
|
|
|
// load a single survey to display
|
|
// Note the special code in views.caves.py to do this. The appropriate .svx/.3d file may not be simply the cave name +.3d
|
|
const ui = new CV2.CaveViewUI( viewer );
|
|
|
|
ui.loadCave('{{svx3d}}.3d');
|
|
}
|
|
window.onload = onLoad;
|
|
</script>
|
|
{% endif %} <!-- all the above only loads if cave.survex_file is not empty-->
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
{% block contentheader %}
|
|
<table id="cavepage">
|
|
<tr>
|
|
<th id="kat_no"><!-- why is this not showing unofficial_number??-->
|
|
{% if cave.area.all %}
|
|
{{ cave.area.all.0.kat_area }} /
|
|
{% endif %}
|
|
{% if cave.kataster_number %}
|
|
{{ cave.kataster_number|safe }}
|
|
{% if cave.entrancelist %}
|
|
{{ cave.entrancelist|safe }}
|
|
{% endif %}
|
|
{% if cave.unofficial_number %}
|
|
<br />({{ cave.unofficial_number|safe }})
|
|
{% endif %}
|
|
{% else %}
|
|
<br />{{ cave_id|safe }}
|
|
{% endif %}
|
|
</th>
|
|
<th id="name">
|
|
{{ cave.official_name|safe }}
|
|
</th>
|
|
<th id="status">
|
|
{{ cave.kataster_code|safe }}
|
|
</th>
|
|
</tr>
|
|
</table>
|
|
{% block related %}
|
|
{% endblock %}{% endblock %}
|
|
|
|
|
|
|
|
<div id="Description">
|
|
{% comment %} The 'cave' object has text field, not forign-key fields, so we cant dereference to get info on the survex file
|
|
{% endcomment %}
|
|
<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.get_QMs %}
|
|
<h2>QMs</h2>
|
|
<a href="{% url 'caveQMs' cave_id|safe %}">QM page for {{ cave_id|safe }}</a>
|
|
{% endif %}
|
|
|
|
|
|
<h2>Scanned survey notes</h2>
|
|
<a href="{% url "cavewallets" cave_id %}">{{ cave_id|safe }}</a>
|
|
|
|
{% if cave.notes %}
|
|
<h2>Notes</h2>
|
|
{{ cave.notes|safe }}
|
|
{% endif %}</p>
|
|
|
|
</div>
|
|
<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" ent.entrance.url_parent 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.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>?BMN? Northing: {{ ent.entrance.northing|safe }}, Easting: {{ 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 }} UTM33 {{ ent.entrance.tag.y|floatformat:0 }}, {{ ent.entrance.tag.x|floatformat:0 }}, {{ ent.entrance.tag.z|floatformat:0 }}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 }} UTM33 {{ ent.entrance.exact_location.y|floatformat:0 }}, {{ ent.entrance.exact_location.x|floatformat:0 }}, {{ ent.entrance.exact_location.z|floatformat:0 }}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 %} UTM33 {{ ent.entrance.other_location.y|floatformat:0 }}, {{ ent.entrance.other_location.x|floatformat:0 }}, {{ ent.entrance.other_location.z|floatformat:0 }}m
|
|
</dd>
|
|
{% endif %}
|
|
</dl>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% endif %}</p>
|
|
<a href="{% url "newentrance" cave.url_parent cave.slug %}">New Entrance</a>
|
|
</div>
|
|
<h2>Survex File(s)</h2>
|
|
All <a href="/survexfile/{{cave.kataster_number}}">survexfiles</a> for this cave {<br />
|
|
{% if cave.survex_file %}
|
|
Primary <a href="/survexfile/{{cave.survex_file}}">survex file</a> for this cave
|
|
<p>[<a href="https://aardgoose.github.io/CaveView.js/">CaveView</a> display of the .3d file is temporarily disabled while we fix things (Nov.2021).<br> See <a href="/handbook/computing/todo.rst">/handbook/computing/todo.rst</a>.]<br><br>
|
|
|
|
Download .3d file <a href="/cave/3d/{{cave}}">caves-{{ cave.area.all.0.kat_area }}/{{cave.kataster_number}}/{{svx3d}}.3d</a>
|
|
<br>
|
|
cave ID '{{cave.reference}}'<br>
|
|
cave survex path '{{ cave.area.all.0.kat_area }}/{{cave.kataster_number}}'
|
|
<div id='scene'></div>
|
|
{% endif %}
|
|
{% endblock content %}
|