{% extends "share_links/base.html" %}
{% load share_links_templatetags markdownify i18n humanize %}

{% block title %}{{ collection.name }} : {{ request.site.name }}{% endblock title %}

{% block content %}
  <article>
    <h2>{{ collection.name }}</h2>
    <p class="opacity" title="{{ collection.date_added }}">
      {{ collection.date_added|naturaltime }}</span> &mdash;
    <i>
      {{ collection.collectionlink_set.all|length }} {% translate "link" %}{{ collection.collectionlink_set.all|length|pluralize }}
      {% if collection.added_by %}
        &mdash; {% translate "Added by" %} <a href="/{{ LANGUAGE_CODE }}/?sort=author&author={{ collection.added_by.username }}">{{ collection.added_by.username }}</a>
      {% endif %}
    </i>
  </p>
  {% if collection.description %}
    <p>
      {{ collection.description|markdownify }}
    </p>
  {% endif %}
  </article>
  {% for collectionlink in collection.collectionlink_set.all %}
    {% include "share_links/partials/collectionlink.html" with link=collectionlink.link description=collectionlink.description %}
  {% empty %}
    <article>{% translate "No link in this collection!" %}</article>
  {% endfor %}
{% endblock %}


{% include "share_links/partials/pagination.html" %}
