{% block javascript %}
<script src="{{ asset('EventCalendar42/assets/js/jquery.balloon.js', 'plugin') }}"></script>
<script type="text/javascript">
$ (function(){
$('li.ahref').balloon();
});
</script>
{% endblock javascript %}
{% block stylesheet %}
<link rel="stylesheet" href="{{ asset('EventCalendar42/assets/css/contents.css', 'plugin') }}">
{% endblock stylesheet %}
{% block main %}
<div class="block_outer">
<div id="calender_mini_area">
<div class="block_head flex">
<h2 class="illust-title"><img src="{{ asset( 'EventCalendar42/assets/img/title/deco_calender.png' , 'plugin') }}" alt="各種研修会などのご案内" class="aligncenter">各種研修会のご案内</h2>
<a href="{{url('event_index')}}" class="detail-link">詳細</a>
</div>
<div class="block_body">
<table id="this-month-table">
<caption class="month">{{ ThisMonthTitle }}</caption>
<tr class="table-thead">
<th class="ec-calendar__sun sun">{{ '日'|trans }}</th>
<th class="ec-calendar__mon">{{ '月'|trans }}</th>
<th class="ec-calendar__tue">{{ '火'|trans }}</th>
<th class="ec-calendar__wed">{{ '水'|trans }}</th>
<th class="ec-calendar__thu">{{ '木'|trans }}</th>
<th class="ec-calendar__fri">{{ '金'|trans }}</th>
<th class="ec-calendar__sat sat">{{ '土'|trans }}</th>
</tr>
<tr>
{% for day in ThisMonthCalendar %}
{% if day.today == 1 %}
<td class="today">
{% else %}
{% if day.holiday or day.baseholiday %}{# 定休日カレンダー設定で休日または基本設定で休日 #}
{% if day.events %}
{% set holidayFlg = false %}
{% for event in day.events %}
{% if event.is_active and event.type == 2 %}{# 公開状態かつイベント種別が営業 #}
{% set holidayFlg = true %}
{% endif %}
{% endfor %}
{% if holidayFlg %}{# イベント種別が営業 #}
<td class="ec-calendar__day">
{% else %}
<td class="off">
{% endif %}
{% else %}
<td class="off">
{% endif %}
{% else %}
{% if day.events %}
{% set holidayFlg = false %}
{% for event in day.events %}
{% if event.is_active and event.type == 1 %}{# 公開状態かつイベント種別が休暇 #}
{% set holidayFlg = true %}
{% endif %}
{% endfor %}
{% if holidayFlg %}{# イベント種別が休暇 #}
<td class="off">
{% else %}
<td class="ec-calendar__day">
{% endif %}
{% else %}
<td class="ec-calendar__day">
{% endif %}
{% endif %}
{% endif %}
{# 日付 #}
{{ day.day }}
{# イベント #}
{% if day.events %}
<ul class="event_icon">
{% for event in day.events %}
{% if event.is_active %}
<li class="ahref" title="{{event.title}}">
<img src="{{ asset( event.icon|event_icon , 'plugin') }}" alt="{{event.title}}" width="10px" />
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</td>
{% if loop.index % 7 == 0 and loop.index != ThisMonthCalendar|length %}
</tr><tr>
{% endif %}
{% endfor %}
</tr>
</table>
<p class="information">※赤字は休業日です</p>
</div>
</div>
</div>
{% endblock %}