{% set can_vote = c.user and c.user != c.user.anonymous() and h.has_access(artifact, 'post')() %} {% set voted = artifact.user_voted(c.user) %}
{{ artifact.votes_up }} up votes | {{ artifact.votes_down }} down votes | {{ artifact.votes_up_percent }}%
{% trans num_comments = artifact.discussion_thread.num_replies %} {{ num_comments }} comment {% pluralize %}{{ num_comments}} comments {% endtrans %}
{% if can_vote %}
{# csrf protection will be automatically inserted here (_session_id field) #}
{% endif %}