{% load i18n %}

<div class="course-information" xmlns="http://www.w3.org/1999/html">

  <div class="info-item">
    <div class="heading">
      {% trans "Studio URL" %}
    </div>
    <div>
      {% if course_run.studio_url %}
        <a target="_blank" href="{{ course_run.studio_url }}">{{ course_run.lms_course_id }}</a>
      {% else %}
        {% trans "(Required) To be added by edX" %}
      {% endif %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "Start Date (time in UTC)" %}
    </div>
    <div>{{ course_run.start }}</div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "End Date (time in UTC)" %}
    </div>
    <div>{{ course_run.end }}</div>
  </div>

  {% if is_seat_version %}
    <div class="info-item">
      <div class="heading">
        {% trans "Enrollment Track" %}
      </div>
      <div>{{ course_run.course_type }}</div>
    </div>

      {% if course_run.seat_price %}
        <div class="info-item">
          <div class="heading">
            {% trans "Certificate Price" %}
          </div>
          <div>
              ${{ course_run.seat_price }}
          </div>
        </div>
      {% endif %}

      {% if course_run.credit_seat_price %}
        <div class="info-item">
          <div class="heading">
            {% trans "Credit Price" %}
          </div>
          <div>
              ${{ course_run.credit_seat_price }}
          </div>
        </div>
      {% endif %}
  {% endif %}

  <div class="info-item">
    <div class="heading">
      {% trans "Course Staff" %}
    </div>
    <div>
      {% if not course_run.course_staff %}
        {% trans "(Required) Not yet added" %}
      {% else %}
        {% for obj in course_run.course_staff %}
          <div class="course-staff">
            <img src="{{ obj.image_url }}" alt=""/>

            <div class="staff-detail">
              <div class="name">
                  {% if obj.is_new %}
                    <span class="new-staff">{% trans "New" %}</span>
                  {% endif %}
                  <a href="#" class="btn-instructor-detail"  data-staff_id="{{ obj.uuid }}">{{ obj.full_name }}</a>
              </div>
              <div>{{ obj.position }}</div>
              <div class="organization">{{ obj.organization }}</div>
            </div>
          </div>
          <div class="clearfix"></div>
        {% endfor %}
      {% endif %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "Estimated Effort" %}
    </div>
    <div>
      {% if course_run.min_effort and course_run.max_effort %}
        {{ course_run.min_effort }}-{{ course_run.max_effort }} {% trans "hours per week" %}
      {% elif course_run.min_effort %}
        {{ course_run.min_effort }} {% trans "hours per week" %}
      {% else %}
        {% with  course_run.estimated_effort as field %}
            {% include "publisher/_render_required_field.html" %}
        {% endwith %}
      {% endif %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "Course Content Language" %}
    </div>
    <div>
      {% with  course_run.language.name as field %}
        {% include "publisher/_render_required_field.html" %}
      {% endwith %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "Video Transcript Language" %}
    </div>
    <div>
      {% with  course_run.transcript_languages as field %}
        {% include "publisher/_render_required_field.html" %}
      {% endwith %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "Course Video Language" %}
    </div>
    <div>
      {% with  course_run.video_language as field %}
        {% include "publisher/_render_required_field.html" %}
      {% endwith %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "Course Length (Weeks)" %}
    </div>
    <div>
      {% with  course_run.length as field %}
        {% include "publisher/_render_required_field.html" %}
      {% endwith %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "MicroMasters Program Name" %}
    </div>
    <div>
      {% with  course_run.micromasters_name as field %}
        {% include "publisher/_render_optional_field.html" %}
      {% endwith %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "XSeries Program Name" %}
    </div>
    <div>
      {% with  course_run.xseries_name as field %}
        {% include "publisher/_render_optional_field.html" %}
      {% endwith %}
    </div>
  </div>

  <div class="info-item">
    <div class="heading">
      {% trans "Professional Certificate Program Name" %}
    </div>
    <div>
      {% with  course_run.professional_certificate_name as field %}
        {% include "publisher/_render_optional_field.html" %}
      {% endwith %}
    </div>
  </div>

</div>
<div class="clearfix"></div>
<script type="text/javascript">
    var staffData = {{ course_staff_config | safe }};
</script>
