{% set can_vote = c.user and c.user != c.user.anonymous() and h.has_access(artifact, 'post')() %} {% set voted = artifact.user_voted(c.user) %}
Vote for this ticket:
{{artifact.votes_up}} up  {{artifact.votes_down}} down {% if can_vote %}
{# csrf protection will be automatically inserted here (_session_id field) #}
{% endif %}