{% extends "calendar/_base.html" %}

{% from "macros/box.html" import m_box_menu, m_box_content %}

{% block content %}
  {% call m_box_content(_("Upcoming events")) %}
    {% for group in groups %}
      <h3>{{ group[0]|dateformat("MMMM YYY")|capitalize }}</h3>

      <ul>
        {% for event in group[1] %}
          <li>{{ event.start | dateformat }}: <a href="{{ url_for(event) }}">{{ event.title }}</a></li>
        {% endfor %}
      </ul>
    {% else %}
      <p>{{ _("There are no upcoming events on this calendar yet.") }}</p>
    {% endfor %}

    <p>
      [<a href="{{ url_for(".archives", community_id=g.community.slug) }}">Archives</a>]
    </p>
  {% endcall %}
{% endblock %}
