50 lines
1.2 KiB
HTML
50 lines
1.2 KiB
HTML
{% extends "forum_base.html" %}
|
|
{% block extrahead %}
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
var oldText = "";
|
|
function preview() {
|
|
if ($('#forum-preview').is(':hidden')) {
|
|
$('#forum-preview').show("blind");
|
|
}
|
|
var newText = $('#id_body').val();
|
|
if (newText != oldText)
|
|
$('#forum-preview').load("{% url forums.views.preview %}", {'body': newText});
|
|
oldText = newText;
|
|
setTimeout(preview, 500);
|
|
}
|
|
preview();
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{%block content%}
|
|
{% if parent %}
|
|
<div class="item">
|
|
<h2>Replying to:</h2>
|
|
{% include 'forums/_reply.html' with post=parent%}
|
|
</div>
|
|
{% endif %}
|
|
<div class="item">
|
|
{% block form %}
|
|
<form method="POST" action="{%url forums.views.reply parent.id %}">
|
|
{% csrf_token %}
|
|
{{form.as_p}}
|
|
<input type="submit" value="Submit"/>
|
|
</form>
|
|
{% endblock %}
|
|
</div>
|
|
<div class="item" id="forum-preview">
|
|
</div>
|
|
{%endblock%}
|
|
|
|
{%block breadcrumb %}
|
|
Home
|
|
{%for f in post.topic.forum.get_ancestors%}
|
|
> <a href="{{f.get_absolute_url}}">{{f}}</a>
|
|
{%endfor%}
|
|
> <a href="{{post.topic.forum.get_absolute_url}}">{{post.topic.forum}}</a>
|
|
> <a href="{{post.topic.get_absolute_url}}">{{post.topic}}</a>
|
|
> Reply
|
|
{%endblock%}
|