You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 rivejä
1.4 KiB

  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * @var \Magento\Review\Block\Rating\Entity\Detailed $block
  8. * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  9. */
  10. ?>
  11. <?php if (!empty($collection) && $collection->getSize()): ?>
  12. <div class="table-wrapper">
  13. <table class="data table ratings review summary">
  14. <caption class="table-caption"><?= $block->escapeHtml(__('Ratings Review Summary')) ?></caption>
  15. <tbody>
  16. <?php foreach ($collection as $_rating): ?>
  17. <?php if ($_rating->getSummary()): ?>
  18. <tr>
  19. <th class="label" scope="row"><?= $block->escapeHtml(__($_rating->getRatingCode())) ?></th>
  20. <td class="value">
  21. <div class="rating box">
  22. <div class="rating"></div>
  23. </div>
  24. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
  25. "width:" . /* @noEscape */ ceil($_rating->getSummary()) . "%;",
  26. 'div.rating.box div.rating'
  27. ) ?>
  28. </td>
  29. </tr>
  30. <?php endif; ?>
  31. <?php endforeach; ?>
  32. </tbody>
  33. </table>
  34. </div>
  35. <?php endif; ?>