{% load wagtailcore_tags joyous_tags i18n %}
<table class="minicalendar">
  <thead>
    <tr class="heading">
      <th colspan="7" class="month">
        <span class="month-heading">
          <div class="month-name">{{ monthName }}</div>
          <div class="year-number">{{ year }}</div>
        </span>
        {% if calendarUrl %}
        <span class="month-nav">
          <a class="minicalPrev" title="{% trans 'Previous month' %}" href="javascript:void(0)">&lt;</a>
          <a class="minicalNext" title="{% trans 'Next month' %}" href="javascript:void(0)">&gt;</a>
        </span>
        {% endif %}
      </th>
    </tr>
    {% block day_heading %}
    <tr>
      {% for dow, dowName in weekdayInfo %}
      <th title="{{dowName}}" class="{{dow|lower}}">{{dowName|slice:":1"}}</th>
      {% endfor %}
    </tr>
    {% endblock day_heading %}
  </thead>
  {% block minical_body %}
  <tbody>
    {% for week in events %}
    <tr>
      {% for evod in week %}
        {% include "joyous/includes/minicalendar_day.html" %}
      {% endfor %}
    </tr>
    {% endfor %}
  </tbody>
  {% endblock minical_body %}
</table>
