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

{% block title %} 

{% if type == 'question' %}
	{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}问答
{% set side_nav = 'my-teaching-questions' %}

{% elseif type == 'discussion' %}
	{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}话题
{% set side_nav = 'my-teaching-discussions' %}

{% endif %}

- {{ parent() }}

{% endblock %}


{% if type == 'question' %}
	{% set side_nav = 'my-teaching-questions' %}
{% elseif type == 'discussion' %}
	{% set side_nav = 'my-teaching-discussions' %}
{% endif %}

{% block main %}

<div class="panel panel-default panel-col">
  	<div class="panel-heading">
		{% if type == 'question' %}
			{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}问答
		{% elseif type == 'discussion' %}
			{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}话题
		{% endif %}
	</div>

  <div class="panel-body">

    {% if type == 'discussion' %}
	    {% include 'TopxiaWebBundle:MyTeaching:tab.html.twig'%}
    {% endif %}

    {% if threads %}
		
	    {% include 'TopxiaWebBundle:MyThread:thread-list.html.twig'  with {type: type} %}
	  {% else %}
	  
	  	{% if type == 'question' %}
			<div class="empty">您的课程中还没有{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}提问过...</div>
		{% elseif type == 'discussion' %}
			<div class="empty">您的课程中还没有{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}话题...</div>
		{% endif %}
	    
	  {% endif %}
  </div>
</div>
{% endblock %}