{% extends "joyous/exception_base.html" %}
{% load wagtailcore_tags wagtailimages_tags i18n %}

{% block event_status %}
  <div class="joy-ev-status">{% if page.status %}
    {{ page.status_text }}
  {% else %}
    {% blocktrans with what=page.what|lower %}This event has been {{ what }}.{% endblocktrans %}
  {% endif %}</div>
{% endblock event_status %}

{% block event_title %}
  <div class="joy-title joy-title--page">
{% if page.cancellation_title %}
    <h1>{{ page.cancellation_title }}</h1>
{% else %}
    <h1>{{ overrides.title }}</h1>
{% endif %}
  </div>
{% endblock event_title %}

{% block event_when %}
  <div class="joy-ev-when joy-field">
    {{ page.cancellationpage.when }}
  </div>

  <div class="joy-ev-to-when joy-field">{% pageurl page as postponement_url %}
    {% blocktrans with what=page.what postponed_to=page.when %}{{ what }} to <a class="joy-ev-to-when__link" href="{{ postponement_url }}" >{{ postponed_to }}</a>{% endblocktrans %}
  </div>
{% endblock event_when %}

{% block event_image %}{% if overrides.image %}
<div class="joy-img">
  {% image overrides.image width-350 class="joy-img__img" %}
</div>
{% endif %}{% endblock event_image %}

{% block event_details %}<div class="joy-ev-details joy-field">
  {{ page.cancellation_details|richtext }}
</div>{% endblock event_details %}
