{% extends "base.html" %}
{% load i18n %}
{% load comments_xtd %}

{% block menu-class-comments %}active{% endblock %}

{% block content %}
<h3 class="text-center">{% trans "List of comments" %}</h3>
<hr/>

<div class="row">
  <div class="col-lg-offset-2 col-md-offset-2 col-lg-8 col-md-8">  
    <ul class="media-list" id="comment-list">
      {% for comment in object_list %}
      {% include "django_comments_xtd/comment.html" %}
      {% empty %}
      <p class="text-center">No comments yet.</p>
      {% endfor %}
    </ul>

    <!-- pagination -->
    <div class="text-center">
      <ul class="pagination">
        <li class={% if not page_obj.has_previous %}"disabled"{% endif %}>
          <a href="{{ url }}?page={% if page_obj.has_previous %}{{ page_obj.previous_page_number }}{% endif %}">&laquo;</a>
        </li>
        {% for page_number in page_range %}
        <li class={% if page_number == page_obj.number %}"active"{% endif %}>
          <a href="{{ url }}?page={{ page_number }}">{{ page_number }}</a>
        </li>
        {% endfor %}
        <li class={% if not page_obj.has_next %}"disabled"{% endif %}>
          <a href="{{ url }}?page={% if page_obj.has_next %}{{ page_obj.next_page_number }}{% endif %}">&raquo;</a>
        </li>
      </ul>
    </div><!-- pagination -->
    
  </div>
</div>
{% endblock %}
