{#
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 = 'message_page' %}
{% block stylesheet %}
<link rel="stylesheet" href="/stylesheets/message.css?20220924">
<style>
nav {
min-height: auto;
}
</style>
{% if g_page > 1 %}
<meta name="robots" content="noindex" />
{% endif %}
{% endblock %}
{% block javascript %}
<script src="/javascripts/message.js"></script>
<script>
$(function() {
$('#category-select').on('change', function(event) {
location.href = '/message?category=' + $(this).val();
});
});
</script>
{% endblock %}
{% block main %}
{#{% if g_pager.prev is not defined and g_category is empty and g_goods_id is empty and g_basic_id is empty %}#}
{% if g_pager.prev is empty and g_category is empty and g_goods_id is empty %}
<div id="ttl_koe">
<div id="koe_img">
<div id="txt">
<p>お客様の声<span>{{ g_total_count }}件</span>を掲載!</p>
<p>商品購入のご検討等にお役立てください!</p>
</div>
</div>
</div>
{% endif %}
<div class="left-menu">
<h3>カテゴリ一覧</h3>
<ul class="menu message-category-menu">
{% for category in g_category_list %}
<li class="module-header message-category-{{ category.cmc_id }}">
<a href="{{ url('message/index', {'category': category.cmc_id}) }}" {{ g_category_id == category.cmc_id ? 'class="active"' : "" }}>
{{ category.category_name }}<span class="message-count">({{ category.cmc_count }}件)</span><span class="arw">▸</span>
</a>
</li>
{% endfor %}
</ul>
</div>
<div class="left-menu-sp contents-wrapper">
<span>カテゴリ一覧</span>
<select id="category-select">
<option value="">選択してください</option>
{% for category in g_category_list %}
<option value="{{ category.cmc_id }}" {{ g_category_id == category.cmc_id ? 'selected' : "" }}>{{ category.category_name }}({{ category.cmc_count }}件)</option>
{% endfor %}
</select>
</div>
<div id="right-content">
{% if g_category_id is not empty %}
<div class="content-title">
「<span class="content-target">{{ g_category['category_name'] }}</span>」のお客様の声一覧
</div>
{% elseif g_goods_id is not empty %}
<div class="content-title">
{% for key, kataban in g_kataban %}
{% if loop.first %}
「<span class="content-target"> {{ kataban[0]['kataban']}} {{ g_goods['goods_name']}}</span>」のお客様の声一覧
{% endif %}
{% endfor %}
</div>
{% endif %}
{% set week = "-2 week" | date("Y/m/d") %}
{% for key, row in g_msg_list %}
{% set images = row.img_paths %}
<div class="article no-img clearfix">
<div class="date-box">
<div id="{{ row.cm_id }}" name="{{ row.cm_id }}">
{% if row.display_datetime | date("Y/m/d") > week %}
<p class="new">New</p>
{% endif %}
<p class="date">{{ row.display_datetime | date("Y/m/d") }}</p>
</div>
</div>
<div class="ttl">
<h3>{{ row.title }}</h3>
</div>
<div class="content-box">
<div class="left">
<div class="voice">
{% if row.customer_name is not empty and row.customer_name !="#VALUE!" %}
<h4 class="voice-icon">
「{{ row.customer_name }}様」からの声
</h4>
{% endif %}
{% if row.comment is not empty %}
<p class="comment customer_comment">
{% if images|length >= 0 %}
{% for idx, image in images %}
{% set alt = row.customer_name %}
{% set image_src = image.path|replace({"https:": ""} ) %}
<img class="mt-image-none" src='{{ image_src }}' alt="{{ image.alt }}" style="">
<br><br>
{% endfor %}
{% endif %}
{{ row.comment | raw }}
</p>
{% endif %}
</div>
{% if row.staff_comment is not empty %}
<div class="shop">
<h4 class="shop-icon">ショップ担当者より</h4>
<p class="comment staff_comment">{{ row.staff_comment | raw }}</p>
</div>
{% endif %}
{% if g_kataban[row.cm_id] is defined %}
<div class="buy">
<h4 class="buy-icon">ご購入いただいた商品</h4>
{% for key, data in g_kataban[row.cm_id] %}
<a href="/item/{{ data.goods_id }}.html" target="_blank" class="item-btn">
<p>{{ data.kataban }} {{ data.name }} <span class="arw">▸</span></p>
</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
<!-- ページネーション -->
{% if g_pages > 1 %}
<nav data-pagination>
<ul>
<li>
{% if g_pager.prev is not empty %}
<a href="/message?{{ PageWithGetParams(g_pager.next) | raw }}">
<i class="ion-chevron-left"><</i>
</a>
{% else %}
<a disabled>
<i class="ion-chevron-left"></i>
</a>
{% endif %}
</li>
{% for key, page in g_pager.page_list %}
{% if page == g_page %}
<li class="current">{{ page }}</li>
{% elseif page==null %}
<li class="page-point">...</li>
{% else %}
<li><a href="/message?{{ PageWithGetParams(page) | raw }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
<li>
{% if g_pager.next is defined %}
<a href="/message?{{ PageWithGetParams(g_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 %}