{% macro render_reply(r, thread, current_user) -%} {% from "macros/reviews.html" import render_review_vote %}
  • {{ r.author.display_name }} {% if r.author.username != r.author.display_name %} ({{ r.author.username }}) {% endif %} {% if r.author in thread.package.maintainers %} {{ _("Maintainer") }} {% endif %} {% if r.author.rank == r.author.rank.BOT %} {{ r.author.rank.getTitle() }} {% endif %} {{ r.created_at | datetime }}
    {% if r.checkPerm(current_user, "DELETE_REPLY") %} {% endif %} {% if current_user != r.author %} {% endif %} {% if current_user == thread.author and thread.review and thread.replies[0] == r %} {% elif r.checkPerm(current_user, "EDIT_REPLY") %} {% endif %} {{ r.comment | markdown }} {% if thread.replies[0] == r and thread.review %} {{ render_review_vote(thread.review, current_user, thread.getViewURL()) }} {% endif %}
  • {% endmacro %} {% macro render_status_update(r, thread, current_user) -%}
  • {{ r.author.display_name }}
    {{ r.comment | markdown }}
    {{ r.created_at | datetime }}
  • {% endmacro %} {% macro render_thread(thread, current_user, form=None) -%} {% if thread.locked %}

    {{ _("This thread has been locked by a moderator.") }}

    {% endif %} {% if current_user.is_authenticated %}
    {{ current_user.display_name }}
    {% if not current_user.canCommentRL() %}

    {% elif not thread.checkPerm(current_user, "COMMENT_THREAD") %}
    {% if thread.locked %}
    {% else %}
    {% endif %}
    {% elif form %} {% from "macros/forms.html" import render_field, render_submit_field %}
    {{ form.hidden_tag() }} {{ render_field(form.comment, fieldclass="form-control markdown", label="") }} {{ render_submit_field(form.submit) }}
    {% else %}

    {% endif %}
    {% endif %} {% endmacro %} {% macro render_compact_threadlist(threads) -%} {% for t in threads %} {% if t.private %}🔒 {% endif %} {{ t.title }} by {{ t.author.display_name }} {% else %}

    {{ _("No threads found") }}

    {% endfor %} {% endmacro %} {% macro render_threadlist(threads) -%}
    {{ _("Thread") }} {{ _("Last Reply") }}
    {% for t in threads %} {% set replies = t.replies.count() - 1 %}
    {% if not t.review and t.private %} {% elif not t.review %} {% elif t.review.recommends %} {% else %} {% endif %} {{ t.title }}
    {{ t.author.display_name }} {{ t.created_at | datetime }}
    {% if replies > 0 %} {{ replies }} {% endif %}
    {% if replies > 0 %} {% set latest = t.get_latest_reply() %} {{ latest.author.display_name }}
    {{ latest.created_at | datetime }} {% endif %}
    {% if t.package %}

    {{ t.package.title }}
    {% endif %}
    {% else %}

    {{ _("No threads found") }}

    {% endfor %} {% endmacro %}