app/Plugin/CourcesManagerPlugin/Resource/template/default/detail.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'course_page' %}
  10. {% block stylesheet %}
  11.     <style>
  12.     </style>
  13. {% endblock %}
  14. {% block javascript %}
  15.     <script>
  16.     </script>
  17. {% endblock javascript %}
  18. {% block main %}
  19.     <section class="detail_wrap">
  20.         <div class="detail_title">
  21.             <span>{{ course.name }}</span>
  22.         </div>
  23.         <div class="detail_car_type">
  24.             {{ course.car_type|nl2br }}
  25.         </div>
  26.         {% if course.description %}
  27.             <div class="detail_description">
  28.                 {{ course.description|nl2br }}
  29.             </div>
  30.         {% endif %}
  31.         {% if course.image_before1 or course.image_before2 %}
  32.             <div class="detail_image detail_image_before d-flex justify-content-center">
  33.                 {% if course.image_before1 and course.image_before2 %}
  34.                     <img src="{{ eccube_config.course_image_dir_default }}{{ course.image_before1 }}" width="100%" alt="{{ course.name ~ '画像1'}}">
  35.                     <img src="{{ eccube_config.course_image_dir_default }}{{ course.image_before2 }}" width="100%" alt="{{ course.name ~ '画像2'}}">
  36.                 {% else %}
  37.                     {% if course.image_before1 %}
  38.                         <img src="{{ eccube_config.course_image_dir_default }}{{ course.image_before1 }}" width="100%" alt="{{ course.name ~ '画像1'}}">
  39.                     {% elseif course.image_before2 %}
  40.                         <img src="{{ eccube_config.course_image_dir_default }}{{ course.image_before2 }}" width="100%" alt="{{ course.name ~ '画像2'}}">
  41.                     {% endif %}
  42.                 {% endif %}
  43.             </div>
  44.         {% endif %}
  45.         {% if course.map %}
  46.             <div class="mx-auto">
  47.                 <div class="item_title"><span>コース情報</span></div>
  48.                 <div class="item_table">
  49.                     <table class="table table-bordered table-striped">
  50.                         {% if course.length %}
  51.                             <tr>
  52.                                 <th class="">全長</th>
  53.                                 <td class="text-end">{{ course.length }} m</td>
  54.                             </tr>
  55.                         {% endif %}
  56.                         {% if course.straight %}
  57.                             <tr>
  58.                                 <th class="">最大直線長</th>
  59.                                 <td class="text-end">{{ course.straight }} m</td>
  60.                             </tr>
  61.                         {% endif %}
  62.                         {% if course.height is not null %}
  63.                             <tr>
  64.                                 <th class="">高低差</th>
  65.                                 <td class="text-end">{{ course.height }} m</td>
  66.                             </tr>
  67.                         {% endif %}
  68.                         {% if course.width %}
  69.                             <tr>
  70.                                 <th class="">走行路幅員</th>
  71.                                 <td class="text-end">{{ course.width }}</td>
  72.                             </tr>
  73.                         {% endif %}
  74.                     </table>
  75.                 </div>
  76.                 <img src="{{ eccube_config.course_image_dir_default }}{{ course.map }}" alt="{{ course.name ~ 'コース図'}}" width="100%">
  77.             </div>
  78.         {% endif %}
  79.         
  80.         {% if course.license %}
  81.             <div class="item_comment">
  82.                 <div class="item_title"><span>必要ライセンス</span></div>
  83.                 <div class="">走行には、有効期限内の下記ライセンスの提示が必要です。</div>
  84.                 <div class="text-center my-4 text-danger">
  85.                     <div class="">{{ course.license }}</div>
  86.                 </div>
  87.             </div>
  88.         {% endif %}
  89.         {% if course.fee1 %}
  90.             <div class="fee_wrap">
  91.                 <div class="item_title"><span>走行料金</span></div>
  92.                 <div class="mb-4">
  93.                     {% if course.fee1_title %}
  94.                         <div class="fee_title"><span>{{ course.fee1_title }}</span></div>
  95.                     {% endif %}
  96.                     <table class="table">
  97.                         {{ course.fee1|raw }}
  98.                     </table>
  99.                 </div>
  100.                 {% if course.fee2 %}
  101.                     <div class="mb-4">
  102.                         <table class="table">
  103.                             {{ course.fee2|raw }}
  104.                         </table>
  105.                     </div>
  106.                 {% endif %}
  107.             </div>
  108.         {% endif %}
  109.         {% if course.comment1 or course.comment2 or course.comment3 %}
  110.             <div class="item_comment">
  111.                 <div class="item_title"><span>注意事項</span></div>
  112.                 <div class="item_comment_data">
  113.                     {% if course.comment1 %}
  114.                         <div class="">・{{ course.comment1 }}</div>
  115.                     {% endif %}
  116.                     {% if course.comment2 %}
  117.                         <div class="">・{{ course.comment2 }}</div>
  118.                     {% endif %}
  119.                     {% if course.comment3 %}
  120.                         <div class="">・{{ course.comment3 }}</div>
  121.                     {% endif %}
  122.                 </div>
  123.             </div>
  124.         {% endif %}
  125.         <div class="product_list">
  126.             <div class="item_title"><span>関連商品</span></div>
  127.             <div class="ec-newItemRole">
  128.                 <div class="top_sales_ticket">
  129.                     {% for Product in ticket %}
  130.                         <div class="top_sales_listItem">
  131.                             <a href="{{ url('product_detail', {'id': Product.id}) }}">
  132.                                 <div class="img_wrap">
  133.                                     <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  134.                                 </div>
  135.                                 <p class="ec-newItemRole__listItemTitle">{{ Product.name }}</p>
  136.                                 <p class="ec-newItemRole__listItemPrice">
  137.                                 {% if Product.hasProductClass %}
  138.                                     {% if Product.getPrice02Min == Product.getPrice02Max %}
  139.                                         {{ Product.getPrice02IncTaxMin|price }}
  140.                                     {% else %}
  141.                                         {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  142.                                     {% endif %}
  143.                                 {% else %}
  144.                                     {{ Product.getPrice02IncTaxMin|price }}
  145.                                 {% endif %}
  146.                                 {{ '(税込)'|trans }}</p>
  147.                             </a>
  148.                         </div>
  149.                     {% endfor %}
  150.                 </div>
  151.                 <div class="top_sales_driver">
  152.                     {% for Product in drives %}
  153.                         <div class="top_sales_listItem">
  154.                             <a href="{{ url('product_detail', {'id': Product.id}) }}">
  155.                                 <div class="img_wrap">
  156.                                     <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" width="100%" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  157.                                 </div>
  158.                                 <p class="ec-newItemRole__listItemTitle">{{ Product.name }}</p>
  159.                                 <p class="ec-newItemRole__listItemPrice">
  160.                                 {% if Product.hasProductClass %}
  161.                                     {% if Product.getPrice02Min == Product.getPrice02Max %}
  162.                                         {{ Product.getPrice02IncTaxMin|price }}
  163.                                     {% else %}
  164.                                         {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  165.                                     {% endif %}
  166.                                 {% else %}
  167.                                     {{ Product.getPrice02IncTaxMin|price }}
  168.                                 {% endif %}
  169.                                 {{ '(税込)'|trans }}</p>
  170.                             </a>
  171.                         </div>
  172.                     {% endfor %}
  173.                 </div>
  174.             </div>
  175.         </div>
  176.     </section>
  177. {% endblock %}