{# previous part #}
{% if pagination.current_page - 1 != 0 %}
←
{% else %}
←
{% endif %}
{% for page in pagination.pages %}
{% if page == pagination.current_page %}
{{page}}
{% elseif page == '...' %}
{{page}}
{% else %}
{{ page }}
{% endif %}
{% endfor %}
{# next part #}
{% if pagination.current_page == pagination.pages|last %}
→
{% else %}
→
{% endif %}
{% endif %}
{% endblock %}
{% block search %}
{# order is important #}
{%
set searchable_objects, name, value = [
{ 'name': 'category', 'value': _category.id },
{ 'name': 'board', 'value': board.id },
{ 'name': 'thread', 'value': thread.id }
], null, null
%}
{% for item in searchable_objects if item.value %}
{% set name, value = item.name, item.value %}
{% endfor %}
{% endblock %}
{% block breadcrumbs %}
{% if tail or category is defined %}
{{ translate ( 'home' ) }}
{% if category is defined %}{% block separator %} » {% endblock %}{% if board is defined or tail %}{{ category.title }}{% else %}{{ category.title }}{% endif %}{% endif %}
{% if board is defined %}{{ block('separator') }}{% if thread is defined or tail %}{{ board.title }}{% else %}{{ board.title }}{% endif %}{% endif %}
{% if thread is defined and tail %}{{ block('separator') }}{{ thread.title }}{% elseif thread is defined %}{{ block('separator') }}{{ thread.title }}{% endif %}
{% if tail %}{{ block('separator') }}{{tail}}{% endif %}
{% endif %}
{% endblock %}
{% block thread %}
{% set types, type = {
'closed': thread.is_closed,
'pinned': thread.is_pinned,
'unread': not thread.read,
'read' : thread.read, }, null
%}
{% for type_name, type_value in types if type_value %}
{% set type = type ~ '-' ~ type_name %}
{% endfor %}