{if ((isset($aPoll.voted)) || (!Phpfox::getUserParam('poll.can_vote_in_own_poll') && ($aPoll.user_id == Phpfox::getUserId())) || (isset($bDesign) && $bDesign))}
{foreach from=$aPoll.answer item=aAnswer}
{$aAnswer.answer}
{if ((isset($aPoll.user_voted_this_poll) && (($aPoll.user_voted_this_poll == false && Phpfox::getUserParam('poll.view_poll_results_before_vote')) || ($aPoll.user_voted_this_poll == true && Phpfox::getUserParam('poll.view_poll_results_after_vote')))) || (!isset($aPoll.user_voted_this_poll))) || ((isset($bDesign) && $bDesign)) } {if !isset($bDesign)}
{if isset($aAnswer.vote_percentage)}  {$aAnswer.vote_percentage}% ({phrase var='poll.total_votes_votes' total_votes=$aAnswer.total_votes}) {else} {phrase var='poll.votes_0'} {/if}
{/if}
 
{/if}
{foreachelse} {phrase var='poll.no_answers_to_show'} {/foreach} {if isset($aPoll.answer) && count($aPoll.answer) && !isset($bDesign) && $aPoll.total_votes > 0 && ((Phpfox::getUserParam('poll.can_view_user_poll_results_own_poll') && $aPoll.user_id == Phpfox::getUserId()) || Phpfox::getUserParam('poll.can_view_user_poll_results_other_poll'))} {/if}
{else}
{if isset($aPoll.answer)} {foreach from=$aPoll.answer item=answer} {if !empty($answer.answer)}
{/if} {/foreach} {/if}
{/if}