{% load cms_tags i18n extra_tags %}{% spaceless %}
{% if run.is_visible_on_course_page or request.toolbar.edit_mode_active %}
    <div class="course-detail__run-descriptions course-detail__run-descriptions--{{ run.catalog_visibility|lower }}" rel="hasCourseInstance" typeof="CourseInstance">
        {% render_model_block run %}
            {% if run.title %}<h3>{{ run.title|capfirst }}</h3>{% endif %}
            <dl property="courseMode" content="online">
                <dt>{% trans "Enrollment" %}</dt>
                <dd>
                    {% blocktrans with enrollment_start=run.enrollment_start|date:'DATE_FORMAT'|default:'...' enrollment_end=run.enrollment_end|date:'DATE_FORMAT'|default:'...' %}From {{ enrollment_start }} to {{ enrollment_end }}{% endblocktrans %}
                </dd>
                <dt>{% trans "Course" %}</dt>
                {% if run.start %}
                <meta property="startDate" content="{{ run.start|date:'Y-m-d' }}" />
                {% endif %}
                {% if run.end %}
                <meta property="endDate" content="{{ run.end|date:'Y-m-d' }}" />
                {% endif %}
                <dd>
                    {% blocktrans with start=run.start|date:'DATE_FORMAT'|default:'...' end=run.end|date:'DATE_FORMAT'|default:'...' %}From {{ start }} to {{ end }}{% endblocktrans %}
                </dd>
                <dt>{% trans "Languages" %}</dt>
                <dd>{{ run.get_languages_display }}</dd>
            </dl>
        {% endrender_model_block %}
        {% if run|has_connected_lms %}
            <div
                class="richie-react richie-react--course-run-enrollment"
                data-props="{% course_enrollment_widget_props %}"
            ></div>
        {% else %}
            <a href="{{ run.resource_link }}" class="course-run-enrollment__cta">
                {{ run.state.call_to_action|capfirst }}
            </a>
        {% endif %}
    </div>
{% endif %}
{% endspaceless %}
