{{ definition.C_BLOCK_H_L }}{% if definition.S_BLOCK_ICON %}
{% if definition.FA_ENABLED %}
	<i class="icon b3p-icon fa {{ definition.FA_ICON }}" style="font-size: {{ definition.FA_SIZE }}px;" aria-hidden="true"></i>
{% else %}
	<img src="{{ definition.IMAGE_SRC }}" width="{{ definition.IMAGE_WIDTH }}" height="{{ definition.IMAGE_HEIGHT }}" alt="" />
{% endif %}
{% endif %}{{ definition.TITLE }}{{ definition.C_BLOCK_H_R }}
	{% if S_HAS_B3P_POLL %}
		<div id="viewpoll" class="panel bg1 portal-no-margin">
			<div class="inner">
				{% for poll in loops.poll %}
					{% if not poll.S_FIRST_ROW %}<hr class="dashed" />{% endif %}
					{% if poll.S_CAN_VOTE %}<form method="post" action="{{ poll.S_POLL_ACTION }}">{% endif %}
						<div class="content">
							<h2>{{ poll.POLL_QUESTION }}</h2>
							<p class="author">{{ poll.L_POLL_LENGTH }}{% if poll.S_CAN_VOTE and poll.L_POLL_LENGTH %}<br />{% endif %}{% if poll.S_CAN_VOTE %}{{ poll.L_MAX_VOTES }}{% endif %}</p>

							<fieldset class="polls">
								{% if poll.S_POLL_HAS_OPTIONS %}
								{% for poll_option in poll.poll_option %}
									<dl class="{% if poll_option.POLL_OPTION_VOTED %}voted{% endif %} portal-responsive-poll"{% if poll_option.POLL_OPTION_VOTED %} title="{{ lang('POLL_VOTED_OPTION') }}"{% endif %}>
										<dt>{% if poll.S_CAN_VOTE %}<label for="poll_{{ poll.TOPIC_ID }}_vote_{{ poll_option.POLL_OPTION_ID }}">{{ poll_option.POLL_OPTION_CAPTION }}</label>{% else %}{{ poll_option.POLL_OPTION_CAPTION }}{% endif %}</dt>
										{% if poll.S_CAN_VOTE %}<dd>{% if poll.S_IS_MULTI_CHOICE %}<input type="checkbox" name="vote_id[]" id="poll_{{ poll.TOPIC_ID }}_vote_{{ poll_option.POLL_OPTION_ID }}" value="{{ poll_option.POLL_OPTION_ID }}"{% if poll_option.POLL_OPTION_VOTED %} checked="checked"{% endif %} />{% else %}<input type="radio" name="vote_id[]" id="poll_{{ poll.TOPIC_ID }}_vote_{{ poll_option.POLL_OPTION_ID }}" value="{{ poll_option.POLL_OPTION_ID }}"{% if poll_option.POLL_OPTION_VOTED %} checked="checked"{% endif %} />{% endif %}</dd>{% endif %}
										{% if poll.S_DISPLAY_RESULTS %}<dd class="resultbar"><div class="{% if poll_option.POLL_OPTION_PCT < 20 %}pollbar1{% elseif poll_option.POLL_OPTION_PCT < 40 %}pollbar2{% elseif poll_option.POLL_OPTION_PCT < 60 %}pollbar3{% elseif poll_option.POLL_OPTION_PCT < 80 %}pollbar4{% else %}pollbar5{% endif %}" style="width:{{ poll_option.POLL_OPTION_PERCENT }};">{{ poll_option.POLL_OPTION_RESULT }}</div></dd>
										<dd>{% if poll_option.POLL_OPTION_RESULT == 0 %}{{ lang('NO_VOTES') }}{% else %}{{ poll_option.POLL_OPTION_PERCENT }}{% endif %}</dd>{% endif %}
									</dl>
								{% endfor %}
								{% else %}
									{{ lang('NO_OPTIONS') }}
								{% endif %}

								{% if poll.S_DISPLAY_RESULTS %}
									<dl>
										<dt>&nbsp;</dt>
										<dd class="resultbar"><p class="portal-poll-subtext">{{ lang('TOTAL_VOTES') }} : {{ poll.TOTAL_VOTES }}</p></dd>
									</dl>
								{% endif %}

								{% if poll.S_CAN_VOTE %}
									<dl class="portal-poll-vote">
										<dt>&nbsp;</dt>
										<dd class="resultbar"><input type="submit" name="update" value="{{ lang('SUBMIT_VOTE') }}" class="button1" /></dd>
									</dl>
								{% endif %}

								{% if not poll.S_DISPLAY_RESULTS %}
									<dl class="portal-poll-vote">
										<dt>&nbsp;</dt>
										<dd class="resultbar"><p class="portal-poll-subtext"><a href="{{ poll.U_VIEW_RESULTS }}">{{ lang('VIEW_RESULTS') }}</a></p></dd>
									</dl>
								{% endif %}

									<dl class="portal-poll-vote">
										<dt>&nbsp;</dt>
										<dd class="resultbar"><p class="portal-poll-subtext"><a href="{{ poll.U_VIEW_TOPIC }}">{{ lang('VIEW_TOPIC') }}</a></p></dd>
									</dl>
							</fieldset>
						</div>
						{% if poll.S_CAN_VOTE %}{{ poll.S_HIDDEN_FIELDS }}{% endif %}
					{% if poll.S_CAN_VOTE %}</form>{% endif %}
				{% endfor %}
			</div>
		</div>
		{% else %}
		<div class="panel bg1 portal-no-margin">
			<div class="inner">
				<span><strong>{{ lang('NO_POLL') }}</strong></span>
			</div>
		</div>
	{% endif %}
{{ definition.C_BLOCK_F_L }}{{ definition.C_BLOCK_F_R }}