{% load cms_tags i18n extra_tags %}

<div class="course-detail__content__row course-detail__content__teaser">
  {% page_placeholder "course_teaser" page or %}
    <div class="course-detail__content__row course-detail__content__teaser__empty">{% trans 'Add a video or teaser.' %}</div>
  {% endpage_placeholder %}
</div>

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_description" %}
<section class="course-detail__content__row course-detail__content__description">
  <h2 class="course-detail__content__row__title">{% trans 'About the course' %}</h2>
  {% with header_level=3 %}
    {% page_placeholder "course_description" page or %}
      <p>{% trans 'Enter here a description of your course.' %}</p>
    {% endpage_placeholder %}
  {% endwith %}
</section>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_skills" %}
<div class="course-detail__content__row course-detail__content__skills">
  <h2 class="course-detail__content__row__title">{% trans "What you will learn" %}</h2>
  <p>{% trans "At the end of this course, you will be able to:" %}</p>
  {% page_placeholder "course_skills" page %}
</div>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_format" %}
<section class="course-detail__content__row course-detail__content__format">
  <h2 class="course-detail__content__row__title">{% trans 'Format' %}</h2>
  {% page_placeholder "course_format" page or %}
    <p>{% trans 'How is the course structured?' %}</p>
  {% endpage_placeholder %}
</section>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_prerequisites" %}
<section class="course-detail__content__row course-detail__content__prerequisites">
  <h2 class="course-detail__content__row__title">{% trans 'Prerequisites' %}</h2>
  {% page_placeholder "course_prerequisites" page or %}
    <p>{% trans 'What are the prerequisites to follow this course?' %}</p>
  {% endpage_placeholder %}
</section>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_plan" %}
<section class="course-detail__content__row course-detail__content__plan">
  <h2 class="course-detail__content__row__title">{% trans 'Course plan' %}</h2>
  {% page_placeholder "course_plan" page or %}
    <p>{% trans 'Enter here the detailed course plan.' %}</p>
  {% endpage_placeholder %}
</section>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_assessment" %}
<section class="course-detail__content__row course-detail__content__assessment">
  <h2 class="course-detail__content__row__title">{% trans 'Assessment and certification' %}</h2>
  {% page_placeholder "course_assessment" page or %}
    <p class="course-detail__content__assessment__placeholder">
      {% trans "How is progress evaluated and/or certified?" %}
    </p>
  {% endpage_placeholder %}
</section>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_organizations" %}
<section class="section course-detail__content__row course-detail__content__organizations">
  <h2 class="section__title course-detail__content__row__title course-detail__content__organizations__title">
    {% trans 'Organizations' %}
  </h2>
  {% if page|is_empty_placeholder:"course_organizations" %}
    <p class="course-detail__content__organizations__placeholder">
      {% trans "What are the organizations publishing this course?" %}
    </p>
  {% else %}
    <div class="section__items course-detail__content__organizations__items">
      {% page_placeholder "course_organizations" page %}
    </div>
  {% endif %}
</section>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_team" %}
<section class="section course-detail__content__row course-detail__content__team">
  <h2 class="section.title course-detail__content__row__title course-detail__content__team__title">
    {% trans 'Course team' %}
  </h2>
  {% with header_level=3 %}
    {% if page|is_empty_placeholder:"course_team" %}
      <p>{% trans 'Who are the teachers in the course team?' %}</p>
    {% else %}
      <div class="section__items course-detail__content__team__items">
        {% page_placeholder "course_team" page %}
      </div>
    {% endif %}
  {% endwith %}
</section>
{% endif %}

{% if page.publisher_is_draft or not page|is_empty_placeholder:"course_information" %}
<div class="course-detail__content__row course-detail__content__information">
  {% page_placeholder "course_information" page %}
</div>
{% endif %}

<section class="course-detail__content__row course-detail__content__license">
  <h2 class="course-detail__content__row__title course-detail__content__license__title">{% trans 'License' %}</h2>

  <div class="course-detail__content__license__item">
    <h3 class="course-detail__content__license__item__title">{% trans 'License for the course content' %}</h3>
    {% with header_level=4 %}
      {% page_placeholder "course_license_content" page or %}
        <p>{% trans 'What is the license for the course content?' %}</p>
      {% endpage_placeholder %}
    {% endwith %}
  </div>

  <div class="course-detail__content__license__item">
    <h3 class="course-detail__content__license__item__title">{% trans 'License for the content created by course participants' %}</h3>
    {% with header_level=4 %}
      {% page_placeholder "course_license_participation" page or %}
        <p>{% trans 'What is the license for the content created by course participants?' %}</p>
      {% endpage_placeholder %}
    {% endwith %}
  </div>
</section>
