blob: f9d000aa39da53502616613b9354d71af2b7d28b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
<!-- svxfile.html - this text visible because this template has been included -->
{% extends "base.html" %}
{% block title %}{{ survexfile }}{% endblock %}
{% block head %}
<!-- Should we wait until CodeMirror 6.0 is available https://codemirror.net/6/ -->
<!-- <script type="text/javascript" src="{{settings.JSLIB_URL}}jquery-form/jquery.form.min.js"></script> <!-- INVALID-->
<!-- <script type="text/javascript" src="{{settings.JSLIB_URL}}codemirror/codemirror.min.js"></script> <!-- INVALID-->
<!-- Not in use and not needed for simple text editor jquery
<script type="text/javascript">
var codeeditor;
$(document).ready(function()
{
codeeditor = CodeMirror.fromTextArea("id_code",
{
parserfile: ["parsesurvex.js"],
stylesheet: "{{settings.MEDIA_URL}}CodeMirror-0.62/css/survexcolors.css", # INVALID
path: "{{settings.MEDIA_URL}}CodeMirror-0.62/js/", # INVALID
textWrapping: false,
lineNumbers: false,
indentUnit: 4,
tabMode: "spaces"
});
$("#id_outputtype").val("ajax");
var options =
{
target: '#difflistajax',
beforeSubmit: function() { $("textarea#id_code").value = codeeditor.getCode().length; },
success: function() { codeeditor.focus(); }
};
$('#codewikiform').ajaxForm(options); // bind form using 'ajaxForm'
});
</script>
-->
{% endblock %}
{% block content %}
{% if warning %}
<h1 style="color: red">Survex Template - will save as file '{{ survexfile }}.svx'</h1>
{% else %}
<h1>Survex File: {{ survexfile }}</h1>
{% endif %}
{% if svxincludes %}
<p><b>Included files:</b>
{% for svxinclude in svxincludes %}
<a href="{{svxinclude}}.svx">{{svxinclude}}</a>
{% endfor %}
</p>
{% endif %}
<form id="codewikiform" action="" method="POST">{% csrf_token %}
<div class="codeframebit">{{form.code}}</div>
<div>Identified login {{form.identified_login}}</div>
<div>Who are you? {{form.who_are_you}}</div>
<div style="display:none">{{form.filename}} {{form.dirname}} {{form.datetime}} {{form.outputtype}}</div>
<input type="submit" name="diff" value="Differences between edited and saved versions of this file" />
<input type="submit" name="save" value="Save this edited file {{ filename }}.svx"/>
<input type="submit" name="process" value="Run 'cavern' on this svx file" title="executes cavern"/>
</form>
<div id="difflistajax">
<pre>
{% for diffline in difflist %}{{diffline}}
{% endfor %}
</pre>
{% if logmessage %}
{% if has_3d %}
<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" survexfile %}'>.log file</a>
the <a href='{% url "err" survexfile %}'>.err file</a> and fix this .svx file</b></p>
{% endif %}
<!-- <pre>
LOGMESSAGES
{{logmessage}}
</pre>
-->
{% endif %}
</div>
underground survey length: {{svxlength|floatformat:2}} metres<br />
<a href="/{{survexfile.cave.url}}">cave</a> primary survexfile <a href="/survexfile/{{ survexfile.cave.survex_file }}">{{survexfile.cave.survex_file}}</a> <br>
directory primary survexfile <a href="/survexfile/{{survexfile.primary}}.svx">{{survexfile.primary}}</a> <br />
{% for sb in svxblocks %}
block <em>{{sb}}</em> has parent block <em>{{sb.parent}}</em> (in file {{sb.parent.survexfile.path}}.svx)<br />
{% empty %}
Cannot find any <em>dated</em> survex blocks in this survex file (not looking at *include files). <br />
Report this to a nerd if you think this is incorrect.
<hr />
{% endfor %}
<span style="font-family: monospace; font-size: 130%; ">
{% for key, value in events.items %}
{% with trips=value.0 svxothers=value.1 wallets=value.2 blocks=value.3 %}
<details {% if forloop.first %} open{% endif %}>
<summary><b><a href="/expedition/{{key|date:"Y"}}">{{key|date:"Y"}}</a>{{key|date:"-m-d"}}</b> {{blocks}}</summary>
{% include 'onthisdate.html' %}
{% endwith %}
</details>
{% endfor %}
</span>
{% endblock %}
|