{% extends "zinnia:zinnia/sitemap.html" %}
{% load i18n zinnia mptt_tags %}

{% block content %}
<h1>{% trans "Sitemap" %}</h1>

<div class="entriesbycategories">
  <h2>{% trans "Entries per categories" %}</h2>
  {% for category in categories %}
  <h3>{{ category }}</h3>
  <ul class="list-group">
    {% for entry in category.entries_published.all %}
    <li class="list-group-item">
      <a href="{{ entry.get_absolute_url }}" title="{{ entry.title }}" rel="bookmark">{{ entry.title }}</a>
      {% with comment_count=entry.comments.count %}
      <span class="badge">
        {{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }}
      </span>
      {% endwith %}
    </li>
    {% empty %}
    <li class="list-group-item">
      {% trans "No entries yet." %}
    </li>
    {% endfor %}
  </ul>
  {% endfor %}
</div>

<div class="montharchives">
  <h2>{% trans "Monthly archives" %}</h2>
  {% get_archives_entries %}
</div>
{% endblock content %}
