{% extends admin.getTemplate('base_list_field') %} {% block field %} {% spaceless %} {% set positiveVotes = 0 %} {% set negativeVotes = 0 %} {% if object.status in [0, '-1'] %} {% set lastContrib = object.getCurrContribution() %} {% if lastContrib and not lastContrib.isResolved %} {% for key, vote in lastContrib.votes %} {% if vote.value < 0 %} {% set negativeVotes = negativeVotes + 1 %} {% else %} {% set positiveVotes = positiveVotes + 1 %} {% endif %} {% endfor %} {% if negativeVotes > 0 %} {{ negativeVotes }} {% endif %} {% if positiveVotes > 0 %} {{ positiveVotes }} {% endif %} {% endif %} {% endif %} {% endspaceless %} {% endblock %}