{% extends "base.html" %} {% from 'includes/moment.macro.html' import print as print_date with context %} {% from 'group/includes/comments.macro.hrml.html' import comment_js, new_comment with context %} {% block title %}Задание "{{ publication.title }}" (группа {{ group.name }}){% endblock %} {% block head %} {{ super() }} {% include 'includes/moment.js.html' %} {{ comment_js | safe }} {% endblock %} {% block content %}

{{ publication.title }}

{{ print_date(publication.created) }} {% if publication.created != publication.edited %} (изменено: {{ print_date(publication.edited) }}) {% endif %}

{% if is_teacher %}
{% if is_task %} Ответы
{% endif %}
{% else %} {% if is_task %}

{%- if mark is not none -%} {{ mark }} {%- else -%} - {%- endif -%} /{{ max_mark }}

Мой ответ
{% endif %} {% endif %}
{% include 'group/includes/publication_view.html' %}
{% for comment in comments %}

{{ comment.author.name }} ({{ comment.author.login }})

{{ print_date(comment.date) }}

{% if comment.text|length <= 250 %}

{{ comment.text }}

{% else %}

{{ comment.text[:250] }}... читать полностью

{% endif %}
{% endfor %} {{ new_comment(url_for('group.publication.new_comment', group_id=group.id, publication_id=publication.id)) | safe }} {% endblock %}