{% extends "layout.html" %} {% macro diff_table(diff, level=0) %}
{{- diff.before() -}} {{- diff.after() -}} {%- if diff.children is defined %} {%- for di in diff.children %} {{- diff_table(di, level+1) }} {%- endfor %} {%- endif -%} {% endmacro %} {% block content %}
Автор
{%- for user in log.users %}{{- user.name or user.login }}{% if not loop.last %}, {% endif %}{% endfor -%}
Тип
{{ log_type|capitalize }}
Дата и время
{% set d1 = log.creation_time.strftime("%d.%m.%Y %H:%M:%S") %} {% set d2 = log.update_time.strftime("%d.%m.%Y %H:%M:%S") %} {% if d1 == d2 %}{{ d1 }} {% else %}{{ d1 }} – {{ d2 }}{% endif %}
{%- for diff in diffs %} {{- diff_table(diff) }} {%- endfor -%}
{% endblock %}