mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
fixed url glitch, added parent url
This commit is contained in:
parent
7caf1690c6
commit
435f3cf00b
@ -281,6 +281,11 @@ def svx(request, survex_file):
|
||||
Needs refactoring. Too many piecemeal edits and odd state dependencies.
|
||||
"""
|
||||
warning = False
|
||||
|
||||
print(survex_file)
|
||||
if survex_file.lower().endswith(".svx"):
|
||||
survex_file = survex_file[:-4]
|
||||
print(survex_file)
|
||||
|
||||
# get the basic data from the file given in the URL
|
||||
dirname = os.path.split(survex_file)[0] # replace with proper pathlib function..
|
||||
@ -382,7 +387,7 @@ def svx(request, survex_file):
|
||||
"settings": settings,
|
||||
"warning": warning,
|
||||
"has_3d": has_3d,
|
||||
"title": survex_file,
|
||||
"survexfile": svxfile,
|
||||
"svxlength": svxlength,
|
||||
"svxblocks": svxblocks,
|
||||
"svxincludes": svxincludes,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!-- svxfile.html - this text visible because this template has been included -->
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% block title %}{{ survexfile }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<!-- Should we wait until CodeMirror 6.0 is available https://codemirror.net/6/ -->
|
||||
@ -38,9 +38,9 @@ $(document).ready(function()
|
||||
|
||||
{% block content %}
|
||||
{% if warning %}
|
||||
<h1 style="color: red">Survex Template - will save as file '{{ title }}.svx'</h1>
|
||||
<h1 style="color: red">Survex Template - will save as file '{{ survexfile }}.svx'</h1>
|
||||
{% else %}
|
||||
<h1>Survex File: {{ title }}</h1>
|
||||
<h1>Survex File: {{ survexfile }}</h1>
|
||||
{% endif %}
|
||||
|
||||
{% if svxincludes %}
|
||||
@ -68,10 +68,10 @@ $(document).ready(function()
|
||||
|
||||
{% if logmessage %}
|
||||
{% if has_3d %}
|
||||
<p>Click here to view the <a href='{% url "threed" title %}'>3d file</a> produced as output</p>
|
||||
<p>Click here to view the <a href='{% url "threed" survexfile %}'>3d file</a> produced as output</p>
|
||||
{% else %}
|
||||
<p><b>No 3d file generated. There was an ERROR<br>Read the full <a href='{% url "svxlog" title %}'>.log file</a>
|
||||
the <a href='{% url "err" title %}'>.err file</a> and fix this .svx file</b></p>
|
||||
<p><b>No 3d file generated. There was an ERROR<br>Read the full <a href='{% url "svxlog" survexfile %}'>.log file</a>
|
||||
the <a href='{% url "err" survexfile %}'>.err file</a> and fix this .svx file</b></p>
|
||||
{% endif %}
|
||||
<!-- <pre>
|
||||
LOGMESSAGES
|
||||
@ -81,7 +81,7 @@ LOGMESSAGES
|
||||
{% endif %}
|
||||
</div>
|
||||
underground survey length: {{svxlength|floatformat:2}} metres<br />
|
||||
|
||||
parent survex file <a href="/survexfile/{{ survexfile.cave.survex_file }}">{{survexfile.cave.survex_file}}</a> for this cave <br />
|
||||
{% for sb in svxblocks %}
|
||||
block:({{sb}}) has parent block:<a href="{{sb.parent.path}}">({{sb.parent}})</a>
|
||||
{% empty %}
|
||||
|
Loading…
Reference in New Issue
Block a user