2016-02-01 16:35:55 +00:00
|
|
|
{% extends "core/page.jinja" %}
|
2015-11-25 13:45:18 +00:00
|
|
|
|
2016-01-08 16:11:38 +00:00
|
|
|
{% block head %}
|
2016-02-01 16:35:55 +00:00
|
|
|
{{ super() }}
|
2016-01-11 08:56:42 +00:00
|
|
|
<script>
|
|
|
|
function make_preview() {
|
|
|
|
$.ajax({
|
2016-08-10 03:48:06 +00:00
|
|
|
url: "{{ url('api:api_markdown') }}",
|
2016-01-11 08:56:42 +00:00
|
|
|
method: "GET",
|
|
|
|
data: { text: $("#id_content").val() }
|
|
|
|
}).done(function (msg) {
|
|
|
|
$("#preview").html(msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
2016-01-08 16:11:38 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2015-11-25 13:45:18 +00:00
|
|
|
{% block page %}
|
2016-07-19 17:03:16 +00:00
|
|
|
<h2>{% trans %}Edit page{% endtrans %}</h2>
|
|
|
|
<form action="{{ url('core:page_edit', page_name=page.get_full_name()) }}" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ form.as_p() }}
|
|
|
|
<p><input type="button" value="{% trans %}Preview{% endtrans %}" onclick="javascript:make_preview();" /></p>
|
|
|
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
|
|
|
</form>
|
|
|
|
<div id="preview">
|
|
|
|
</div>
|
2015-11-25 13:45:18 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|