{#
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 = 'product_page' %}
{% block javascript %}
<script>
$(function() {
// 表示件数を変更
$('.disp-number').change(function() {
var dispNumber = $(this).val();
$('#disp_number').val(dispNumber);
$('#pageno').val(1);
$("#form1").submit();
});
});
$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
$('.ec-modal').hide()
});
</script>
{% endblock %}
{% block main %}
<div class="ec-pageHeader contentHeader">
<h1>{{ '新着の質問'|trans }}</h1>
</div>
{% if search_form.category_id.vars.errors|length > 0 %}
<div class="ec-searchnavRole">
<p class="errormsg text-danger">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<div class="ec-searchnavRole">
<form name="form1" id="form1" method="get" action="?">
{% for item in search_form %}
<input type="hidden" id="{{ item.vars.id }}"
name="{{ item.vars.full_name }}"
{% if item.vars.value is not empty %}value="{{ item.vars.value }}" {% endif %}/>
{% endfor %}
</form>
{# <div class="ec-searchnavRole__topicpath">
<ol class="ec-topicpath">
<li class="ec-topicpath__item"><a href="{{ url('product_list') }}">{{ '全て'|trans }}</a>
</li>
{% if Category is not null %}
{% for Path in Category.path %}
<li class="ec-topicpath__divider">|</li>
<li class="ec-topicpath__item{% if loop.last %}--active{% endif %}"><a
href="{{ url('product_list') }}?category_id={{ Path.id }}">{{ Path.name }}</a>
</li>
{% endfor %}
{% endif %}
{% if search_form.vars.value and search_form.vars.value.name %}
<li class="ec-topicpath__divider">|</li>
<li class="ec-topicpath__item">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
{% endif %}
</ol>
</div> #}
<div class="ec-searchnavRole__infos">
<div class="ec-searchnavRole__counter">
{# {% if pagination.totalItemCount > 0 %}
<p class="ec-searchnavRole__counter__title">検索結果</p>
{{ '<p class="ec-searchnavRole__counter__number">%count%件</p>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
{% endif %} #}
</div>
{% if pagination.totalItemCount > 0 %}
<div class="ec-searchnavRole__actions">
<div class="ec-select">
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
{# {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }} #}
</div>
</div>
{% endif %}
</div>
</div>
{% if pagination.totalItemCount > 0 %}
<div class="ec-shelfRole">
<ul class="reply">
{% for Contact in pagination %}
<li class="reply__list">
<div class="reply__list__image">
<div class="reply__list__image__block">
{% if Contact.Product %}
<img src="{{ asset(Contact.Product.main_list_image|no_image_product, 'save_image') }}" alt="">
{% else %}
<img src="{{ asset('no_image_product.png', 'save_image') }}" alt="">
{% endif %}
</div>
</div>
<div class="reply__list__content">
<p class="reply__list__date">
質問日: {{Contact.create_date|date_day}}
</p>
{% if Contact.Product %}
<a class="reply__list__title" href="{{ url('product_detail', {'id': Contact.Product.id}) }}">
<strong>{{Contact.Product.name}}</strong>
</a>
{% endif %}
<p class="reply__list__detail">
{{ Contact.contents|raw|nl2br }}
</p>
<div class="accrodion-list reply__list__answer">
<button class="accordion-btn reply__list__answer__btn"><span>サイトより回答</span><p class="mark"></p></button>
<div class="accordion__content reply__list__answer__content">
<p class="reply__list__answer__date">回答日時:{{Contact.reply_date|date_day}}</p>
<p class="reply__list__answer__detail">
{{ Contact.reply|raw|nl2br }}
</p>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="ec-modal">
<div class="ec-modal-overlay">
<div class="ec-modal-wrap">
<div class="ec-modal-box">
<div class="ec-role">
<div class="ec-modal-icon">
<img src="{{ asset('assets/img/icon/icon_cart.png', 'user_data') }}" alt="">
</div>
</div>
</div>
<div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
</div>
</div>
</div>
<div class="ec-pagerRole">
{% include "pager.twig" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}