2011-07-11 02:10:22 +01:00
{% extends "cavebase.html" %}
2021-04-28 00:50:36 +01:00
<!-- cave.html - this text visible because this template has been included -->
2018-04-17 21:57:02 +01:00
{% block extraheaders %}
{% if cave.survex_file %}
2021-11-06 20:59:10 +00:00
<!--
#Wookey says (Nov.2021) that the CaveView integration was done by Martin Green
#at an expo training weekend.
# This design assumes that all .3d files are in the same folder, as
# specified by THREEDCACHEDIR in localsettings.py which implicitly is
# assuming that all survex files have unique filenames - which is not true
# there are about 20 duplicates, see report items in DataIssues
# http://expo.survex.com/pathsreport
# http://expo.survex.com/dataissues
# This also means that all survex files must be individually run through survex,
# (which takes as much time as the rest of the import procedure for all data).
# Olly says it would be more accurate to just produce one 1623.3d and then to
# separate out the bit for each cave. He's right: we are losing the corrections
# from adjacent caves and surface surveys doing it this way.
# The code is RunSurvexIfNeeded() in parsers/survex.py
# SUGGESTION we shuld just ditch and put ever .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 css code below is very similar caveview.css but why is it copied here ?
2021-04-28 00:50:36 +01:00
# Because it is NOT exactly the same as the distrubuted CaveView code.
2021-11-06 20:59:10 +00:00
# e.g. the body {} bit in Caveview/css/caveview.css is missing here:
#-->
2021-04-28 00:50:36 +01:00
< style >
2018-04-17 21:57:02 +01:00
div.cv-panel {
2021-04-28 00:50:36 +01:00
position: absolute;
top: 0;
left: 0;
z-index: 100;
background-color: rgba(50,50,50,0.5);
color: yellowgreen;
border: 1px solid black;
border-radius: 5px;
2018-04-17 21:57:02 +01:00
}
div.cv-compass, div.cv-ahi {
2021-04-28 00:50:36 +01:00
position: absolute;
bottom: 95px;
right: 5px;
margin: 0;
padding-top: 2px;
/* border: 1px solid white; */
text-align: center;
width: 78px;
height: 19px;
z-index: 50;
background-color: rgba(50,50,50,0.5);
background-color: black;
color: white;
}
2018-04-17 21:57:02 +01:00
div.cv-ahi {
2021-04-28 00:50:36 +01:00
right: 95px;
2018-04-17 21:57:02 +01:00
}
div.scale-legend {
2021-04-28 00:50:36 +01:00
position: absolute;
color: white;
background-color: black;
bottom: 30px;
2018-04-17 21:57:02 +01:00
}
div.linear-scale {
2021-04-28 00:50:36 +01:00
position: absolute;
color: white;
background-color: black;
right: 30px;
width: 40px;
padding: 2px 0;
text-align: right;
border: 1px solid black;
font-size: 14px;
2018-04-17 21:57:02 +01:00
}
div.linear-scale-caption {
2021-04-28 00:50:36 +01:00
position: absolute;
color: white;
background-color: black;
right: 5px;
width: 65px;
padding: 2px 0 5px 0;
text-align: left;
border: 1px solid black;
font-size: 14px;
2018-04-17 21:57:02 +01:00
}
#min-div {
2021-04-28 00:50:36 +01:00
border-bottom: 1px solid white;
2018-04-17 21:57:02 +01:00
}
#max-div {
2021-04-28 00:50:36 +01:00
border-top: 1px solid white;
2018-04-17 21:57:02 +01:00
}
#angle-legend {
2021-04-28 00:50:36 +01:00
position: absolute;
width: 80px;
right: 5px;
bottom: 180px;
color: white;
background-color: black;
font-size: 14px;
text-align: center;
2018-04-17 21:57:02 +01:00
}
#scene {
2021-04-28 00:50:36 +01:00
width: 100%;
height: 700px;
position: relative;
2018-04-17 21:57:02 +01:00
}
#progress-bar {
2021-04-28 00:50:36 +01:00
position: absolute;
top: 55%;
height: 20px;
border: 1px solid white;
z-index: 100;
2018-04-17 21:57:02 +01:00
}
#status-text {
2021-04-28 00:50:36 +01:00
position: absolute;
top: 50%;
height: 20px;
padding-left: 4px;
background-color: black;
color: white;
z-index: 100;
2018-04-17 21:57:02 +01:00
}
#frame div.page ul {
2021-04-28 00:50:36 +01:00
list-style-type: none;
margin: 8px 0 0 0;
padding: 0;
width: 200px;
height: 100%;
cursor: default;
font-size: 12px;
overflow-y: auto;
overflow-x: hidden;
2018-04-17 21:57:02 +01:00
}
#frame div.page li {
2021-04-28 00:50:36 +01:00
position: relative;
margin-left: 16px;
border-bottom: 1px solid #444444;
2018-04-17 21:57:02 +01:00
}
#frame div.page li.selected {
2021-04-28 00:50:36 +01:00
color: #1ab4e5;
2018-04-17 21:57:02 +01:00
}
#frame div.page li:hover {
2021-04-28 00:50:36 +01:00
color: yellow;
2018-04-17 21:57:02 +01:00
}
#frame div.page div#ui-path {
2021-04-28 00:50:36 +01:00
font-size: 12px;
border-top: 1px solid grey;
border-bottom: 1px solid grey;
margin-top: 8px;
padding: 2px 0 2px 12px;
2018-04-17 21:57:02 +01:00
}
#frame div.page div#ui-path span {
2021-04-28 00:50:36 +01:00
color: #1ab4e5;
2018-04-17 21:57:02 +01:00
}
#frame div.page div.slide {
2021-04-28 00:50:36 +01:00
position: absolute;
top: 64px;
left: 0px;
height: auto;
margin-top:0;
bottom: 44px;
background-color: #222222;
transition: transform 0.25s ease-in;
2018-04-17 21:57:02 +01:00
}
#frame div.slide-out {
2021-04-28 00:50:36 +01:00
border-right: 1px grey solid;
transform: translateX(-100%);
2018-04-17 21:57:02 +01:00
}
#frame div.page div.descend-tree {
2021-04-28 00:50:36 +01:00
position: absolute;
top: 0px;
right: 0px;
margin: 0;
color: #1ab4e5;
z-index: 110;
2018-04-17 21:57:02 +01:00
}
#frame {
2021-04-28 00:50:36 +01:00
position: absolute;
top: 0px;
left: 0px;
width: 240px;
height: 100%;
background-color: transparent;
transform: translateX(-200px);
transition: transform 0.25s ease-in;
2018-04-17 21:57:02 +01:00
}
#frame.onscreen {
2021-04-28 00:50:36 +01:00
transform: none;
transition: transform 0.25s ease-out;
2018-04-17 21:57:02 +01:00
}
#frame a.download {
2021-04-28 00:50:36 +01:00
border: 1px solid green;
display: block;
width: 180px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 4px;
margin-left: 8px;
border: none;
border-bottom: 4px solid #1ab4e5;
color: #dddddd;
background-color: black;
padding-bottom: 4px;
box-shadow: 1px 1px 8px 0px #888888;
outline: nonlass="cavedisplay"e;
text-decoration: none;
text-align: center;
2018-04-17 21:57:02 +01:00
}
#frame a.download:hover {
2021-04-28 00:50:36 +01:00
color: white;
2018-04-17 21:57:02 +01:00
}
#frame a.download:active {
2021-04-28 00:50:36 +01:00
color: #dddddd;
border-bottom: 4px solid #0c536a;
box-shadow: none;
box-shadow: inset 1px 1px 8px 0px #888888;
2018-04-17 21:57:02 +01:00
}
#frame .tab {
2021-04-28 00:50:36 +01:00
position: absolute;
right: 0px;lass="cavedisplay"
width: 40px;
height: 40px;
box-sizing: border-box;
background-color: #444444;
border-left: 1px solid black;
background-position: center;
border-top: 1px solid black;
2018-04-17 21:57:02 +01:00
}
#frame #close {
2021-04-28 00:50:36 +01:00
position: absolute;
right: 40px;
bottom: 0px;
width: 40px;
height: 40px;
box-sizing: border-box;
z-index: 150;
background-image: url(../images/ic_remove.png);
background-position: center;
2018-04-17 21:57:02 +01:00
}
#icon_settings {
2021-04-28 00:50:36 +01:00
background-image: url(../images/ic_settings.png);
2018-04-17 21:57:02 +01:00
}
#icon_terrain {
2021-04-28 00:50:36 +01:00
background-image: url(../images/ic_terrain.png);
2018-04-17 21:57:02 +01:00
}
#icon_explore {
2021-04-28 00:50:36 +01:00
background-image: url(../images/ic_explore.png);
2018-04-17 21:57:02 +01:00
}
#icon_info {
2021-04-28 00:50:36 +01:00
background-image: url(../images/ic_info.png);
2018-04-17 21:57:02 +01:00
}
#icon_route {
2021-04-28 00:50:36 +01:00
background-image: url(../images/ic_route.png);
2018-04-17 21:57:02 +01:00
}
#icon_help {
2021-04-28 00:50:36 +01:00
background-image: url(../images/ic_help.png);
2018-04-17 21:57:02 +01:00
}
#frame div.toptab {
2021-04-28 00:50:36 +01:00
background-color: #222222;
border-left: none;
border-right: 1px solid grey;
border-top: 1px solid grey;
2018-04-17 21:57:02 +01:00
}
#frame div.page {
2021-04-28 00:50:36 +01:00
position: absolute;
top: 0px;
bottom: 40px;
left: 0px;
width: 200px;
height: 100%;
color: white;
background-color: #222222;
padding: 0 4px;
box-sizing: border-box;
cursor: default;
padding-bottom: 40px;
2018-04-17 21:57:02 +01:00
}
#frame div.page div.header {
2021-04-28 00:50:36 +01:00
margin: 16px 0px 8px 0px;
font-weight: bold;
height: 16px;
box-sizing: border-box;
padding-left: 2px;
2018-04-17 21:57:02 +01:00
}
#frame div.page div.control {
2021-04-28 00:50:36 +01:00
margin: 2px 0 2px 0;
padding-top: 2px;
2018-04-17 21:57:02 +01:00
}
#frame div.page label {
2021-04-28 00:50:36 +01:00
display: block;
border-top: 1px solid grey;
padding: 2px 0 2px 8px;
font-size: 12px;
2018-04-17 21:57:02 +01:00
}
#frame div.page select {
2021-04-28 00:50:36 +01:00
display: block;
width: 180px;
box-sizing: border-box;
padding-top: 2px;
margin: 2px 0 4px 8px;
2018-04-17 21:57:02 +01:00
}
#frame div.page select:empty {
2021-04-28 00:50:36 +01:00
background-color: #888888;
2018-04-17 21:57:02 +01:00
}
#frame div.page button {
2021-04-28 00:50:36 +01:00
display: block;
width: 180px;
box-sizing: border-box;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 8px;
border: none;
border-bottom: 4px solid #1ab4e5;
color: #dddddd;
background-color: black;
padding-bottom: 4px;
box-shadow: 1px 1px 8px 0px #888888;
outline: none;
2018-04-17 21:57:02 +01:00
}
#frame div.page button:hover {
2021-04-28 00:50:36 +01:00
color: white;
2018-04-17 21:57:02 +01:00
}
#frame div.page button:active {
2021-04-28 00:50:36 +01:00
color: #dddddd;
border-bottom: 4px solid #0c536a;
box-shadow: none;
box-shadow: inset 1px 1px 8px 0px #888888;
2018-04-17 21:57:02 +01:00
}
#frame div.page input[type="text"] {
2021-04-28 00:50:36 +01:00
display: block;
width: 180px;
box-sizing: border-box;
margin-top: 2px;
margin-left: 8px;
2018-04-17 21:57:02 +01:00
}
#frame div.page input[type="checkbox"] {
2021-04-28 00:50:36 +01:00
position: absolute;
right: 0px;
2018-04-17 21:57:02 +01:00
}
#frame div.page input[type="range"] {
2021-04-28 00:50:36 +01:00
display: block;
width: 180px;
margin-left: 8px;
2018-04-17 21:57:02 +01:00
}
#frame dt, #frame dd {
2021-04-28 00:50:36 +01:00
font-size: 12px;
2018-04-17 21:57:02 +01:00
}
#frame dt {
2021-04-28 00:50:36 +01:00
clear: both;
float: left;
padding-left: 16px;
2018-04-17 21:57:02 +01:00
}
#frame dd {
2021-04-28 00:50:36 +01:00
margin-left: 40px;
2018-04-17 21:57:02 +01:00
}
#frame p {
2021-04-28 00:50:36 +01:00
font-size: 12px;
line-height: 18px;
2018-04-17 21:57:02 +01:00
}
div.station-info {
2021-04-28 00:50:36 +01:00
position: absolute;
border: 1px solid white;
background-color: #222222;
color: white;
padding: 4px;
z-index: 200;
2018-04-17 21:57:02 +01:00
}
.overlay-branding {
2021-04-28 00:50:36 +01:00
color: white;
margin: 4px;
position: absolute;
right: 0;
top: 0;
2018-04-17 21:57:02 +01:00
}
div#scene {
2021-04-28 00:50:36 +01:00
width: 100%;
height: 90%; }
2018-04-17 21:57:02 +01:00
< / style >
2019-12-08 10:53:43 +00:00
< script type = "text/javascript" src = "/javascript/CaveView/js/CaveView.js" > < / script >
< script type = "text/javascript" src = "/javascript/CaveView/lib/proj4.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
CV.UI.init( 'scene', {
home: '/javascript/CaveView/',
surveyDirectory: '/expowebcache/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
2021-04-28 00:50:36 +01:00
CV.UI.loadCave('{{svx3d}}.3d');
}
2021-11-06 21:57:51 +00:00
// comment out loading CaveView until we have fixed everything
// 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?? -->
2011-07-11 02:10:22 +01:00
{% if cave.kataster_number %}
{{ cave.kataster_number|safe }}
{% if cave.entrancelist %}
- {{ cave.entrancelist|safe }}
{% 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 %}
< br / > {{ cave_id|safe }}
2011-07-11 02:10:22 +01:00
{% endif %}
< / th >
< th id = "name" >
{{ cave.official_name|safe }}
< / th >
< th id = "status" >
{{ cave.kataster_code|safe }}
< / th >
< / tr >
< / table >
{% block related %}
{% endblock %}{% endblock %}
2021-04-03 20:52:35 +01:00
< 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 >
2021-11-06 21:57:51 +00:00
< 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). See < a href = "/handbook/computing/todo.html" > /handbook/computing/todo.html< / a > .
2021-04-28 00:50:36 +01:00
< a href = "/survexfile" > All survex files< / a >
2021-04-03 20:52:35 +01:00
< a href = "{% if cave.kataster_number %}{% url " cave3d " cave . kataster_number % } { % else % } { % url " cave3d " cave . unofficial_number % } { % endif % } " > 3d file download< / a >
< a href = "{% url " svx " svxstem % } " > This survex file< / a >
< div id = 'scene' > < / div >
{% endif %}
{% if cave.notes %}
< h2 > Notes< / h2 >
{{ cave.notes|safe }}
{% endif %}< / p >
< / 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 >
< ul >
{% for ent in cave.entrances %}
< li >
{{ ent.entrance_letter|safe }}
{% if ent.entrance.name %}
{{ ent.entrance.name|safe }}
2018-04-11 22:02:57 +01:00
{% endif %}< a href = "{% url " editentrance " cave . slug ent . entrance . slug % } " > Edit< / 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 %}
{% 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 }}
2021-04-28 00:50:36 +01:00
{% 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 >
2016-07-02 23:42:47 +01:00
{% endif %}
< / dl >
< / li >
{% endfor %}
< / ul >
2011-07-11 02:10:22 +01:00
2016-07-02 23:42:47 +01:00
{% endif %}< / p >
2018-04-11 22:02:57 +01:00
< a href = "{% url " newentrance " cave . slug % } " > New Entrance< / a >
2011-07-11 02:10:22 +01:00
< / div >
2016-07-02 23:42:47 +01:00
{% endblock content %}