{% extends 'rb/emails/base_email.txt' %}

{% block subject -%}{% trans %}Confirm room blockings{% endtrans %}{%- endblock %}

{% block header_recipient -%}
    {% trans name=owner.first_name -%}Dear {{ name }},{%- endtrans %}
{%- endblock %}

{% block body -%}
{% if blocked_rooms | length > 1 -%}
    {% trans name=blocking.created_by_user.full_name -%}
        {{ name }} has created a blocking for some rooms you manage.
    {%- endtrans %}
{%- else -%}
    {% trans name=blocking.created_by_user.full_name -%}
        {{ name }} has created a blocking for a room you manage.
    {%- endtrans %}
{%- endif %}

{% if blocked_rooms | length == 1 -%}
    {%- trans %}Room:{% endtrans %} {{ blocked_rooms[0].room.full_name }}
{%- else -%}
    {%- trans -%}Rooms:{%- endtrans %}
    {% for blocked_room in blocked_rooms -%}
    {{ blocked_room.room.full_name }}
    {% endfor %}
{%- endif %}
{% trans %}Reason:{% endtrans %} {{ blocking.reason }}
{% trans %}Dates:{% endtrans %} {{ format_interval(blocking.start_date, blocking.end_date, 'yMd') }}

{% trans %}You can approve or reject this blocking request here:{% endtrans %}
{{ blocking.external_details_url }}
{%- endblock %}
