2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-27 01:31:57 +00:00
troggle/templates/svxfile.html

78 lines
2.2 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% load survex_markup %}
{% block title %}{{ title }}{% endblock %}
2009-06-09 18:59:54 +01:00
{% block head %}
<script src="{{ settings.MEDIA_URL }}js/base.js" type="text/javascript"></script>
<script type="text/javascript" src="{{settings.MEDIA_URL}}js/jquery.form.js"></script>
<script type="text/javascript" src="{{settings.MEDIA_URL}}CodeMirror-0.62/js/codemirror.js"></script>
<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",
path: "{{settings.MEDIA_URL}}CodeMirror-0.62/js/",
textWrapping: false,
lineNumbers: true,
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 %}
2009-06-09 18:59:54 +01:00
<h1>Survex File: {{ title }} .svx</h1>
<form id="codewikiform" action="" method="POST">
2009-07-27 13:42:54 +01:00
<div class="codeframebit">{{form.code}}</div>
2009-06-09 18:59:54 +01:00
<div style="display:none">{{form.filename}} {{form.dirname}} {{form.datetime}} {{form.outputtype}}</div>
<input type="submit" name="diff" value="Diffy" />
<input type="submit" name="save" value="Save"/>
<input type="submit" name="process" value="Process" title="executes cavern"/>
(Not implemented: <input type="submit" name="svncheckin" value="svn check-in"/>)
</form>
<div id="difflistajax">
<pre>
{% for diffline in difflist %}{{diffline}}
{% endfor %}
</pre>
{% if logmessage %}
{% if has_3d %}
2009-07-27 13:42:54 +01:00
<p><a href="{% url threed title %}">3d file</a></p>
2009-06-09 18:59:54 +01:00
{% else %}
<p><b>No 3d file</b></p>
{% endif %}
<pre>
LOGMESSAGES
{{logmessage}}
</pre>
{% endif %}
</div>
{% if svxincludes %}
<p><b>Included files:</b>
{% for svxinclude in svxincludes %}
<a href="{{svxinclude}}.svx">{{svxinclude}}</a>
{% endfor %}
</p>
{% endif %}
{% endblock %}