{%- if depth %} {% set width = 12 - depth %} {% else %} {% set depth = 0 %} {% set width = 12 %} {% endif -%} {%- if not comment %} {% set comment = item %} {% endif -%} {%- if comment.parent.kind == 'page' %} {% set parent_url = url_for('frontend.page', title=comment.parent.title.lower().replace(' ', '_')) %} {% else -%} {% set parent_url = url_for('frontend.item', id=comment.parent_id) %} {% endif -%} {%- if current_user.is_authenticated() and comment.user_id == current_user.id%} {% set owner = 'true' %} {% endif -%}
{%- include "item/_vote.html" -%} By {% cache 60*60*5, 'user', comment.user.name %}{{comment.user.name}}{% endcache %} {%- if item_page %} (parent) {%- else %} {{comment.timestamp|time_ago}} {%- endif -%} {%- if owner and not edit %} | Edit {% endif -%}
{%- cache 60*5, 'item_text', comment.__str__(), comment.changed -%} {{comment.text|safe|urlize}} {%- endcache -%} {%- if current_user.is_authenticated() and not edit and not filters%} {%- if not item_page and depth < 8 %} reply {%- endif -%} {%- endif -%}