Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
list.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <?php if ($block->getReviews() && count($block->getReviews())): ?>
12  <div class="table-wrapper reviews">
13  <table class="data table table-reviews" id="my-reviews-table">
14  <caption class="table-caption"><?= $block->escapeHtml(__('Product Reviews')) ?></caption>
15  <thead>
16  <tr>
17  <th scope="col" class="col date"><?= $block->escapeHtml(__('Created')) ?></th>
18  <th scope="col" class="col item"><?= $block->escapeHtml(__('Product Name')) ?></th>
19  <th scope="col" class="col summary"><?= $block->escapeHtml(__('Rating')) ?></th>
20  <th scope="col" class="col description"><?= $block->escapeHtml(__('Review')) ?></th>
21  <th scope="col" class="col actions">&nbsp;</th>
22  </tr>
23  </thead>
24  <tbody>
25  <?php foreach ($block->getReviews() as $review): ?>
26  <tr>
27  <td data-th="<?= $block->escapeHtml(__('Created')) ?>" class="col date"><?= $block->escapeHtml($block->dateFormat($review->getReviewCreatedAt())) ?></td>
28  <td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
29  <strong class="product-name">
30  <a href="<?= $block->escapeUrl($block->getProductUrl($review)) ?>"><?= $block->escapeHtml($review->getName()) ?></a>
31  </strong>
32  </td>
33  <td data-th="<?= $block->escapeHtml(__('Rating')) ?>" class="col summary">
34  <?php if ($review->getSum()): ?>
35  <div class="rating-summary">
36  <span class="label"><span><?= $block->escapeHtml(__('Rating')) ?>:</span></span>
37  <div class="rating-result" title="<?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%">
38  <span style="width:<?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%;"><span><?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%</span></span>
39  </div>
40  </div>
41  <?php endif; ?>
42  </td>
43  <td data-th="<?= $block->escapeHtmlAttr(__('Review')) ?>" class="col description">
44  <?= $this->helper('Magento\Review\Helper\Data')->getDetailHtml($review->getDetail()) ?>
45  </td>
46  <td data-th="<?= $block->escapeHtmlAttr(__('Actions')) ?>" class="col actions">
47  <a href="<?= $block->escapeUrl($block->getReviewUrl($review)) ?>" class="action more">
48  <span><?= $block->escapeHtml(__('See Details')) ?></span>
49  </a>
50  </td>
51  </tr>
52  <?php endforeach; ?>
53  </tbody>
54  </table>
55  </div>
56  <?php if ($block->getToolbarHtml()): ?>
57  <div class="toolbar products-reviews-toolbar bottom">
58  <?= $block->getToolbarHtml() ?>
59  </div>
60  <?php endif; ?>
61 <?php else: ?>
62  <div class="message info empty"><span><?= $block->escapeHtml(__('You have submitted no reviews.')) ?></span></div>
63 <?php endif; ?>
64 <div class="actions-toolbar">
65  <div class="secondary">
66  <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>">
67  <span><?= $block->escapeHtml(__('Back')) ?></span>
68  </a>
69  </div>
70 </div>
endif
Definition: list.phtml:77
__()
Definition: __.php:13
$block
Definition: block.php:8
$_count $_index $_prevOptionId if($block->getOrderOptions()|| $_item->getDescription()) foreach( $items as $_item)( $_item) ?><?php $attributes if( $_item->getOrderItem() ->getParentItem())($_prevOptionId !=$attributes['option_id'])</td >< td > & nbsp
Definition: renderer.phtml:33
endforeach
Definition: list.phtml:36