{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'review_page' %}
{% block stylesheet %}
<link rel="stylesheet" href="/stylesheets/review.css?20220924">
<link rel="stylesheet" href="/stylesheets/pagination.css?20211225">
<style>
nav {
min-height: auto;
}
</style>
{% endblock %}
{% block javascript %}
{% endblock %}
{% block main %}
{% if kataban is not empty %}
<div id="navigation" class="nav-float"></div>
<div>
<img src="{{ mainUrl }}" height="100" alt="商品" class="item-thumb">
</div>
<div id="rcontents" class="review-page">
<p>
<a href="/item/{{ kataban.goods_id }}.html"><b>{{ kataban.name }}</b></a>
</p>
</div>
<br class="clear" />
{% endif %}
{% if review is not empty %}
{% set count = 0 %}
<br>
<div id="wrap" class="review-page">
<div id="voice" class="voice-box">
<div class="title">
<h2>この商品を買ったお客様のレビュー(評価)</h2>
<p class="star">
<img alt="お客様からの口コミレビュー評価の星の数{{ average }}" src="https://img0.land-mark.biz/ut_img/public_images/review/star_m{{ star }}.gif">
<span>{{ average }}</span>
<span>({{ total_count | number_format }}件)</span>
</p>
</div>
<ul>
{% for key,rv in review %}
{% if count < 5 %}
<li>
<dl>
<dt>評価:
{% for i in 0..4 %}
{% if i < rv.cr_points %}
{{ "★" }}
{% else %}
{{ "☆" }}
{% endif %}
{% endfor %}
<span> 投稿日: {{ rv.app_datetime | date('Y/m/d') }}</span>
</dt>
<dd>
<p class="txt">
{% if rv.cr_staff_comment is not empty %}
{{ rv.cr_staff_comment | nl2br }}
{% else %}
{{ (rv.cr_comment | trim(side='right')) | nl2br }}
{% endif %}
</p>
</dd>
</dl>
</li>
{% endif %}
{% endfor %}
</ul>
</div><!-- /#voice -->
</div><!-- /#wrap -->
{% endif %}
<!-- ページネーション -->
{% if pager.pages is defined and pager.pages > 1 %}
<nav data-pagination>
<ul>
<li>
{% if pager.prev is not empty %}
<a href="/review?{{ PageWithGetParams(pager.prev) | raw }}">
<i class="ion-chevron-left"><</i>
</a>
{% else %}
<a disabled>
<i class="ion-chevron-left"></i>
</a>
{% endif %}
</li>
{% for key, pg in pager.page_list %}
{% if page == pg %}
<li class="current">{{ pg }}</li>
{% elseif pg==null %}
<li>...</li>
{% else %}
<li><a href="/review?{{ PageWithGetParams(pg) | raw }}">{{ pg }}</a></li>
{% endif %}
{% endfor %}
<li>
{% if pager.next is not empty %}
<a href="/review?{{ PageWithGetParams(pager.next) | raw }}">
<i class="ion-chevron-right">></i>
</a>
{% else %}
<a disabled>
<i class="ion-chevron-right"></i>
</a>
{% endif %}
</li>
</ul>
</nav>
{% endif %}
{% endblock %}