{% load humanize %}

<a id="comments"></a>
{% if obj.comments.live.count > 0 %}
	<hr />
	<h2>{{ obj.comments.live.count|apnumber|capfirst }} comment{{ obj.comments.live.count|pluralize }}</h2>
	
	{% for comment in obj.comments.live %}
		{% include 'socialcomments/comment.inc.html' %}
		{% if not forloop.last %}<hr />{% endif %}
	{% endfor %}
	
	{% if comment_form %}
		<hr />
		<a id="comment-form"></a>
		<h3>Post a comment</h3>
	{% endif %}
{% elif comment_form %}
	<hr />
	<a id="comment-form"></a>
	<h3>Post a comment</h3>
{% elif 'comment-sent' in request.GET %}
	<p>Thanks for your comment!</p>
{% endif %}

{% if comment_form %}
	{% include 'socialcomments/form.inc.html' with obj=obj %}
{% endif %}