2011-07-11 02:10:22 +01:00
{% extends "cavebase.html" %}
2018-04-17 21:57:02 +01:00
{% block extraheaders %}
2022-03-22 02:22:15 +00:00
<!-- cave.html - this text visible because this template has been included -->
2018-04-17 21:57:02 +01:00
{% if cave.survex_file %}
2021-11-06 20:59:10 +00:00
<!--
2022-07-06 09:39:19 +01:00
# We put every .3d file in the same folder as
2021-11-06 20:59:10 +00:00
# the .svx file, using the {{svx3d}} template variable set in rendercave() in
2022-03-10 22:59:47 +00:00
# core/views/caves.py but with a full path. THIS IS NOW DONE March 2022.
2021-11-06 20:59:10 +00:00
#-->
2023-04-29 23:35:18 +01:00
< link type = "text/css" href = "/javascript/CaveView/css/caveview.css" rel = "stylesheet" / >
2023-04-29 22:46:14 +01:00
< script type = "text/javascript" src = "/javascript/CaveView/js/CaveView2.js" > < / script >
2018-04-17 21:57:02 +01:00
< script type = "text/javascript" >
2021-04-28 00:50:36 +01:00
function onLoad () {
2018-04-17 21:57:02 +01:00
2021-04-28 00:50:36 +01:00
// display the user interface - and a blank canvas
// the configuration object specifies the location of CaveView, surveys and terrain files
2023-04-29 22:46:14 +01:00
const viewer = new CV2.CaveViewer( 'scene', {
2021-04-28 00:50:36 +01:00
home: '/javascript/CaveView/',
2023-06-07 23:44:44 +01:00
//Wookey old code surveyDirectory: '/expowebcache/3d/',
2023-06-07 23:49:19 +01:00
surveyDirectory: '/cave/3d/',
2021-11-06 20:59:10 +00:00
terrainDirectory: '/loser/surface/terrain/' // cannot work, apache not handling this url
2021-04-28 00:50:36 +01:00
} );
2018-04-17 21:57:02 +01:00
2021-04-28 00:50:36 +01:00
// load a single survey to display
2021-04-03 20:52:35 +01:00
// Note the special code in views.caves.py to do this. The appropriate .svx/.3d file may not be simply the cave name +.3d
2023-04-29 23:35:18 +01:00
const ui = new CV2.CaveViewUI( viewer );
2023-04-29 22:46:14 +01:00
2023-06-07 23:44:44 +01:00
//Wookey old code: ui.loadCave('{{svx3d}}.3d');
2023-06-07 23:49:19 +01:00
ui.loadCave('{{ cave }}.3d');
2023-07-05 10:22:30 +01:00
document.getElementById('scene').style.cssText = "background-color: rgb(0, 0, 0); position: relative !important;"
2021-04-28 00:50:36 +01:00
}
2023-04-29 22:46:14 +01:00
window.onload = onLoad;
2018-04-17 21:57:02 +01:00
< / script >
2021-04-03 20:52:35 +01:00
{% endif %} <!-- all the above only loads if cave.survex_file is not empty -->
2018-04-17 21:57:02 +01:00
{% endblock %}
2021-04-02 20:41:42 +01:00
2011-07-11 02:10:22 +01:00
{% block content %}
{% block contentheader %}
< table id = "cavepage" >
< tr >
2021-04-25 04:04:53 +01:00
< th id = "kat_no" > <!-- why is this not showing unofficial_number?? -->
2023-09-10 13:42:36 +01:00
{{ cave.areacode}} /
2011-07-11 02:10:22 +01:00
{% if cave.kataster_number %}
{{ cave.kataster_number|safe }}
{% if cave.entrancelist %}
2022-07-15 14:05:48 +01:00
{{ cave.entrancelist|safe }}
2011-07-11 02:10:22 +01:00
{% endif %}
2021-04-25 04:04:53 +01:00
{% if cave.unofficial_number %}
2011-07-11 02:10:22 +01:00
< br / > ({{ cave.unofficial_number|safe }})
{% endif %}
2021-04-25 04:04:53 +01:00
{% else %}
2023-09-25 23:10:50 +01:00
{% if cave.unofficial_number %}
{{ cave.unofficial_number|safe }}
{% else %}
{{ cave_id|safe }}
{% endif %}
2011-07-11 02:10:22 +01:00
{% endif %}
< / th >
< th id = "name" >
{{ cave.official_name|safe }}
< / th >
< th id = "status" >
2023-06-07 22:38:22 +01:00
{% if cave.kataster_code %}
2011-07-11 02:10:22 +01:00
{{ cave.kataster_code|safe }}
2023-06-07 22:38:22 +01:00
{% endif %}
2011-07-11 02:10:22 +01:00
< / th >
< / tr >
< / table >
{% block related %}
{% endblock %}{% endblock %}
2021-04-03 20:52:35 +01:00
< div id = "Description" >
2023-03-21 12:56:51 +00:00
{% comment %} The 'cave' object has text field, not forign-key fields, so we cant dereference to get info on the survex file
{% endcomment %}
2023-06-07 21:54:25 +01:00
{% if cave.survey %}
2023-06-07 22:08:11 +01:00
< h2 > Surveys and Rigging Guides< / h2 >
2023-06-07 21:54:25 +01:00
{{ cave.survey|safe }}
{% endif %}
2021-04-03 20:52:35 +01:00
{% if cave.underground_description %}
< h2 > Underground Description< / h2 >
{{ cave.underground_description|safe }}
{% endif %}
{% if cave.equipment %}
< h2 > Equipment< / h2 >
{{ cave.equipment|safe }}
{% endif %}
2023-06-07 22:21:41 +01:00
{% comment "Kataster status is probably only required in the header" %}
2021-04-03 20:52:35 +01:00
{% if cave.kataster_status %}
< h2 > Kataster_status< / h2 >
{{ cave.kataster_status|safe }}
{% endif %}
2023-06-07 22:21:41 +01:00
{% endcomment %}
2023-06-07 23:19:08 +01:00
{% comment "Is this underground centre line section ever usefull? I suspect it should be deleted. MJG" %}
{% endcomment %}
2021-04-03 20:52:35 +01:00
{% if cave.underground_centre_line %}
< h2 > Underground Centre Line< / h2 >
{{ cave.underground_centre_line|safe }}
{% endif %}
2023-06-07 22:08:11 +01:00
{% if cave.explorers %}
< h2 > Explorers< / h2 >
{{ cave.explorers|safe }}
{% endif %}
{% if cave.references %}
< h2 > References< / h2 >
{{ cave.references|safe }}
{% endif %}
2023-07-03 21:35:00 +01:00
{% if not local %}
2022-07-06 09:39:19 +01:00
{% if cave.get_QMs %}
< h2 > QMs< / h2 >
< a href = "{% url 'caveQMs' cave_id|safe %}" > QM page for {{ cave_id|safe }}< / a >
{% endif %}
2023-07-03 21:35:00 +01:00
< h2 > Scanned survey notes< / h2 >
< a href = "{% url " cavewallets " cave_id % } " > {{ cave_id|safe }}< / a >
{% endif %}
2021-04-03 20:52:35 +01:00
{% if cave.notes %}
< h2 > Notes< / h2 >
{{ cave.notes|safe }}
2023-06-07 22:08:11 +01:00
{% endif %}
2021-04-03 20:52:35 +01:00
< / div >
2016-07-02 23:42:47 +01:00
< div id = "entrances" >
2021-04-28 00:50:36 +01:00
< p > {% if cave.entrances %}
2016-07-02 23:42:47 +01:00
< h2 > Entrances< / h2 >
2023-08-03 14:11:46 +01:00
< ol >
2016-07-02 23:42:47 +01:00
{% for ent in cave.entrances %}
< li >
2023-08-03 14:11:46 +01:00
Id letter: '{{ ent.entranceletter|safe}}'
2016-07-02 23:42:47 +01:00
{% if ent.entrance.name %}
{{ ent.entrance.name|safe }}
2023-08-03 14:11:46 +01:00
{% endif %}< a class = "editlink" href = "{% if local %}https://expo.survex.com{% endif %}{% url " editentrance " ent . entrance . url_parent cave . slug ent . entrance . slug % } " > Edit this entrance< / a >
2016-07-02 23:42:47 +01:00
< 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 %}
2023-07-26 20:40:30 +01:00
{% if ent.entrance.lastvisit %}
< dt > Date last visited< / dt > < dd > {{ ent.entrance.lastvisit|safe }}< / dd >
{% endif %}
2016-07-02 23:42:47 +01:00
{% 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 %}
2023-08-03 14:11:46 +01:00
< dt > Photo(s)< / dt > < dd > {{ ent.entrance.photo|safe }}< / dd >
2016-07-02 23:42:47 +01:00
{% 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 %}
2023-08-03 14:11:46 +01:00
< dt > Location< / dt > < dd > UTM33 Northing: {{ ent.entrance.northing|safe }}, Easting: {{ ent.entrance.easting|safe }}, {{ ent.entrance.alt|safe }}m< / dd >
2016-07-02 23:42:47 +01:00
{% endif %}
{% if ent.entrance.tag_station %}
2023-05-02 22:40:44 +01:00
< dt > Tag Location< / dt > < dd > {{ ent.entrance.tag_station }} {{ ent.entrance.tag.latlong.0|floatformat:5 }}N {{ ent.entrance.tag.latlong.1|floatformat:5 }}E (UTM33 {{ ent.entrance.tag.y|floatformat:0 }}, {{ ent.entrance.tag.x|floatformat:0 }}), {{ ent.entrance.tag.z|floatformat:0 }}m< / dd >
2016-07-02 23:42:47 +01:00
{% endif %}
{% if ent.entrance.bearings %}
< dt > Bearings< / dt > < dd > {{ ent.entrance.bearings|safe }}< / dd >
{% endif %}
{% if ent.entrance.exact_station %}
2023-05-02 22:40:44 +01:00
< dt > Exact Station< / dt > < dd > {{ ent.entrance.exact_station|safe }} {{ ent.entrance.exact_location.latlong.0|floatformat:5 }}N {{ ent.entrance.exact_location.latlong.1|floatformat:5 }}E (UTM33 {{ ent.entrance.exact_location.y|floatformat:0 }}, {{ ent.entrance.exact_location.x|floatformat:0 }}), {{ ent.entrance.exact_location.z|floatformat:0 }}m< / dd >
2016-07-02 23:42:47 +01:00
{% endif %}
{% if ent.entrance.other_station %}
< dt > Other Station< / dt > < dd > {{ ent.entrance.other_station|safe }}
2021-04-28 00:50:36 +01:00
{% if ent.entrance.other_description %}
- {{ ent.entrance.other_description|safe }}
2023-05-02 22:40:44 +01:00
{% endif %} {{ ent.entrance.other_location.latlong.0|floatformat:5 }}N {{ ent.entrance.other_location.latlong.1|floatformat:5 }}E (UTM33 {{ ent.entrance.other_location.y|floatformat:0 }}, {{ ent.entrance.other_location.x|floatformat:0 }}), {{ ent.entrance.other_location.z|floatformat:0 }}m
2021-04-28 00:50:36 +01:00
< / dd >
2016-07-02 23:42:47 +01:00
{% endif %}
< / dl >
< / li >
{% endfor %}
2023-08-03 14:11:46 +01:00
< / ol >
2011-07-11 02:10:22 +01:00
2016-07-02 23:42:47 +01:00
{% endif %}< / p >
2023-07-03 21:35:00 +01:00
< a class = "editlink" href = "{% if local %}https://expo.survex.com{% endif %}{% url " newentrance " cave . url_parent cave . slug % } " > New Entrance< / a >
2011-07-11 02:10:22 +01:00
< / div >
2023-04-29 23:35:18 +01:00
< h2 > Survex File(s)< / h2 >
2023-09-11 20:42:12 +01:00
All < a href = "/survexfile/{{ cave.areacode }}-{% if cave.kataster_number %}{{cave.kataster_number}}{% else %}{{cave.unofficial_number}}{% endif %}" > survexfiles< / a > for this cave < br / >
2023-04-29 23:35:18 +01:00
{% if cave.survex_file %}
Primary < a href = "/survexfile/{{cave.survex_file}}" > survex file< / a > for this cave
2023-06-07 23:19:08 +01:00
< br >
2023-09-15 20:41:02 +01:00
Download .3d file < a href = "{% url " cave3d " cave % } " > {% url "cave3d" cave %}< / a >
2023-04-29 23:35:18 +01:00
< br >
2023-09-15 20:41:02 +01:00
cave survex path '{{ cave.areacode }}/{% if cave.kataster_number %}{{cave.kataster_number}}{% else %}{{cave.unofficial_number}}{% endif %}/'
2023-04-29 23:35:18 +01:00
< div id = 'scene' > < / div >
{% endif %}
2016-07-02 23:42:47 +01:00
{% endblock content %}