{% extends "blognajd/base.html" %}
{% load comments %}
{% load comments_xtd %}
{% load inlines %}

{% block meta-description %}
{{ form.target_object.abstract_markup|render_inlines|striptags }}
{% endblock %}

{% block title %}{{ block.super }}&nbsp;&raquo;&nbsp;comment preview{% endblock %}

{% block nav-sitename %}<a href="{% url 'index' %}">{{ usersettings.site_short_name }}</a>{% endblock %}

{% block class-nav-blog %}active{% endblock %}

{% block jumbotron %}
{% get_comment_count for form.target_object as comment_count %}
<div class="jumbotron story">
  <h4>comment preview for</h4>
  <h3><a href="{{ form.target_object.get_absolute_url }}">{{ form.target_object.title }}</a></h3>
</div>
{% endblock %}

{% block body %}
<div id="comments">
  {% if comment %}
  <div class="row">
    <div class="col-lg-offset-1 col-md-offset-1 col-lg-10 col-md-10">
      <div class="panel panel-default">
	<div class="panel-heading">Preview:</div>
	<div class="panel-body">
	  {{ comment|render_markup_comment }}
	</div>
      </div>
    </div>
  </div>
  {% endif %}

  <div class="row">
    <div class="col-lg-12 col-md-12">
      <div class="well well-lg">
	{% include "comments/blognajd/form.html" %}
      </div>
    </div>
  </div>
</div>
{% endblock %}
