{% extends "cosinnus_poll/base.html" %} {% load i18n static cosinnus_tags widget_tweaks sekizai_tags %} {% block page_title %} {% trans "Vote" context "the_verb" %} {{ block.super }} {% endblock page_title %} {% block breadcrumb %} {{ block.super }}
  • {% blocktrans with title=poll.title %}Vote for {{ title }}{% endblocktrans %}
  • {% endblock %} {% block leftnav %} {% include "cosinnus_poll/leftnav.html" with return_to="poll" %} {% endblock leftnav %} {% block extrahead %} {{ block.super }} {% addtoblock "js" %} {% endaddtoblock %} {% endblock extrahead %} {% block content %}
    {# Infobox for completed or archived polls. #} {% if poll.state == 2 %} {% include 'cosinnus/common/empty_button.html' with message="This poll has been completed. Voting is closed." %} {% elif poll.state == 3 %} {% include 'cosinnus/common/empty_button.html' with message="This is an archived poll." %} {% endif %}
    {% include "cosinnus_poll/single_poll_detailed.html" with poll=poll hide_control_buttons="True" %}
    {% if user|has_write_access:poll %}
    {% captureas delete_modal_id %}deleteModal_{{poll.slug}}{% endcaptureas %} {% captureas label %}{% blocktrans with title=poll.title %}Do you really want to delete poll „{{ title }}“?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Delete poll" %}{% endcaptureas %} {% captureas action %}{% group_url 'cosinnus:poll:delete' group=group slug=poll.slug%}{% endcaptureas %} {% include "cosinnus/modal_box.html" with id=delete_modal_id label=label title=title form_action=action %} {% if not poll.state == 3 %} {% endif %} {% if poll.state == 1 %} {% captureas label %}{% blocktrans with title=poll.title %}Do you really want to complete poll "{{ title }}" with no winning option?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Complete poll without winner" %}{% endcaptureas %} {% captureas action %}{% group_url "cosinnus:poll:complete" group=group slug=poll.slug %}{% endcaptureas %} {% include "cosinnus/modal_box.html" with id="close_poll_no_winner_modal" label=label title=title form_action=action %} {% elif poll.state == 2 %} {% captureas reopen_modal_id %}reopenModal_{{poll.slug}}{% endcaptureas %} {% captureas archive_modal_id %}archiveModal_{{poll.slug}}{% endcaptureas %} {% captureas label %}{% blocktrans with title=poll.title %}Do you really want to re-open poll „{{ title }}“?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Re-open poll" %}{% endcaptureas %} {% captureas action %}{% group_url 'cosinnus:poll:reopen' group=group slug=poll.slug %}{% endcaptureas %} {% include "cosinnus/modal_box.html" with id=reopen_modal_id label=label title=title form_action=action %} {% captureas label %}{% blocktrans with title=poll.title %}Do you really want to archive poll „{{ title }}“?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Archive poll" %}{% endcaptureas %} {% captureas action %}{% group_url 'cosinnus:poll:archive' group=group slug=poll.slug %}{% endcaptureas %} {% include "cosinnus/modal_box.html" with id=archive_modal_id label=label title=title form_action=action %} {% endif %} {% include 'cosinnus/feedback/report_button_btn.html' with object=poll %}
    {% endif %}
    {% if mode == 'vote' %}
    {% csrf_token %} {{ formset.management_form }} {% for form in formset %} {{ form.option.as_widget }} {% endfor %}
    {% endif %} {% if not user|has_write_access:poll %} {% include 'cosinnus/feedback/report_button_btn.html' with object=poll %} {% endif %}
    {% include 'cosinnus_poll/poll_comments.html' with poll=poll full_view="True" no_indent="True" comments_expanded="True" %} {% endblock content %}