{% 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 object.studio_url %}
        <a target="_blank" href="{{ object.studio_url }}">{{ object.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>{{ object.start }}</div>
  </div>

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

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

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

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

  <div class="info-item">
    <div class="heading">
      {% trans "Course Staff" %}
    </div>
    <div>
      {% if not object.course_staff %}
        {% trans "(Required) Not yet added" %}
      {% else %}
        {% for obj in object.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 object.min_effort and object.max_effort %}
        {{ object.min_effort }}-{{ object.max_effort }} {% trans "hours per week" %}
      {% elif object.min_effort %}
        {{ object.min_effort }} {% trans "hours per week" %}
      {% else %}
        {% with  object.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  object.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  object.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  object.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  object.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  object.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  object.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  object.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>
