1 {if ($__wcf->getUser()->userID || $poll->canSeeResult() || $poll->canViewParticipants()) && !$__pollLoadedJavaScript|isset}
2 {assign var=__pollLoadedJavaScript value=true}
3 <script data-relocate="true">
6 new WCF.Poll.Manager('.pollContainer');
12 <div class="container containerPadding pollContainer" data-poll-id="{@$poll->pollID}" data-can-vote="{if $poll->canVote()}1{else}0{/if}" data-can-view-result="{if $poll->canSeeResult()}1{else}0{/if}" data-can-view-participants="{if $poll->canViewParticipants()}true{else}false{/if}" data-in-vote="{if $poll->canVote() && !$poll->isParticipant()}1{else}0{/if}" data-question="{$poll->question}" data-max-votes="{@$poll->maxVotes}">
14 <legend>{$poll->question} <span class="badge jsTooltip" title="{lang}wcf.poll.totalVotes{/lang}">{#$poll->votes}</span></legend>
16 <div class="pollInnerContainer">
17 {if !$__wcf->getUser()->userID}
18 {if $poll->canSeeResult()}
19 {include file='pollResult'}
21 {include file='pollVote'}
24 {if $poll->canVote() && !$poll->isParticipant()}
25 {include file='pollVote'}
27 {include file='pollResult'}
31 {event name='pollData'}
36 <div class="formSubmit jsOnly">
38 {if $__wcf->getUser()->userID}
39 <button class="small jsButtonPollVote">{lang}wcf.poll.button.vote{/lang}</button>
40 <button class="small jsButtonPollShowVote">{lang}wcf.poll.button.showVote{/lang}</button>
41 <button class="small jsButtonPollShowResult">{lang}wcf.poll.button.showResult{/lang}</button>
43 {if $poll->canViewParticipants()}
44 <button class="small jsButtonPollShowParticipants">{lang}wcf.poll.button.showParticipants{/lang}</button>
47 {event name='pollButtons'}