mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 00:31:55 +00:00
86 lines
2.8 KiB
HTML
86 lines
2.8 KiB
HTML
<!-- svxfile.html - this text visible because this template has been included -->
|
|
{% extends "base.html" %}
|
|
{% block title %}{{ title }}{% 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 '{{ title }}.svx'</h1>
|
|
{% else %}
|
|
<h1>Survex File: {{ title }}</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 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"/>
|
|
</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" title %}'>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>
|
|
{% endif %}
|
|
<!-- <pre>
|
|
LOGMESSAGES
|
|
{{logmessage}}
|
|
</pre>
|
|
-->
|
|
{% endif %}
|
|
</div>
|
|
|
|
|
|
{% endblock %}
|