{% 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|is_joanie_product %}
                <div
                  class="richie-react richie-react--course-product-item"
                  data-props='{% joanie_product_widget_props %}'
                ></div>
            {% else %}
                    {% if run.title %}<h3>{{ run.title|capfirst }}</h3>{% endif %}
                    <dl content="online" property="courseMode">
                        <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 content="{{ run.start|date:'Y-m-d' }}" property="startDate" />
                        {% endif %}
                        {% if run.end %}
                        <meta content="{{ run.end|date:'Y-m-d' }}" property="endDate" />
                        {% 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>
                {% if run|has_connected_lms %}
                    <div
                        class="richie-react richie-react--course-run-enrollment"
                        data-props="{% course_enrollment_widget_props %}"
                    ></div>
                {% else %}
                    <a class="course-run-enrollment__cta" href="{{ run.resource_link }}">
                        {{ run.state.call_to_action|capfirst }}
                    </a>
                {% endif %}
            {% endif %}
        {% endrender_model_block %}
    </div>
{% endif %}
{% endspaceless %}
