{% load spirit_tags i18n %}

{# title #}
{# #number description #}
{# name, min, max, mode, close_at #}

<div class="comment__text__poll">
  {% if poll.title %}
    <div class="comment__text__poll__title">
      {{ poll.title|safe }}
    </div>
  {% endif %}

  <div class="comment__text__poll__choices">
    <ul>
      {% for choice in poll.choices %}
        <li class="comment__text__poll__choices__choice">
          <div class="comment__text__poll__choices__choice__description">
            #{{ choice.number }} {{ choice.description|safe }}
          </div>
        </li>
      {% endfor %}
    </ul>
  </div>
  <div class="comment__text__poll__note">
    {% if poll.close_at %}
      {% blocktrans trimmed with poll_name=poll.name choice_min=poll.choice_min choice_max=poll.choice_max mode=poll.mode_txt close_at=poll.close_at %}
        Name: {{ poll_name }}, choice selection: from {{ choice_min }} up to {{ choice_max }}, mode: {{ mode }}, close at: {{ close_at }}
      {% endblocktrans %}
    {% else %}
      {% blocktrans trimmed with poll_name=poll.name choice_min=poll.choice_min choice_max=poll.choice_max mode=poll.mode_txt %}
        Name: {{ poll_name }}, choice selection: from {{ choice_min }} up to {{ choice_max }}, mode: {{ mode }}
      {% endblocktrans %}
    {% endif %}
  </div>
</div>
