{{if !isset( \IPS\Request::i()->fetchPoll )}}
{{endif}} {{if $poll->canVote() and request._poll != 'results' and ( !$poll->getVote() or request._poll == 'form') and $pollForm = $poll->buildForm()}}

{$poll->votes} {$poll->poll_question}

{$pollForm->customTemplate( array( \IPS\Theme::i()->getTemplate( 'widgets', 'forums', 'front' ), 'pollFormWidget' ), $url )|raw}
{{elseif ( $poll->canViewResults() and !$poll->canVote() ) or $poll->getVote() or ( request._poll == 'results' and settings.allow_result_view )}}

{$poll->votes} {$poll->poll_question}

    {{$i = 0;}} {{foreach $poll->choices as $questionId => $question}} {{$i++;}}
  1. {$i}. {$question['question']}


      {{foreach $question['choice'] as $k => $choice}}
    • {$choice|raw}
      0 }}{expression="\intval( ( $question['votes'][ $k ] / array_sum( $question['votes'] ) ) * 100 )"}{{else}}0{{endif}}%' data-votes='{{if array_sum( $question['votes'] ) > 0}}{expression="round( ( $question['votes'][ $k ] / array_sum( $question['votes'] ) ) * 100, 2 )"}{{else}}0{{endif}}%' {{if array_sum( $question['votes'] ) && \intval( ( $question['votes'][ $k ] / array_sum( $question['votes'] ) ) * 100 ) > 30}}class='cPollVoteBar_inside'{{endif}}>
    • {{endforeach}}
  2. {{endforeach}}

    {{if $poll->canVote() || !member.member_id}} {{if $poll->canVote()}}
  • {lang="show_vote_options"}
  • {{endif}} {{if !member.member_id}}
  • {lang="poll_guest" sprintf="\IPS\Http\Url::internal( 'app=core&module=system&controller=login', 'front', 'login' ), \IPS\Http\Url::internal( 'app=core&module=system&controller=register', 'front', 'register' )"}
  • {{endif}} {{endif}}
  • {lang="poll_view_topic"}
{{else}}

{$poll->votes} {$poll->poll_question}

{lang="no_permission_poll"}{{if !\IPS\Member::loggedIn()->member_id}} {lang="poll_guest" sprintf="\IPS\Http\Url::internal( 'app=core&module=system&controller=login', 'front', 'login' ), \IPS\Http\Url::internal( 'app=core&module=system&controller=register', 'front', 'register' )"}{{endif}}
{{endif}} {{if !isset( \IPS\Request::i()->fetchPoll )}}
{{endif}}