app/template/default/Review/index.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'review_page' %}
  10. {% block stylesheet %}
  11.     <link rel="stylesheet" href="/stylesheets/review.css?20220924">
  12.     <link rel="stylesheet" href="/stylesheets/pagination.css?20211225">
  13.     <style>
  14.         nav {
  15.             min-height: auto;
  16.         }
  17.     </style>
  18. {% endblock %}
  19. {% block javascript %}
  20. {% endblock %}
  21. {% block main %}
  22.     {% if kataban is not empty %}
  23.         <div id="navigation" class="nav-float"></div>
  24.         <div>
  25.             <img src="{{ mainUrl }}" height="100" alt="商品" class="item-thumb">
  26.         </div>
  27.         <div id="rcontents" class="review-page">
  28.             <p>
  29.                 <a href="/item/{{ kataban.goods_id }}.html"><b>{{ kataban.name }}</b></a>
  30.             </p>
  31.         </div>
  32.         <br class="clear" />
  33.     {% endif %}
  34.     {% if review is not empty %}
  35.         {% set count = 0 %}
  36.         <br>
  37.         <div id="wrap" class="review-page">
  38.             <div id="voice" class="voice-box">
  39.                 <div class="title">
  40.                     <h2>この商品を買ったお客様のレビュー(評価)</h2>
  41.                     <p class="star">
  42.                         <img alt="お客様からの口コミレビュー評価の星の数{{ average }}" src="https://img0.land-mark.biz/ut_img/public_images/review/star_m{{ star }}.gif">
  43.                         <span>{{ average }}</span>
  44.                         <span>({{ total_count | number_format }}件)</span>
  45.                     </p>
  46.                 </div>
  47.                 <ul>
  48.                 {% for key,rv in review %}
  49.                     {% if count < 5 %}
  50.                         <li>
  51.                             <dl>
  52.                                 <dt>評価:
  53.                                     {% for i in 0..4 %}
  54.                                         {% if i < rv.cr_points %}
  55.                                             {{ "★" }}
  56.                                         {% else %}
  57.                                             {{ "☆" }}
  58.                                         {% endif %}
  59.                                     {% endfor %}
  60.                                 <span> 投稿日: {{ rv.app_datetime | date('Y/m/d') }}</span>
  61.                                 </dt>
  62.                                 <dd>
  63.                                     <p class="txt">
  64.                                         {% if rv.cr_staff_comment is not empty %}
  65.                                             {{ rv.cr_staff_comment | nl2br }}
  66.                                         {% else %}
  67.                                             {{ (rv.cr_comment | trim(side='right')) | nl2br }}
  68.                                         {% endif %}
  69.                                     </p>
  70.                                 </dd>
  71.                             </dl>
  72.                         </li>
  73.                     {% endif %}
  74.                 {% endfor %}
  75.             </ul>
  76.             </div><!-- /#voice -->
  77.         </div><!-- /#wrap -->
  78.     {% endif %}
  79.     <!-- ページネーション -->
  80.     {% if pager.pages is defined and pager.pages > 1 %}
  81.         <nav data-pagination>
  82.             <ul>
  83.                 <li>
  84.                 {% if pager.prev is not empty %}
  85.                     <a href="/review?{{ PageWithGetParams(pager.prev) | raw }}">
  86.                         <i class="ion-chevron-left"><</i>
  87.                     </a>
  88.                 {% else %}
  89.                     <a disabled>
  90.                         <i class="ion-chevron-left"></i>
  91.                     </a>
  92.                 {% endif %}
  93.                 </li>
  94.                 {% for key, pg in pager.page_list %}
  95.                     {% if page == pg %}
  96.                         <li class="current">{{ pg }}</li>
  97.                     {% elseif pg==null %}
  98.                         <li>...</li>
  99.                     {% else %}
  100.                         <li><a href="/review?{{ PageWithGetParams(pg) | raw }}">{{ pg }}</a></li>
  101.                     {% endif %}
  102.                 {% endfor %}
  103.                 <li>
  104.                 {% if pager.next is not empty %}
  105.                     <a href="/review?{{ PageWithGetParams(pager.next) | raw }}">
  106.                         <i class="ion-chevron-right">></i>
  107.                     </a>
  108.                 {% else %}
  109.                     <a disabled>
  110.                         <i class="ion-chevron-right"></i>
  111.                     </a>
  112.                 {% endif %}
  113.                 </li>
  114.             </ul>
  115.         </nav>
  116.     {% endif %}
  117. {% endblock %}