{% extends 'TopxiaWebBundle::layout.html.twig' %}

{% block title %}{{ course.title }} - {{ parent() }}{% endblock %}

{% set bodyClass = 'course-dashboard-page' %}

{% set script_arguments = {course_uri: path('course_show', {id:course.id})} %}

{% block content %}

<div class="container-gap course-dashboard-container">

  {{ render(controller('TopxiaWebBundle:Course:header', {course:course})) }}

  <div class="row row-8-4">
    <div class="col-md-8 course-dashboard-main">
      <div class="panel panel-default">
        <div class="panel-body" style="overflow: hidden;">
          {% block dashboard_main %}{% endblock %}
        </div>
      </div>
      <div>
        {% block dashboard_relatedCoursesBlock %}{% endblock %}
      </div>
    </div>
    <div class="col-md-4 course-dashboard-side">

      {% if is_plugin_installed('Classroom') and setting('classroom.enabled')|default(0) and isLearnInClassrooms|default(null) %}
      <div class="panel panel-default go-class">
        <div class="panel-body ">
          <p>您正在以下{{ setting('classroom.name')|default("班级") }}学习此课程</p>
          {% for classroom in isLearnInClassrooms %}
          <div class="pull-right go-class-link">
            <a href="{{path('classroom_show',{id:classroom.id})}}">去{{classroom.title}} > </a>
          </div>
          {% endfor %}
        </div>
      </div>
      {% endif %}

      {{ render(controller('TopxiaWebBundle:Course:progressBlock',{course:course})) }}
      {{ render(controller('TopxiaWebBundle:CourseAnnouncement:block',{course:course})) }}
      {{ render(controller('TopxiaWebBundle:CourseThread:questionBlock',{course:course})) }}
    </div>
  </div>

</div>

{% endblock %}

{% block bottom %}
  <div id="course-modal" class="modal"></div>
{% endblock %}