{% extends "richie/fullwidth.html" %} {% load cms_tags i18n extra_tags static thumbnail %} {% block breadcrumbs %}{% endblock breadcrumbs %} {% block meta_index_rules %} {# Make sure course snapshot pages are not indexed by search engines #} {% if current_page.parent_page.course %} {% else %} {{ block.super }} {% endif %} {% endblock meta_index_rules %} {% block meta_opengraph_contextuals %} {% endblock meta_opengraph_contextuals %} {% block content %}{% spaceless %}
{% with course=current_page.course header_level=2 %}
{% block snapshot %} {% if request.current_page.parent_page.course %}
{% blocktrans with creation_date=request.current_page.creation_date|date:"SHORT_DATE_FORMAT" %} Archived on {{ creation_date }} {% endblocktrans %}
{% trans "Go to current version" %}
{% endif %} {% endblock snapshot %} {% block title %}

{% if request.current_page.parent_page.course %} {{ request.current_page.parent_page.get_title }} {% else %} {% render_model request.current_page "title" %} {% endif %}

{% endblock title %} {% block introduction %} {% if current_page.publisher_is_draft or not current_page|is_empty_placeholder:"course_introduction" %}
{% page_placeholder "course_introduction" current_page %}
{% endif %} {% endblock introduction %} {% block categories %} {% if current_page.publisher_is_draft or not current_page|is_empty_placeholder:"course_icons" or not current_page|is_empty_placeholder:"course_categories" %}
{% with variant="tag" %} {% placeholder "course_icons" %} {% page_placeholder "course_categories" current_page or %} {% if current_page.publisher_is_draft and current_page|is_empty_placeholder:"course_icons" %}

{% trans "No associated categories" %}

{% endif %} {% endpage_placeholder %} {% endwith %}
{% endif %} {% endblock categories %} {% block fragment %} {% include "courses/cms/fragment_course_content.html" with page=current_page %} {% endblock fragment %}
{% block cover %} {% if current_page.publisher_is_draft %}
{% get_placeholder_plugins "course_cover" as plugins or %}

{% trans 'Add an image for course cover on its glimpse.' %}

{% endget_placeholder_plugins %} {% blockplugin plugins.0 %} {% if instance.picture.default_alt_text %}{{ instance.picture.default_alt_text }}{% else %}{% trans 'course cover image' %}{% endif %} {% endblockplugin %}
{% endif %} {% endblock cover %} {% block main_organization %} {% with main_organization=course.get_main_organization %} {% if main_organization %} {% if current_page.publisher_is_draft %} {% if main_organization.check_publication is True %} {% include "courses/cms/fragment_organization_main_logo.html" with organization=main_organization.public_extension %} {% else %} {% include "courses/cms/fragment_organization_main_logo.html" with organization=main_organization %} {% endif %} {# If the current page is the published version, show only the organizations that are published #} {% elif main_organization.check_publication is True %} {% include "courses/cms/fragment_organization_main_logo.html" with organization=main_organization.public_extension %} {% endif %} {% else %} {% include "courses/cms/fragment_organization_main_logo.html" with organization=None %} {% endif %} {% endwith %} {% endblock main_organization %} {% block social_networks %} {% endblock social_networks %} {% block synopsis %} {% if course.duration or course.effort or current_page.publisher_is_draft %}
{% render_model_block course "duration,effort" %} {% if instance.duration or current_page.publisher_is_draft %}
{% trans "Duration:" %}
{{ instance.get_duration_display|default:"NA" }}
{% endif %} {% if instance.effort or current_page.publisher_is_draft %}
{% trans "Effort:" %}
{{ instance.get_effort_display|default:"NA" }}
{% endif %} {% endrender_model_block %}
{% endif %} {% endblock synopsis %} {% block runs %} {% with runs_dict=course.get_course_runs_dict %}
{% block runs_open %}

{% trans 'Course runs' %}

{% for run in runs_dict.0|add:runs_dict.1 %} {% include "courses/cms/fragment_course_run.html" %} {% empty %}
{% trans "No open course runs" %}
{% endfor %}
{% endblock runs_open %} {% block runs_to_be_scheduled %} {% if runs_dict.6 and current_page.publisher_is_draft %}

{% trans "To be scheduled" context "Course runs to be scheduled (plural)" %}

{% include "courses/cms/fragment_course_runs_list.html" with course_runs=runs_dict.6 %}
{% endif %} {% endblock runs_to_be_scheduled %} {% block runs_upcoming %} {% if runs_dict.2 %}

{% trans "Upcoming" context "Upcoming course runs (plural)" %}

{% include "courses/cms/fragment_course_runs_list.html" with course_runs=runs_dict.2 %}
{% endif %} {% endblock runs_upcoming %} {% block runs_ongoing %} {% if runs_dict.3 or runs_dict.4 %}

{% trans "Ongoing" context "Ongoing course runs (plural)" %}

{% include "courses/cms/fragment_course_runs_list.html" with course_runs=runs_dict.3|add:runs_dict.4 %}
{% endif %} {% endblock runs_ongoing %} {% block runs_archived %} {% if runs_dict.5 %}

{% trans "Archived" context "Archived course runs (plural)" %}

{% include "courses/cms/fragment_course_runs_list.html" with course_runs=runs_dict.5 %}
{% endif %} {% endblock runs_archived %}
{% endwith %} {% endblock runs %}
{% endwith %}
{% endspaceless %}{% endblock content %}