{% load i18n static cosinnus_tags thumbnail %} {# this expects {{ option }} in its context as parameter #} {# If we are in vote mode, we expect a ``option_formsets_dict`` context variable, which has a mapping of { option_id --> VoteForm } #} {% with form=option_formsets_dict|dict_lookup:option.id vote_counts=options_votes_dict|dict_lookup:option.id %}
{% if poll.show_voters %}
{% for vote in option.sorted_votes_by_choice %} {% include 'cosinnus_poll/poll_vote_avatar.html' with vote=vote %} {% endfor %}
{% endif %} {% if mode == 'vote' and user|has_write_access:poll %} {% captureas label %}{% blocktrans with description=option.description %}Do you really want to complete the poll and select "{{ description }}" as winner?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Complete poll" %}{% endcaptureas %} {% captureas action %}{% group_url "cosinnus:poll:complete" group=group slug=poll.slug option_id=option.pk %}{% endcaptureas %} {% include "cosinnus/modal_box.html" with id=close_poll_modal label=label title=title form_action=action %} {% endif %} {% endwith %}
{% comment %} Disabled items {% if option_counter %} {% endif %} {% if option.image %}
{% endif %} {% endcomment %}