{% extends "dictionary/base.html" %}
{% load filters functions i18n %}
{% block title %}{% print_topic_title %}{% endblock %}
{# Remove has-entries for permalinks to show full content right away #}
{% block bodyclass %}{% if not entry_permalink %} has-entries{% endif %}{% endblock %}
{% block bodyattr %}{% if user.is_authenticated and user.pinned_entry_id %} data-pin="{{ user.pinned_entry_id }}"{% endif %}{% endblock %}
{% block description %}{{ first_entry.content|truncatechars:150 }}{% endblock %}
{% block metatags %}
{% with desc=first_entry.content|truncatechars:150 %}
{% endwith %}
{% endblock %}
{% block content %}
{% with valid=topic.valid populated=topic.has_entries banned=topic.is_banned %}
{% if mode == "novices" %}
{% trans "there has been no entries written by novices today." %}
{% elif mode == "regular" %}
{% trans "this topic has no entries written by authors." %}
{% else %}
{% trans "no suitable entries were found with the criteria you specified." %}
{% endif %}
{% trans "no such thing known to humankind." %} {% trans "no such thing known to humankind." %} {% trans "curses to such a topic anyway." %}{{ topic.title }}
{% if mode == "search" %}[{% trans "search keywords" %}: {{ request.GET.keywords.strip }}]
{% elif mode == "links" %}[{% trans "links" %}]
{% elif mode == "history" %}[{% trans "today in history" %}: {{ request.GET.year.strip }}]
{% elif mode == "novices" %}[{% trans "novices" %}]
{% elif mode == "following" %}[{% trans "activity" %}]
{% elif mode == "recent" %}[{% trans "followups" %}]
{% elif mode == "acquaintances" %}[{% trans "acquaintances" %}]
{% elif mode == "answered" %}[{% trans "with replies" %}]
{% elif mode == "images" %}[{% trans "images" %}]{% endif %}
{% for mirror in mirrors %}
{% if entry_permalink %}
{% for entry in entries %}
{% include "dictionary/includes/entry.html" with permalink="yes" show_comments=topic.is_ama %}
{% endfor %}
{% else %}
{% if page_obj.paginator.count %}
{% for entry in entries %}
{% if mode == "search" %}
{% include "dictionary/includes/entry.html" with show_comments=topic.is_ama wordstomark=request.GET.keywords.strip %}
{% else %}
{% include "dictionary/includes/entry.html" with show_comments=topic.is_ama %}
{% endif %}
{% endfor %}
{% else %}
{# topic has entries but parameters returned no corresponding entries #}
{# end of list of entries #}
{# subsequent entries button #}
{% if subsequent_entries_count > 0 %}
{% blocktrans asvar subsq count subsequent_count=subsequent_entries_count %}{{ subsequent_count }} more entry{% plural %}{{ subsequent_count }} more entries{% endblocktrans %}
{{ subsq }}
{% endif %}
{# end of subsequent entries button #}
{% else %}
{# Topic does exist but has no entries #}
{{ topic.title }}