{% extends "./basepage_item.html" %}
{% load i18n humanize %}

{% block title %}
{% if not object.is_published and object.program.is_published %}
    <a href="{{ object.program.get_absolute_url }}">
        {{ object.program.title }}
    </a>
{% else %}
    {{ block.super }}
{% endif %}
{% endblock %}

{% block class %}
{% if object.is_now %}is-active{% endif %}
{% endblock %}

{% block subtitle %}
{% if diffusion %}
    {{ diffusion.start|naturalday }},
    {{ diffusion.start|date:"g:i" }}
{% else %}
    {{ block.super }}
{% endif %}
{% endblock %}


{% block content %}
{% if not object.content %}
    {% with object.parent.content as content %}
    {{ block.super }}
    {% endwith %}
{% else %}
    {{ block.super }}
{% endif %}
{% endblock %}
