  <div class="panel panel-default" style="display: none;" id="schedule-course-list-editing-panel">
    <div class="panel-heading editable-heading">
      <h3 class="panel-title">我的备选课程</h3>
      <span class="mode editable">
        <button class="btn btn-link">返回</button>
      </span>
    </div>
    <div class="panel-body editable-body">
     <span class="text-tip"><span class="glyphicon glyphicon-arrow-left mrm"></span>把课时拖动到左侧相应的日期中</span>
       <ul class="course-list" id="schedule-course-list-body">
        {% set Editablecourses = teachCourses == null ? courses : teachCourses%}
          {% for course in Editablecourses %}
           <li class="plus">
             <span class="glyphicon glyphicon-plus-sign mrs"></span>
             <span class="title" title="{{ course.title }}">{{ course.title }}</span>
             {{ render(controller('TopxiaWebBundle:ClassSchedule:getItems', {courseId:course.id})) }}
           </li>
         {% else %}
         <li class="empty">班级暂无课程，请先设置本班的课程</li>
         {% endfor %}
       </ul>
    </div>
  </div>
  
  <div class="panel panel-default" id="schedule-course-list-viewing-panel">
  <div class="panel-heading normal-heading">  
      <h3 class="panel-title">班级课程</h3>
      <span class="mode normal">
      {% if app.user.isAdmin or app.user.isTeacher %}
        <button class="btn btn-link">编辑课表>></button> 
      {% endif %}  
      </span>
  </div>
  

  <div class="panel-body schedule-course normal-body">
    <ul class="media-list">
      {% for course in courses %}
      {% set teacher = users[course.teacherIds[0]|default(0)]|default(null) %}
          <li class="media">
            <a class="pull-left" href="{{ path('course_show',{id:course.id}) }}">
              {% if course.compulsory %}
                <span class="label label-success compulsory">必修</span>
              {% else %}
                <span class="label label-warning compulsory">选修</span>
              {% endif %}
              <img class="media-object" src="{{ file_path(course.middlePicture, 'course-large.png') }}" alt="{{ course.title }}">
            </a>
            <div class="media-body">
              <h4 class="media-heading">
                <span class="title" title="{{ course.title }}">{{ course.title }}
                </span>
              </h4>
              <div class="pvs text-sm text-muted">
                <span>{{ teacher.truename }}</span> 
                <span class="pull-right">{{ course.lessonNum }} 课时</span>
              </div>
            </div> 
           
          </li>
        {% else %}
        <li class="empty">班级暂无课程，请先设置本班的课程</li>
        {% endfor %}
    </ul>
  </div>
</div>


