{% extends "base/base.html.twig" %}


{% block content %}
    {% if (block.type == '4-col') %}
        {% set class =  ' d-col--12--desktop' %}
    {% elseif (block.type == '3-col') %}
        {% set class =  ' d-col--9--desktop' %}
    {% elseif (block.type == '2-col') %}
        {% set class =  ' d-col--6--desktop' %}
    {% elseif (block.type == '1-col') %}
        {% set class =  ' d-col--3--desktop' %}
    {% endif %}

    <div class="d-col d-col--12 {{ class }}">
        <div class="d-calendar d-widget">
            <h3 class="d-title">
                {% if block.data.title is empty %}
                    {{ Lang_translate('_DASHBOARDBLOCKCALENDARLMS','dashboard') }}
                {% else %}
                    {{ block.data.title }}
                {% endif %}
            </h3>
            <div class="d-calendar__item js-dashboard-calendar"
                 data-action="{{ block.enabledActions | join(',') }}"></div>
        </div>
    </div>
    <script>
        window.dashboardCalendarAjaxUrl = '{{ block.ajaxUrl }}';
        window.dashboardCalendarAjaxSignature = '{{ block.postData.signature }}';
        window.dashboardCalendarAjaxPostData = '{{ block.postData.block }}';
    </script>

{% endblock %}
