app/template/default/Block/calendar.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. {#{% form_theme form 'Form/form_div_layout.twig' %}#}
  9. <br><br>
  10. <section id="calendar_wrap" class="">
  11.     <div>
  12.         <div class="section_title">
  13.             <span>営業カレンダー</span>
  14.             <div class="fs-6 text-dark fw-normal">{{ '* 赤字は休業日です。'|trans }}</div>
  15.         </div>
  16.         <div class="ec-calendar d-flex justify-content-center">
  17.             <table id="this-month-table" class="col-4 mx-3">
  18.                 <tr>
  19.                     <th id="this-month-title" colspan="7" class="ec-calendar__title">{{ ThisMonthTitle }}</th>
  20.                 </tr>
  21.                 <tr>
  22.                     <th class="text-center ec-calendar__sun">{{ '日'|trans }}</th>
  23.                     <th class="text-center ec-calendar__mon">{{ '月'|trans }}</th>
  24.                     <th class="text-center ec-calendar__tue">{{ '火'|trans }}</th>
  25.                     <th class="text-center ec-calendar__wed">{{ '水'|trans }}</th>
  26.                     <th class="text-center ec-calendar__thu">{{ '木'|trans }}</th>
  27.                     <th class="text-center ec-calendar__fri">{{ '金'|trans }}</th>
  28.                     <th class="text-center ec-calendar__sat">{{ '土'|trans }}</th>
  29.                 </tr>
  30.                 <tr>
  31.                     {% for day in ThisMonthCalendar %}
  32.                         {% if day.today == 1 and day.holiday == 1 %}
  33.                             <td id="today-and-holiday" class="text-end p-3 ec-calendar__today ec-calendar__holiday">{{ day.day }}</td>
  34.                         {% elseif day.today == 1 and day.holiday == 0 %}
  35.                             <td id="today" class="text-center p-3 ec-calendar__today">{{ day.day }}</td>
  36.                         {% elseif day.today == 0 and day.holiday == 1 %}
  37.                             <td id="this-month-holiday-{{ day.day }}" class="text-center p-3 ec-calendar__holiday">{{ day.day }}</td>
  38.                         {# 土日は定休日表示にしています。不要な場合は削除して下さい。ここから #}
  39.                         {# {% elseif day.dayOfWeek == 'Sun' or day.dayOfWeek == 'Sat' %} #}
  40.                         {% elseif day.dayOfWeek == 'Thu' %}
  41.                             <td id="this-month-holiday-{{ day.day }}" class="text-end p-3 ec-calendar__holiday">{{ day.day }}</td>
  42.                         {# 土日は定休日表示にしています。不要な場合は削除して下さい。ここまで #}
  43.                         {% else %}
  44.                             <td class="text-end p-3 ec-calendar__day">{{ day.day }}</td>
  45.                         {% endif %}
  46.                         {% if loop.index % 7 == 0 and loop.index != ThisMonthCalendar|length %}
  47.                             </tr><tr>
  48.                         {% endif %}
  49.                     {% endfor %}
  50.                 </tr>
  51.             </table>
  52.             <table id="next-month-table" class="col-4 mx-3">
  53.                 <tr>
  54.                     <th id="next-month-title" colspan="7" class="ec-calendar__title">{{ NextMonthTitle }}</th>
  55.                 </tr>
  56.                 <tr>
  57.                     <th class="text-center ec-calendar__sun">{{ '日'|trans }}</th>
  58.                     <th class="text-center ec-calendar__mon">{{ '月'|trans }}</th>
  59.                     <th class="text-center ec-calendar__tue">{{ '火'|trans }}</th>
  60.                     <th class="text-center ec-calendar__wed">{{ '水'|trans }}</th>
  61.                     <th class="text-center ec-calendar__thu">{{ '木'|trans }}</th>
  62.                     <th class="text-center ec-calendar__fri">{{ '金'|trans }}</th>
  63.                     <th class="text-center ec-calendar__sat">{{ '土'|trans }}</th>
  64.                 </tr>
  65.                 <tr>
  66.                     {% for day in NextMonthCalendar %}
  67.                         {% if day.holiday == 1 %}
  68.                             <td id="next-month-holiday-{{ day.day }}" class="text-end p-3 ec-calendar__holiday">{{ day.day }}</td>
  69.                         {# 土日は定休日表示にしています。不要な場合は削除して下さい。ここから #}
  70.                         {# {% elseif day.dayOfWeek == 'Sun' or day.dayOfWeek == 'Sat' %} #}
  71.                         {% elseif day.dayOfWeek == 'Thu' %}
  72.                             <td id="next-month-holiday-{{ day.day }}" class="text-end p-3 ec-calendar__holiday">{{ day.day }}</td>
  73.                         {# 土日は定休日表示にしています。不要な場合は削除して下さい。ここまで #}
  74.                         {% else %}
  75.                             <td class="text-end p-3 ec-calendar__day">{{ day.day }}</td>
  76.                         {% endif %}
  77.                         {% if loop.index % 7 == 0 and loop.index != NextMonthCalendar|length %}
  78.                             </tr><tr>
  79.                         {% endif %}
  80.                     {% endfor %}
  81.                 </tr>
  82.             </table>
  83.         </div>
  84.     </div>
  85. </section>