troggle-unchained/templates/svxfile.html

105 lines
3.9 KiB
HTML
Raw Permalink Normal View History

<!-- svxfile.html - this text visible because this template has been included -->
2011-07-11 02:10:22 +01:00
{% extends "base.html" %}
2023-03-21 14:29:15 +00:00
{% block title %}{{ survexfile }}{% endblock %}
2011-07-11 02:10:22 +01:00
{% 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-->
2011-07-11 02:10:22 +01:00
<!-- Not in use and not needed for simple text editor jquery
2011-07-11 02:10:22 +01:00
<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
2011-07-11 02:10:22 +01:00
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>
-->
2011-07-11 02:10:22 +01:00
{% endblock %}
{% block content %}
{% if warning %}
2023-03-21 14:29:15 +00:00
<h1 style="color: red">Survex Template - will save as file '{{ survexfile }}.svx'</h1>
{% else %}
2023-03-21 14:29:15 +00:00
<h1>Survex File: {{ survexfile }}</h1>
{% endif %}
2011-07-11 02:10:22 +01:00
{% if svxincludes %}
<p><b>Included files:</b>
{% for svxinclude in svxincludes %}
<a href="{{svxinclude}}.svx">{{svxinclude}}</a>
{% endfor %}
2011-07-11 02:10:22 +01:00
</p>
{% endif %}
2021-03-26 21:20:08 +00:00
<form id="codewikiform" action="" method="POST">{% csrf_token %}
2011-07-11 02:10:22 +01:00
<div class="codeframebit">{{form.code}}</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 svx file"/>
<input type="submit" name="process" value="Run 'cavern' on this svx file" title="executes cavern"/>
2011-07-11 02:10:22 +01:00
</form>
<div id="difflistajax">
<pre>
{% for diffline in difflist %}{{diffline}}
{% endfor %}
</pre>
{% if logmessage %}
{% if has_3d %}
2023-03-21 14:29:15 +00:00
<p>Click here to view the <a href='{% url "threed" survexfile %}'>3d file</a> produced as output</p>
{% else %}
2023-03-21 14:29:15 +00:00
<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 %}
2022-03-11 16:22:37 +00:00
<!-- <pre>
LOGMESSAGES
{{logmessage}}
</pre>
2022-03-11 16:22:37 +00:00
-->
2011-07-11 02:10:22 +01:00
{% endif %}
</div>
2023-03-14 02:12:28 +00:00
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>
survex directory <a href="/survexfile/{{survexfile.survexdirectory.primarysurvexfile}}">{{survexfile.survexdirectory}}</a> <br />
{% for sb in svxblocks %}
block <em>{{sb}}</em> has parent block <em>{{sb.parent}}</em><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 %}
2023-03-14 02:12:28 +00:00
<span style="font-family: monospace; font-size: 130%; ">
{% for key, value in events.items %}
2023-02-28 16:18:13 +00:00
{% 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>
2011-07-11 02:10:22 +01:00
{% endblock %}