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

{% block title %} {{user.truename}}的公共主页 - {{ 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 %}

