<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php $url = $block->getReviewsUrl() . '#reviews'; ?>
<?php $urlForm = $block->getReviewsUrl() . '#review-form'; ?>
<?php if ($block->getReviewsCount()): ?>
<?php $rating = $block->getRatingSummary(); ?>
<div class="product-reviews-summary short<?php echo !$rating ? ' no-rating' : ''?>">
    <?php if ($rating):?>
    <div class="rating-summary">
        <span class="label"><span><?php /* @escapeNotVerified */ echo __('Rating') ?>:</span></span>
        <div class="rating-result" title="<?php /* @escapeNotVerified */ echo $rating; ?>%">
            <span style="width:<?php /* @escapeNotVerified */ echo $rating; ?>%"><span><?php /* @escapeNotVerified */ echo $rating; ?>%</span></span>
        </div>
    </div>
    <?php endif;?>
    <div class="reviews-actions">
        <a class="action view" href="<?php /* @escapeNotVerified */ echo $url ?>"><?php /* @escapeNotVerified */ echo $block->getReviewsCount() ?>&nbsp;<span><?php /* @escapeNotVerified */ echo($block->getReviewsCount() == 1) ? __('Review') : __('Reviews') ?></span></a>
    </div>
</div>
<?php elseif ($block->getDisplayIfEmpty()): ?>
<div class="product-reviews-summary short empty">
     <div class="rating-summary">
        <span class="label"><span><?php /* @escapeNotVerified */ echo __('Rating') ?>:</span></span>
        <div class="rating-result" title="0%">
            <span style="width:0%"><span>0%</span></span>
        </div>
    </div>
</div>
<?php endif; ?>
