{% extends 'old-bootstrap-modal-layout.html.twig' %}

{% block title %}{{'选课'|trans}}{% endblock %}

{% block body %}
<div>
	<div>
		<form action="{{path('admin_course_search_to_fill_banner')}}" class="form-inline" role="search-form">
			<div class="form-group ">
				<input type="text" class="form-control" name="key" value="{{ key|default('') }}"
				placeholder="{{'课程名称'|trans}}"
				/>
				<input id="hiddenText" type="text" style="display:none" />
			</div>
			<button type="button" class="btn btn-primary">{{'搜索'|trans}}</button>
		</form>
	</div>
	<div role="course-list">
		<ul class="course-grids">
		{% if courses %}
			{% for course in courses %}
			{% include 'admin/course/course-item.html.twig' with {course:course} %}
			{% endfor %}
		{% else %}
			<div class="empty">{{'无课程记录'|trans}}</div>
		{% endif %}
		</ul>
	</div>
</div>

{{ admin_macro.paginator(paginator) }}

{% endblock %}
{% block footer %}
  <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">{{'关闭'|trans}}</button>
  
  <script>app.load('course/search-to-fill-banner');</script>
{% endblock %}