{% macro render_file(post_item) %} {% if post_item.has_file %}
{% endif %} {% endmacro %} {% macro render(post_item, thread, snippet=False, link_refno=False, board_info=False, with_divider=False, checkbox=False, file_position='bottom', is_locked=False, is_sticky=False) %} {# NOTE: keep this in line with the javascript post html builder #}
{% if post_item.subject %} {{ post_item.subject }}
{% endif %} #{{ post_item.refno }} {{ post_item.name|post_name }} {% if post_item.mod_code %} {{ post_item.mod_code }} {% endif %} {{ post_item.date|post_time }} {% if is_locked %}[locked] {% endif %} {% if is_sticky %}[sticky]{% endif %} {% if checkbox %} {% endif %} {% if post_item.has_file %}
File: {{ post_item.file_name }} {{ '(' ~ post_item.file_size|filesizeformat ~ ', ' ~ post_item.file_width ~ 'x' ~ post_item.file_height ~ ')' }} {% endif %}
{% if file_position == 'top' %} {{ render_file(post_item) }} {% endif %} {% if post_item.html or post_item.text %}
{# Render both the cached version and the model #} {% if post_item.html %} {{ post_item.html|safe }} {% else %} {{ post_item.text|post_text }} {% endif %}
{% endif %} {% if file_position == 'bottom' %} {{ render_file(post_item) }} {% endif %} {% if board_info %}
{% if thread.omitted_count > 0 %} {{ thread.omitted_count ~ ' ' ~ thread.omitted_count|pluralize('reply', 'replies') }} omitted {% endif %} [View thread]
{% endif %}
{% endmacro %}