46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
{% extends 'news_base.html' %}
|
|
{% load markup %}
|
|
{% load mptt_tags %}
|
|
{% load minecraft %}
|
|
|
|
{% block title %}News - {{item.title}}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="item news-item" itemscope itemtype="http://schema.org/BlogPosting">
|
|
<h2><a href="{{item.get_absolute_url}}" itemprop="name">{{item.title}}</a></h2>
|
|
<div class="byline">By <span itemprop="author">{{item.author}}</span> <div class="avatar">{% avatar item.author %}</div></div>
|
|
<div class="dateline">On {{item.created}}</div>
|
|
<div class="content" itemprop="articleBody">
|
|
{{item.body|markdown}}
|
|
</div>
|
|
<br style="clear:both"/>
|
|
</div>
|
|
<div class="comments">
|
|
<h3>Comments</h3>
|
|
{% recursetree item.comments %}
|
|
<div class="comment-tree">
|
|
<div class="comment">
|
|
<a name="c{{ node.id }}" href="#c{{node.id}}">#{{node.id}}</a>
|
|
<div class="forum-post-user">
|
|
{%avatar node.author%}
|
|
{{node.author}}
|
|
</div>
|
|
{{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 %}
|