
<?php if($this->getProductData()->getId()): ?>
<div class="product-review">
    <div class="page-title">
        <h2><?php echo $this->__('Review Details') ?></h2>
    </div>
<div class="line"></div>
<div class="dashboard">
    <div class="product-img-box">
        <a href="<?php echo $this->getProductData()->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getProductData()->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($this->getProductData(), 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($this->getProductData()->getName()) ?>" /></a>
        <?php if( $this->getRating() && $this->getRating()->getSize()): ?>
            <p class="label"><?php echo $this->__('Average Customer Rating:') ?></p>
            <?php echo $this->getReviewsSummaryHtml($this->getProductData()) ?>
        <?php endif; ?>
    </div>
    <div class="product-details">
        <h2 class="product-name"><?php echo $this->htmlEscape($this->getProductData()->getName()) ?></h2>
        <?php if( $this->getRating() && $this->getRating()->getSize()): ?>
        <h3><?php echo ($this->isReviewOwner()) ? $this->__('Your Rating:') : $this->__('Rating:'); ?></h3>
        <table class="ratings-table">
        <?php foreach ($this->getRating() as $_rating): ?>
        <?php if($_rating->getPercent()): ?>
            <tr>
                <th><?php echo $this->escapeHtml($_rating->getRatingCode()) ?></th>
                <td>
                    <div class="rating-box">
                        <div class="rating" style="width:<?php echo ceil($_rating->getPercent()) ?>%;"></div>
                    </div>
                </td>
            </tr>
        <?php endif; ?>
        <?php endforeach; ?>
        </table>
        <?php endif; ?>
        <dl>
            <dt>
                <?php if ($this->isReviewOwner()): ?>
                    <?php echo $this->__('Your Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?>
                <?php else :?>
                    <?php echo $this->__('Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?>
                <?php endif;?>
            </dt>
            <dd>
                <?php echo nl2br($this->htmlEscape($this->getReviewData()->getDetail())) ?>
            </dd>
        </dl>
    </div>
    <div class="buttons-set">
        <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to My Reviews') ?></a></p>
    </div>
</div>
</div> <!--dashboard-->
<?php endif; ?>