{% macro breadcrumbs(items=[], current=None) %} {% endmacro %} {% macro nav_item(title, link, match_endpoint=None, matched=None, right=False, noajax=False) -%} {%- if matched == None -%} {%- set matched = match_endpoint != None and request.endpoint != None and (request.endpoint == match_endpoint or match_endpoint.endswith('.') and request.endpoint.startswith(match_endpoint)) -%} {%- endif -%}
  • {{ title }}
  • {%- endmacro %} {% macro form_fields(form) %} {% for field in form %} {% if field.widget.input_type == 'hidden' %}{{ field }}{% else %}
    {{ field }} {% if field.errors %}

    {% for error in field.errors %} {{ error }} {% endfor %}

    {% else %}

    {{ field.description }}

    {% endif %}
    {% endif %}{% endfor %} {% for error in form.non_field_errors %}

    {{ error }}

    {% endfor %} {% endmacro %} {% macro comment_form_content(form, objtype=None, objid=None, parent=None, preview_html=None, reqs=None) %}
    {{ form.csrf_token() }}
    {{ form.text }}
    {% if form.text.errors %} {% for error in form.text.errors %} {{ error }} {% endfor %} {% endif %}
    {% if form.non_field_errors %} {% for message in form.non_field_errors %}
    {{ message }}
    {% endfor %} {% endif %}
    {% if preview_html %}{% include 'includes/comment_preview.html' %}{% endif %}
    {% endmacro %} {% macro comment_html(comment, short=False, with_controls=True, with_vote=True, author_ids=None) %} {%- if comment.deleted and not current_user.is_staff -%}
    Комментарий был отправлен на Луну
    {%- else -%} {% if with_vote and comment.bl.can_vote %}
    {% include 'includes/comment_vote.html' %}
    {% endif %} {% if with_controls and not comment.deleted and comment.bl.can_abuse and current_user.is_authenticated %}
    !
    {% endif %} {% if with_controls %} {% include 'includes/comment_controls.html' %} {% endif %} {%- if comment_spoiler_threshold is not defined -%} {%- set comment_spoiler_threshold = get_comment_threshold() -%} {%- endif -%} {% if comment.bl.can_vote and comment.vote_total <= comment_spoiler_threshold %}
    {%- if not short %}{{ comment.text_as_html|safe }}{% else %}{{ comment.brief_text_as_html|safe }}{% endif -%}
    {% else %}
    {%- if not short %}{{ comment.text_as_html|safe }}{% else %}{{ comment.brief_text_as_html|safe }}{% endif -%}
    {% endif %} {% if comment.deleted -%}
    Комментарий был отправлен на Луну {%- if current_user.is_staff and comment.last_deleted_at %} {{ comment.last_deleted_at|datetimeformat('d MMMM Y, HH:mm') -}} {%- endif -%} {%- if current_user.is_staff and comment.last_deleted_by %} пользователем {{ comment.last_deleted_by.username -}} {%- endif -%}
    {%- endif %}
    {%- if comment.author -%} {% with user=comment.author %} {% include 'includes/userlink.html' %} {% endwith %} {%- else %} {{ comment.author_username or 'Гость' }} {%- endif %} {% if not short %} {% if comment.edits_count > 0 -%} {% endif -%} #{{ comment.local_id }} {%- if comment.parent -%} {%- endif %} {%- if comment.bl.access_for_answer_by(current_user) %} Ответить {%- endif %} {{ caller() if caller else '' }} {% else %} {{ caller() if caller else '' }} # {% endif %}
    {%- endif -%} {% endmacro %} {% macro author_profile_links(author, tab) -%} {%- endmacro %} {% macro paginator(page_obj) -%} {%- endmacro %}