1 {if ($__wcf->getUser()->userID || $poll->canSeeResult() || $poll->canViewParticipants()) && !$__pollLoadedJavaScript|isset}
2 {assign var=__pollLoadedJavaScript value=true}
3 <script data-relocate="true">
5 new WCF.Poll.Manager('.pollContainer');
10 <div class="pollContainer{if POLL_FULL_WIDTH} pollContainerFullWidth{/if}" 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}" data-is-public="{if $poll->isPublic}true{else}false{/if}">
12 <h2>{$poll->question} <span class="badge jsTooltip" title="{lang}wcf.poll.totalVotes{/lang}">{#$poll->votes}</span></h2>
14 <div class="pollInnerContainer">
15 {if !$__wcf->getUser()->userID}
16 {if $poll->canSeeResult()}
17 {assign var='__pollView' value='result'}
18 {include file='pollResult'}
20 {assign var='__pollView' value='vote'}
21 {include file='pollVote'}
24 {if $poll->canVote() && !$poll->isParticipant()}
25 {assign var='__pollView' value='vote'}
26 {include file='pollVote'}
28 {assign var='__pollView' value='result'}
29 {include file='pollResult'}
33 {event name='pollData'}
38 <div class="formSubmit jsOnly"{if !$poll->canVote() && $__pollView === 'result'} style="display: none"{/if}>
40 {if $__wcf->getUser()->userID}
41 <button class="small jsButtonPollVote"{if $poll->canVote()} disabled{else} style="display: none;"{/if}>{lang}wcf.poll.button.vote{/lang}</button>
42 <button class="small jsButtonPollShowVote"{if !$poll->canVote() || $__pollView === 'vote'} style="display: none;"{/if}>{lang}wcf.poll.button.showVote{/lang}</button>
43 <button class="small jsButtonPollShowResult"{if $__pollView === 'result'} style="display: none;"{/if}>{lang}wcf.poll.button.showResult{/lang}</button>
45 {if $poll->canViewParticipants() || ($poll->canVote() && $poll->isPublic)}
46 <button class="small jsButtonPollShowParticipants"{if $__pollView === 'vote' || !$poll->canSeeResult()} style="display: none"{/if}>{lang}wcf.poll.button.showParticipants{/lang}</button>
49 {event name='pollButtons'}