
<?php if(isset($poll)) : ?>

<?php $_tpl = Mage::helper('designer')->createTemplate($this->getBlockTemplate(), $this->getBlockId()) ?>

<?php $_tpl->section('header') ?>

<?php echo $this->__('Community Poll') ?>

<?php $_tpl->section('content') ?>


    <p class="block-subtitle"><?php echo $this->htmlEscape($poll->getPollTitle()); ?></p>
    <?php if( $poll_answers ): ?>
    <ol id="poll-answers">
        <?php foreach( $poll_answers as $answer ): ?>
            <li>
                <span class="votes"><?php echo $answer->getVotesCount() ?> (<?php echo $answer->getPercent() ?>%)</span>
                <span class="answer"><?php echo $this->htmlEscape($answer->getAnswerTitle()) ?>:</span>
            </li>
        <?php endforeach; ?>
    </ol>
    <script type="text/javascript">decorateList('poll-answers');</script>
    <?php endif; ?>
    
<?php echo $_tpl->render($this) ?>


<?php endif; ?>
