app/template/default/Block/search_detail.twig line 1

Open in your IDE?
  1. {#
  2. * Plugin Name : SearchPlus
  3. *
  4. * Copyright (C) BraTech Co., Ltd. All Rights Reserved.
  5. * http://www.bratech.co.jp/
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. #}
  10. {% form_theme form 'Form/form_div_layout.twig' %}
  11. {% block stylesheet %}
  12. <style>
  13. .datepicker-days th.dow:first-child,
  14. .datepicker-days td:first-child {
  15.     color: #f00;
  16. }
  17. .datepicker-days th.dow:last-child,
  18. .datepicker-days td:last-child {
  19.     color: #00f;
  20. }
  21. .ec-searchDetailRole select {
  22.     width: 100%;
  23. }
  24. .ec-inputRange input + span,
  25. .ec-inputRange input {
  26.     display: inline-block;
  27.     margin-left: 2%;
  28. }
  29. .ec-inputRange input:first-child {
  30.     margin-left: 0;
  31. }
  32. .ec-inputRange input {
  33.     width: 45%;
  34. }
  35. .ec-checkbox-item {
  36.     display: inline-block;
  37.     margin-right: 3%;
  38. }
  39. .ec-layoutRole__left dl,
  40. .ec-layoutRole__right dl,
  41. .ec-layoutRole__left dt,
  42. .ec-layoutRole__right dt,
  43. .ec-layoutRole__left dd,
  44. .ec-layoutRole__right dd {
  45.     display: block;
  46.     width: 100%;
  47. }
  48. .ec-layoutRole__left .ec-inputRange input,
  49. .ec-layoutRole__right .ec-inputRange input {
  50.     width: 85%;
  51.     margin-left: 0;
  52. }
  53. .ec-searchDetail__toggleArea,
  54. .ec-layoutRole__left .ec-searchDetai__togglelBtn,
  55. .ec-layoutRole__right .ec-searchDetai__togglelBtn {
  56.     display: none;
  57. }
  58. .ec-layoutRole__left .ec-searchDetail__toggleArea,
  59. .ec-layoutRole__right .ec-searchDetail__toggleArea {
  60.     display: block;
  61. }
  62. .ec-searchDetai__togglelBtn {
  63.     text-align: center;
  64.     margin: 20px 0;
  65. }
  66. .ec-searchDetai__togglelBtn span {
  67.     cursor: pointer;
  68. }
  69. .ec-searchDetailClose {
  70.     display: inline-block;
  71. }
  72. .ec-searchDetailCloseBtn {
  73.     display: inline-block;
  74.     border-radius: 50%;
  75.     width: 20px;
  76.     height: 20px;
  77.     color: #fff;
  78.     text-align: center;
  79.     background: #000;
  80. }
  81. .ec-searchDetai__togglelBtn:hover i {
  82.     color: #fff;
  83. }
  84. .is_active + .ec-searchDetai__togglelBtn i {
  85.     transform: rotate(180deg) translateY(1px);
  86. }
  87. </style>
  88. {% endblock %}
  89. {% block javascript %}
  90. <script>
  91. $(function() {
  92.     //デフォルトのデイトタイムピッカーが存在しない場合
  93.     if ($('[type="date"]').prop('type') !== 'date') {
  94.         $.getScript("{{ asset('assets/js/vendor/moment.min.js', 'admin') }}").done(function() {
  95.             $.getScript("{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}").done(function() {
  96.                 $.getScript("{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}").done(function() {
  97.                     $('input[type=date]').datetimepicker({
  98.                         locale: '{{ eccube_config.locale }}',
  99.                         format: 'YYYY-MM-DD',
  100.                         useCurrent: false,
  101.                         buttons: {
  102.                             showToday: true,
  103.                             showClose: true
  104.                         }
  105.                     });
  106.                 });
  107.             });
  108.         });
  109.     }
  110. });
  111. $(function() {
  112.     var toggleArea = $('.ec-searchDetail__toggleArea');
  113.     var toggleBtn = $('.ec-searchDetai__togglelBtn span');
  114.     $(toggleBtn).on("click",function($){
  115.         toggleArea.slideToggle().toggleClass('is_active');
  116.     });
  117. });
  118. </script>
  119. {% endblock %}
  120. <div class="ec-contactRole mb20" id="search_detail">
  121.     <div class="ec-searchDetailRole ec-para-normal">
  122.         <div class="ec-off1Grid">
  123.             <div class="ec-off1Grid__cell">
  124.                 <form method="get" class="searchform" action="{{ path('product_list') }}">
  125.                     <div class="ec-borderedDefs">
  126.                                               <!-- 斎藤 dl>
  127.                                 <dt>{{ 'searchplus.block.search_keyword'|trans }}</dt>
  128.                                 <dd>
  129.                                     <div class="ec-input">
  130.                                     {#{ form_widget(form.name, {'id': null, 'attr': {'placeholder' : 'searchplus.block.placeholder.keyword'|trans }} ) }#}
  131.                                     </div>
  132.                                 </dd>
  133.                         </dl -->
  134.                         <div class="ec-searchDetail__toggleArea">
  135.                             <div class="mb10">
  136.                             <dl>
  137.                                 <dt>{{ 'searchplus.block.search_keyword'|trans }}</dt>
  138.                                 <dd>
  139.                                     <div class="ec-input">
  140.                                     {{ form_widget(form.name, {'id': null, 'attr': {'placeholder' : 'searchplus.block.placeholder.keyword'|trans }} ) }}
  141.                                     </div>
  142.                                 </dd>
  143.                             </dl>
  144.                             <dl>
  145.                                 <dt>{{ 'searchplus.block.search_category'|trans }}</dt>
  146.                                 <dd>
  147.                                     <div class="ec-select ec-select_search">
  148.                                         {{ form_widget(form.category_id, {'id': null, 'attr': {'class': 'category_id'}}) }}
  149.                                     </div>
  150.                                 </dd>
  151.                             </dl>
  152.                             {% if form.maker_id is defined %}
  153.                             <dl>
  154.                                 <dt>{{ 'maker.admin.maker'|trans }}</dt>
  155.                                 <dd>
  156.                                     <div class="ec-checkbox">
  157.                                         <div id="maker_id">
  158.                                         {% for choice in form.maker_id.vars.choices %}
  159.                                             <div class="ec-checkbox-item">
  160.                                                 <input id="maker_id_{{loop.index}}" type="checkbox" value="{{ choice.value }}" name="{{ form.maker_id.vars.full_name }}[]" {% for data in form.maker_id.vars.data %}{% if data.id == choice.value %}checked="checked"{% endif %}{% endfor %}>
  161.                                                 <label for="maker_id_{{loop.index}}"><span>{{ choice.label }}</span></label>
  162.                                             </div>
  163.                                         {% endfor %}
  164.                                         </div>
  165.                                     </div>
  166.                                 </dd>
  167.                             </dl>
  168.                             {% endif %}
  169.                             <!-- 斎藤 コメントアウト dl>
  170.                                 <dt>{{ 'searchplus.block.search_price'|trans }}</dt>
  171.                                 <dd>
  172.                                     <div class="ec-halfInput ec-inputRange">
  173.                                     {{ form_widget(form.pmin, {'attr': {'placeholder' : '¥' }}) }}<span>~</span>{{ form_widget(form.pmax, {'attr': {'placeholder' : '¥' }}) }}
  174.                                     </div>
  175.                                 </dd>
  176.                             </dl -->
  177.                             <dl>
  178.                                 <dt>{{ 'searchplus.block.search_tag'|trans }}</dt>
  179.                                 <dd>
  180.                                     <div class="ec-checkbox">
  181.                                         <div id="tag_id">
  182.                                         {% for choice in form.tag_id.vars.choices %}
  183.                                             <div class="ec-checkbox-item">
  184.                                                 <input id="tag_id_{{loop.index}}" type="checkbox" value="{{ choice.value }}" name="{{ form.tag_id.vars.full_name }}[]" {% for data in form.tag_id.vars.data %}{% if data.id == choice.value %}checked="checked"{% endif %}{% endfor %}>
  185.                                                 <label for="tag_id_{{loop.index}}"><span>{{ choice.label }}</span></label>
  186.                                             </div>
  187.                                         {% endfor %}
  188.                                         </div>
  189.                                     </div>
  190.                                 </dd>
  191.                             </dl>
  192.                             <dl>
  193.                                 <dt>{{ 'searchplus.block.search_instock'|trans }}</dt>
  194.                                 <dd>
  195.                                     <div class="ec-checkbox">
  196.                                     {{ form_widget(form.instock) }}
  197.                                     </div>
  198.                                 </dd>
  199.                             </dl>
  200.                             {% if ProductItems is defined %}
  201.                             {% for ProductItem in ProductItems %}
  202.                                 {% set name = 'productplus_' ~ ProductItem.id %}
  203.                                     {% if  ProductItem.input_type == constant('Plugin\\ProductPlus\\Entity\\ProductItem::IMAGE_TYPE') %}
  204.                                     {% elseif  ProductItem.input_type == constant('Plugin\\ProductPlus\\Entity\\ProductItem::DATE_TYPE') %}
  205.                                         {% set name_start = 'productplus_' ~ ProductItem.id ~ '_date_start' %}
  206.                                         {% set name_end = 'productplus_' ~ ProductItem.id ~ '_date_end' %}
  207.                                         <dl>
  208.                                             <dt>{{ ProductItem.name }}</dt>
  209.                                             <dd>
  210.                                                 <div class="ec-halfInput ec-inputRange">
  211.                                                 {{ form_widget(form[name_start]) }}<span>~</span>{{ form_widget(form[name_end]) }}
  212.                                                 </div>
  213.                                             </dd>
  214.                                         </dl>
  215.                                     {% elseif  ProductItem.input_type >= constant('Plugin\\ProductPlus\\Entity\\ProductItem::SELECT_TYPE') %}
  216.                                     <dl>
  217.                                         <dt>{{ form[name].vars.label }}</dt>
  218.                                         <dd>
  219.                                             <div class="ec-checkbox">
  220.                                                 <div id="{{ name }}">
  221.                                                 {% for choice in form[name].vars.choices %}
  222.                                                     <div class="ec-checkbox-item">
  223.                                                         <input id="{{ name }}_{{loop.index}}" type="checkbox" value="{{ choice.value }}" name="{{ form[name].vars.full_name }}[]" {% if choice.value in form[name].vars.data %}checked="checked"{% endif %}>
  224.                                                         <label for="{{ name }}_{{loop.index}}"><span>{{ choice.label }}</span></label>
  225.                                                     </div>
  226.                                                 {% endfor %}
  227.                                                 </div>
  228.                                             </div>
  229.                                         </dd>
  230.                                     </dl>
  231.                                     {% else %}
  232.                                     <dl>
  233.                                         <dt>{{ form[name].vars.label }}</dt>
  234.                                         <dd>
  235.                                             <div class="ec-input">
  236.                                             {{ form_widget(form[name]) }}
  237.                                             </div>
  238.                                         </dd>
  239.                                     </dl>
  240.                                     {% endif %}
  241.                             {% endfor %}
  242.                             {% endif %}
  243.                             </div>
  244.                             
  245.                             
  246.                     <div class="ec-off4Grid search_detailBtn mb20">
  247.                         <div class="ec-off4Grid__cell">
  248.                             <button type="submit" class="ec-blockBtn--cancel">{{ 'searchplus.block.search_button'|trans }}</button>
  249.                         </div>
  250.                     </div>
  251.                         </div>
  252.                         <div class="ec-searchDetai__togglelBtn">
  253.                             <span>
  254.                                 {{ 'searchplus.block.detail.title'|trans }}
  255.                                 <div class="ec-searchDetailClose">
  256.                                     <a class="ec-searchDetailCloseBtn">
  257.                                         <i class="fas fa-angle-down"></i>
  258.                                     </a>
  259.                                 </div>
  260.                             </span>
  261.                         </div>
  262.                     </div>
  263. <!--
  264.                     <div class="ec-off4Grid">
  265.                         <div class="ec-off4Grid__cell">
  266.                             <button type="submit" class="ec-blockBtn--cancel">{{ 'searchplus.block.search_button'|trans }}</button>
  267.                         </div>
  268.                     </div>
  269. -->
  270.                 </form>
  271.             </div>
  272.         </div>
  273.     </div>
  274. </div>