{if ($__wcf->getUser()->userID || $poll->canSeeResult() || $poll->canViewParticipants()) && !$__pollLoadedJavaScript|isset} {assign var=__pollLoadedJavaScript value=true} {/if}

{$poll->question} {#$poll->votes}

{if !$__wcf->getUser()->userID} {if $poll->canSeeResult()} {assign var='__pollView' value='result'} {include file='pollResult'} {else} {assign var='__pollView' value='vote'} {include file='pollVote'} {/if} {else} {if $poll->canVote() && !$poll->isParticipant()} {assign var='__pollView' value='vote'} {include file='pollVote'} {else} {assign var='__pollView' value='result'} {include file='pollResult'} {/if} {/if} {event name='pollData'}
{hascontent}
canVote() && $__pollView === 'result'} style="display: none"{/if}> {content} {if $__wcf->getUser()->userID} {/if} {if $poll->canViewParticipants() || ($poll->canVote() && $poll->isPublic)} {/if} {event name='pollButtons'} {/content}
{/hascontent}