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

{% block title %}个人中心 - {{ parent() }}{% endblock %}

{% block content %}

{{ render(controller('TopxiaWebBundle:My:avatarAlert')) }}


<div class="row row-3-9">
  <div class="col-md-3">

    <div class="panel panel-default">
      <div class="panel-body">
        <div class="list-group-block">
          <div style="margin:10px" align="center">
            <a href="{{path('user_show',{id:app.user.id})}}">
              <img  class="img-thumbnail" alt="{{ app.user.truename }}" src="{{ file_path(app.user.mediumAvatar, 'avatar.png') }}" >
            </a><br/><br/>
            <p class="welcome-text"><b>欢迎回来，{{app.user.truename}}</b></p>
          </div>

          {% if app.user.isTeacher() %}
            <div class="list-group-panel">
              <ul class="list-group">
                <a class="myteaching-menu list-group-item {% if side_nav == 'my-teaching' %} active {% endif %}" href="{{path('my_teaching')}}">
                  <span class="k12-iconfont icon-book"></span>
                  <span class="myteaching-text">我的教学</span>
                </a>
                <a class="myteaching-menu list-group-item {% if side_nav == 'my-teaching-courses' %} active {% endif %}" href="{{path('my_teaching_courses',{classId:'all'})}}">
                  <span class="k12-iconfont icon-zaixue"></span>
                  <span class="myteaching-text">在教课程</span>
                </a>
                <a class="myteaching-menu list-group-item {% if side_nav == 'my-task' %} active {% endif %}" href="{{path('my_teaching_task') }}">
                  <span class="k12-iconfont icon-chart-icon"></span>
                  <span class="myteaching-text">学生学习进度</span>
                </a>
                <a class="myteaching-menu list-group-item {% if side_nav == 'my-teaching-questions' %} active {% endif %}" href="{{path('my_teaching_threads', {type:'question'}) }}">
                  <span class="k12-iconfont icon-huida"></span>
                  <span class="myteaching-text">学生问答</span>
                </a>
                <a class="myteaching-menu list-group-item {% if side_nav == 'my-teaching-discussions' %} active {% endif %}" href="{{path('my_teaching_threads', {type:'discussion'}) }}">
                  <span class="k12-iconfont icon-taolun"></span>
                  <span class="myteaching-text">学生话题</span>
                </a>

                {% if is_plugin_installed('Homework') %}
                  <a class="myteaching-menu list-group-item {% if side_nav == 'my-teaching-homework-check' %} active {% endif %}" href="{{path('my_teaching_homework_list') }}">
                    <span class="k12-iconfont icon-shijuan"></span>
                  <span class="myteaching-text">作业批改</span>
                  </a>
                {% endif %}

                <a class="myteaching-menu list-group-item {% if side_nav == 'my-teaching-check' %} active {% endif %}" href="{{path('course_manage_list_teacher_test_reviewing') }}">
                  <span class="k12-iconfont icon-shijuan"></span>
                  <span class="myteaching-text">试卷批阅</span>
                </a>

                <a class="myteaching-menu list-group-item
                  {% if side_nav == 'my-group' %} active {% endif %}" 
                  href="{{path('group_member_center')}}">
                  <span class="k12-iconfont icon-group"></span>
                  <span class="myteaching-text">我的小组</span>
                </a>


               {% if is_plugin_installed('MaterialLib') %}
               <a class="list-group-item {% if side_nav == 'material-lib' %} active {% endif %}"
                href="{{path('material_lib_browsing') }}">教学资料库</a>
               {% endif %}

              </ul>
            </div>
          {% else %}

          <div class="list-group-panel">
            <ul class="list-group">
               <a class="myteaching-menu list-group-item
               {% if side_nav == 'my-learning' %} active {% endif %}" 
               href="{{path('my_courses_learning')}}">
               <span class="k12-iconfont icon-book"></span>
               <span class="myteaching-text">我的课程</span>
              </a>
                <a class="myteaching-menu list-group-item
                {% if side_nav == 'my-questions' %} active {% endif %}" 
                href="{{path('my_questions')}}">
                <span class="k12-iconfont icon-huida"></span>
                <span class="myteaching-text">我的问答</span>
                </a>
                <a class="myteaching-menu list-group-item
                {% if side_nav == 'my-discussions' %} active {% endif %}" 
                href="{{path('my_discussions')}}">
                <span class="k12-iconfont icon-taolun"></span>
                <span class="myteaching-text">我的话题</span>
                </a>
                <a class="myteaching-menu list-group-item
                  {% if side_nav == 'my-notes' %} active {% endif %}" 
                  href="{{path('my_notebooks')}}">
                  <span class="k12-iconfont icon-biji"></span>
                  <span class="myteaching-text">我的笔记</span>
                </a>
               {% if is_plugin_installed('Homework') %}
                <a class="myteaching-menu list-group-item {% if side_nav == 'my-homeworks' %} active {% endif %}" href="{{ path('my_homework_list') }}">
                  <span class="k12-iconfont icon-zaixue"></span>
                  <span class="myteaching-text">我的作业</span>
                </a>
               {% endif %}
                <a class="myteaching-menu list-group-item
                  {% if side_nav == 'my-quiz' %} active {% endif %}" 
                  href="{{path('my_quiz')}}">
                  <span class="k12-iconfont icon-shijuan"></span>
                  <span class="myteaching-text">我的考试</span>
                </a>
                <a class="myteaching-menu list-group-item
                  {% if side_nav == 'my-group' %} active {% endif %}" 
                  href="{{path('group_member_center')}}">
                  <span class="k12-iconfont icon-group"></span>
                  <span class="myteaching-text">我的小组</span>
                </a>
            </ul>
          </div>
          {% endif %}
        </div>
      </div>
    </div>

  </div>
  <div class="col-md-9">{% block main %}{% endblock %}</div>
</div>

{% endblock %}