Files
caminus/templates/news/view.html
2012-03-02 10:06:08 -05:00

37 lines
1.0 KiB
HTML

{% extends 'base.html' %}
{% load markup %}
{% load mptt_tags %}
{% block title %}News - {{item.title}}{% endblock %}
{% block content %}
<h2><a href="{{post.get_absolute_url}}">{{post.title}}</a></h2>
<div class="byline">By {{item.author}}</div>
<div class="content">
{{item.body|markdown}}
</div>
<div class="comments">
<h3>Comments</h3>
{% recursetree item.comments %}
<div class="comment-tree">
<a name="c{{ node.id }}" href="#c{{node.id}}">#{{node.id}}</a> by {{node.author}}
<div class="comment">
{{node.body|markdown:"safe"}}
<form action="{% url news.views.comment parent=node.id %}" method="post">
{{ commentForm.as_p }}
{% csrf_token %}
<input type="submit" name="submit" value="Post">
</form>
</div>
{{children}}
</div>
{% endrecursetree %}
<h4>Add a comment</h4>
<form action="{% url news.views.comment id=item.id %}" method="post">
{{ commentForm.as_p }}
{% csrf_token %}
<input type="submit" name="submit" value="Post">
</form>
</div>
{% endblock %}