<?php
/**
 * Magiccart 
 * @category    Magiccart 
 * @copyright   Copyright (c) 2014 Magiccart (http://www.magiccart.net/) 
 * @license     http://www.magiccart.net/license-agreement.html
 * @Author: Magiccart<team.magiccart@gmail.com>
 * @@Create Date: 2014-07-31 15:41:21
 * @@Modify Date: 2016-03-29 14:31:50
 * @@Function:
 */
 ?>
<?php if(!$this->config['enabled']) return;?>
<?php $title = isset($this->config['title']) ? $this->config['title'] : ''; ?>

<?php $testimonial = $this->_getTestimonial();
?>
<div class="testimonial-customer-view ">
    <div class="page-title">
        <h1><?php echo $this->__($title);?></h1>
        <?php //if($this->config['write_testimonial']):?>
        <div class="submit">
            <button class="button" onclick="setLocation('<?php echo $this->getFormUrl(); ?>')">
                <span><span><?php echo __('Write Your Testimonial');?></span></span>
            </button>
        </div>
        <?php //endif ?>
    </div>
    <div class="testimonial">
    <?php if ($testimonial): ?>
            <div class="customer" name="<?php echo $testimonial->getName(); ?>" id="<?php echo $testimonial->getName(); ?>">
                    <div class="customer">
                        <img class="avatar" src="<?php echo $this->getImage($testimonial)?>" alt="<?php echo $this->__($testimonial->getTitle()) ?>" title="<?php echo __($testimonial->getTitle()) ?>" />
                        <?php echo $testimonial->getName(); ?>
                    </div>
                    <div class="rating-box">
                        <div class="rating" style="width:<?php echo ceil($testimonial->getRatingSummary() * 20) ?>%;"></div>
                    </div>
                    <div class="content">&ldquo;<?php echo $testimonial->getText(); ?>&rdquo;&nbsp;</div>
                    <div class="source">
                        <span class="author"><?php echo $testimonial->getName(); ?></span>
                        <span class="date">
                            <?php echo date('F d, Y', Mage::getModel('core/date')->gmtTimestamp($testimonial->getCreatedTime())); ?>
                        </span>
                    </div>
            </div>
    <?php else: ?>
        <p class="note-msg"><?php echo __('There are no testimonial matching the selection.') ?></p>
    <?php endif ?>        
    </div>
</div>

