{% extends 'changelog/master.twig' %} {% from 'macros.twig' import pagination, container_title %} {% from 'changelog/macros.twig' import changelog_listing %} {% from '_layout/comments.twig' import comments_section %} {% set is_valid = changes|length > 0 %} {% set is_date = changelog_date|length > 0 %} {% set title = 'Changelog' %} {% if is_valid %} {% set canonical_url = url_construct('/changelog.php', { 'd': changelog_date, 'u': changelog_user ? changelog_user : '', 'o': changelog_offset }) %} {% if is_date or changelog_user %} {% set title = title ~ ' ยป' ~ (changelog_date ? ' ' ~ changes[0].change_date : '') ~ (changelog_user ? ' by ' ~ changes[0].username : '') %} {% endif %} {% endif %} {% block content %}
{{ container_title(title) }}
{{ changelog_listing(changes, is_date) }} {% if not is_date %}
{{ pagination(changelog_count, changelog_take, changelog_offset, url_construct('/changelog.php', { 'd': changelog_date, 'u': changelog_user ? changelog_user : '' })) }}
{% endif %}
{% if comments is defined %}
{{ container_title('Comments') }} {{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }}
{% endif %} {% endblock %}