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

Open in your IDE?
  1. {% block javascript %}
  2.     <script src="{{ asset('EventCalendar42/assets/js/jquery.balloon.js', 'plugin') }}"></script>
  3.     <script type="text/javascript">
  4.     $ (function(){
  5.         $('li.ahref').balloon();
  6.     });
  7.     </script>
  8. {% endblock javascript %}
  9. {% block stylesheet %}
  10. <link rel="stylesheet" href="{{ asset('EventCalendar42/assets/css/contents.css', 'plugin') }}">
  11. {% endblock stylesheet %}
  12. {% block main %}
  13. <div class="block_outer">
  14.     <div id="calender_mini_area">
  15.         <div class="block_head flex">
  16.             <h2 class="illust-title"><img src="{{ asset( 'EventCalendar42/assets/img/title/deco_calender.png' , 'plugin') }}" alt="各種研修会などのご案内" class="aligncenter">各種研修会のご案内</h2>
  17.             <a href="{{url('event_index')}}" class="detail-link">詳細</a>
  18.         </div>
  19.         <div class="block_body">
  20.             <table id="this-month-table">
  21.                 <caption class="month">{{ ThisMonthTitle }}</caption>
  22.                 <tr class="table-thead">
  23.                     <th class="ec-calendar__sun sun">{{ '日'|trans }}</th>
  24.                     <th class="ec-calendar__mon">{{ '月'|trans }}</th>
  25.                     <th class="ec-calendar__tue">{{ '火'|trans }}</th>
  26.                     <th class="ec-calendar__wed">{{ '水'|trans }}</th>
  27.                     <th class="ec-calendar__thu">{{ '木'|trans }}</th>
  28.                     <th class="ec-calendar__fri">{{ '金'|trans }}</th>
  29.                     <th class="ec-calendar__sat sat">{{ '土'|trans }}</th>
  30.                 </tr>
  31.                 <tr>
  32.                     {% for day in ThisMonthCalendar %}
  33.                         {% if day.today == 1 %}
  34.                             <td class="today">
  35.                         {% else %}
  36.                             {% if day.holiday or day.baseholiday %}{# 定休日カレンダー設定で休日または基本設定で休日 #}
  37.                                 {% if day.events %}
  38.                                     {% set holidayFlg = false  %}
  39.                                     {% for event in day.events %}
  40.                                         {% if event.is_active and event.type == 2 %}{# 公開状態かつイベント種別が営業 #}
  41.                                             {% set holidayFlg = true %}
  42.                                         {% endif %}
  43.                                     {% endfor %}
  44.                                     {% if holidayFlg %}{# イベント種別が営業 #}
  45.                                         <td class="ec-calendar__day">
  46.                                     {% else %}
  47.                                         <td class="off">
  48.                                     {% endif %}
  49.                                 {% else %}
  50.                                     <td class="off">
  51.                                 {% endif %}
  52.                             {% else %}
  53.                                 {% if day.events %}
  54.                                     {% set holidayFlg = false  %}
  55.                                     {% for event in day.events %}
  56.                                         {% if event.is_active and event.type == 1 %}{# 公開状態かつイベント種別が休暇 #}
  57.                                             {% set holidayFlg = true %}
  58.                                         {% endif %}
  59.                                     {% endfor %}
  60.                                     {% if holidayFlg %}{# イベント種別が休暇 #}
  61.                                         <td class="off">
  62.                                     {% else %}
  63.                                         <td class="ec-calendar__day">
  64.                                     {% endif %}
  65.                                 {% else %}
  66.                                     <td class="ec-calendar__day">
  67.                                 {% endif %}
  68.                             {% endif %}
  69.                         {% endif %}
  70.                                     {# 日付 #}
  71.                                     {{ day.day }}
  72.                                     {# イベント #}
  73.                                     {% if day.events %}
  74.                                     <ul class="event_icon">
  75.                                         {% for event in day.events %}
  76.                                         {% if event.is_active %}
  77.                                         <li class="ahref" title="{{event.title}}">
  78.                                             <img src="{{ asset( event.icon|event_icon , 'plugin') }}" alt="{{event.title}}" width="10px" />
  79.                                         </li>
  80.                                         {% endif %}
  81.                                         {% endfor %}
  82.                                     </ul>
  83.                                     {% endif %}
  84.                                 </td>
  85.                             {% if loop.index % 7 == 0 and loop.index != ThisMonthCalendar|length %}
  86.                                 </tr><tr>
  87.                             {% endif %}
  88.                     {% endfor %}
  89.                 </tr>
  90.             </table>
  91.             <p class="information">※赤字は休業日です</p>
  92.         </div>
  93.     </div>
  94. </div>
  95. {% endblock %}