{# お客様の声 #}
<script>
$(function () {
$('.show-more').on('click', function (eventObject) {
eventObject.preventDefault();
$(this).parents('.comment').find('.extra').show();
$(this).remove();
});
});
</script>
{% if messages is not empty %}
<div class="message-area">
<p class="message-head">
{% if messagesTotal > 1 %}
<a href="{{ url('message/index') }}?goods_id={{ data.goods_id }}" target="_blank">
<b>{{ data.goods_name }} (品番:{{ data.goods_main_kataban }}) のお客様の声一覧 ({{ messagesTotal }}件!)はコチラ</b>
</a>
{% else %}
<b>{{ data.goods_name }} (品番:{{ data.goods_main_kataban }}) のお客様の声</b>
{% endif %}
</p>
{% for message in messages %}
<div class="per-message {% if message.file is not empty %} has-image {% endif %}">
<div class="title">
「<b>{{ message.title }}</b>」<br>
{{ message.customer_name }} 様({{ message.display_datetime }})
</div>
<div class="message-content clearfix">
<div class="picture">
{% if message.file is not empty %}
<img class="message-img" src="{{ message.file }}" border="0" id="cart_button"
alt="{{ message.customer_name }} 様からの声の写真"/>
{% endif %}
</div>
<div class="message">
{% if message.shorted_comment is defined %}
<div class="comment customer-comment {% if message.extra_comment is not empty %} togglable {% endif %}">
<p>
<span>{{ message.shorted_comment }}</span>
<span class="extra">{{ message.extra_comment }}</span>
</p>
<span class="show-more">もっと見る</span>
</div>
{% endif %}
{% if message.shorted_staff_comment is defined %}
<div class="comment shop-comment {% if message.extra_staff_comment is not empty %} togglable {% endif %}">
<h4 class="shop-icon">ショップ担当者より</h4>
<p>
<span>{{ message.shorted_staff_comment }}</span>
<span class="extra">{{ message.extra_staff_comment }}</span>
</p>
<span class="show-more">もっと見る</span>
</div>
{% endif %}
</div>
</div>
</div>
{% endfor %}
<div class="clear"></div>
</div>
{% endif %}