Files
caminus/templates/forums/reply.html
2012-08-29 22:50:42 -04:00

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%}
&gt; <a href="{{f.get_absolute_url}}">{{f}}</a>
{%endfor%}
&gt; <a href="{{post.topic.forum.get_absolute_url}}">{{post.topic.forum}}</a>
&gt; <a href="{{post.topic.get_absolute_url}}">{{post.topic}}</a>
&gt; Reply
{%endblock%}