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

{% block title %} {{ parent() }}{% endblock %}

{% set pageNav = type %}

{% block main %}
<div class="row">
  <div class="col-md-12">
		{% if courses %}
			{{ render(controller('TopxiaWebBundle:Course:coursesBlock', {courses:courses, view: 'list'})) }}
			{{ web_macro.paginator(paginator) }} 
		{% else %}
		  {% if pageNav == 'teach' %}
			  <div class="empty">无在教的课程</div>
			{% elseif pageNav == 'learn' %}
			  <div class="empty">无在学的课程</div>
			{% elseif pageNav == 'favorited' %}
			  <div class="empty">无收藏的课程</div>
			{% endif %}
	  {% endif %}
	</div>
</div>
{% endblock %}

