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