Poll buttons are hidden after vote has been cast
authorAlexander Ebert <ebert@woltlab.com>
Tue, 27 Sep 2016 17:36:21 +0000 (19:36 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 27 Sep 2016 17:36:26 +0000 (19:36 +0200)
com.woltlab.wcf/templates/poll.tpl

index 93e694d65fab8e08f0d3c00624e727bb86407908..c8ac4fb257bb70666870ba2c46c9592254de6fd8 100644 (file)
        </section>
        
        {hascontent}
-               <div class="formSubmit jsOnly"{if !$poll->canVote() && $__pollView === 'result'} style="display: none"{/if}>
+               <div class="formSubmit jsOnly"{if !$poll->canVote() && $__pollView === 'result' && !$poll->canSeeResult()} style="display: none"{/if}>
                        {content}
                                {if $__wcf->getUser()->userID}
                                        <button class="small jsButtonPollVote"{if $poll->canVote()} disabled{else} style="display: none;"{/if}>{lang}wcf.poll.button.vote{/lang}</button>
-                                       <button class="small jsButtonPollShowVote"{if $__pollView === 'vote'} style="display: none;"{/if}>{lang}wcf.poll.button.showVote{/lang}</button>
+                                       <button class="small jsButtonPollShowVote"{if !$poll->canVote() || $__pollView === 'vote'} style="display: none;"{/if}>{lang}wcf.poll.button.showVote{/lang}</button>
                                        <button class="small jsButtonPollShowResult"{if $__pollView === 'result'} style="display: none;"{/if}>{lang}wcf.poll.button.showResult{/lang}</button>
                                {/if}
                                {if $poll->canViewParticipants()}
-                                       <button class="small jsButtonPollShowParticipants"{if $__pollView === 'vote' || !$poll->canVote()} style="display: none"{/if}>{lang}wcf.poll.button.showParticipants{/lang}</button>
+                                       <button class="small jsButtonPollShowParticipants"{if $__pollView === 'vote' || !$poll->canSeeResult()} style="display: none"{/if}>{lang}wcf.poll.button.showParticipants{/lang}</button>
                                {/if}
                                
                                {event name='pollButtons'}