app/template/default/Item/customer_message.twig line 1

Open in your IDE?
  1. {# お客様の声 #}
  2. <script>
  3.     $(function () {
  4.         $('.show-more').on('click', function (eventObject) {
  5.             eventObject.preventDefault();
  6.             $(this).parents('.comment').find('.extra').show();
  7.             $(this).remove();
  8.         });
  9.     });
  10. </script>
  11. {% if messages is not empty %}
  12.     <div class="message-area">
  13.         <p class="message-head">
  14.             {% if messagesTotal > 1 %}
  15.                 <a href="{{ url('message/index') }}?goods_id={{ data.goods_id }}" target="_blank">
  16.                     <b>{{ data.goods_name }} (品番:{{ data.goods_main_kataban }}) のお客様の声一覧 ({{ messagesTotal }}件!)はコチラ</b>
  17.                 </a>
  18.             {% else %}
  19.                 <b>{{ data.goods_name }} (品番:{{ data.goods_main_kataban }}) のお客様の声</b>
  20.             {% endif %}
  21.         </p>
  22.         {% for message in messages %}
  23.             <div class="per-message {% if message.file is not empty %} has-image {% endif %}">
  24.                 <div class="title">
  25.                     「<b>{{ message.title }}</b>」<br>
  26.                     {{ message.customer_name }} 様({{ message.display_datetime }})
  27.                 </div>
  28.                 <div class="message-content clearfix">
  29.                     <div class="picture">
  30.                         {% if message.file is not empty %}
  31.                             <img class="message-img" src="{{ message.file }}" border="0" id="cart_button"
  32.                                  alt="{{ message.customer_name }} 様からの声の写真"/>
  33.                         {% endif %}
  34.                     </div>
  35.                     <div class="message">
  36.                         {% if message.shorted_comment is defined %}
  37.                             <div class="comment customer-comment {% if message.extra_comment is not empty %} togglable {% endif %}">
  38.                                 <p>
  39.                                     <span>{{ message.shorted_comment }}</span>
  40.                                     <span class="extra">{{ message.extra_comment }}</span>
  41.                                 </p>
  42.                                 <span class="show-more">もっと見る</span>
  43.                             </div>
  44.                         {% endif %}
  45.                         {% if message.shorted_staff_comment is defined %}
  46.                             <div class="comment shop-comment {% if message.extra_staff_comment is not empty %} togglable {% endif %}">
  47.                                 <h4 class="shop-icon">ショップ担当者より</h4>
  48.                                 <p>
  49.                                     <span>{{ message.shorted_staff_comment }}</span>
  50.                                     <span class="extra">{{ message.extra_staff_comment }}</span>
  51.                                 </p>
  52.                                 <span class="show-more">もっと見る</span>
  53.                             </div>
  54.                         {% endif %}
  55.                     </div>
  56.                 </div>
  57.             </div>
  58.         {% endfor %}
  59.         <div class="clear"></div>
  60.     </div>
  61. {% endif %}