<form id="cases_form" action="{% url "cases-clone" %}" method="post">
	<div id="contentTab" class="mixbar">
		{#}<span class="tit">{{ this_page.object_list|length }} Cases</span>{#}
		<span>
			{% if perms.testcases.add_testcase %}
			<input type="submit" value="Clone" title="clone selected test plans" />
			{% endif %}
			<input type="button" disabled="disabled" value="Printable copy"
        id="case_advance_printable"
        title="Create the printable copy for selected cases." />
			<input type="button" id="export_selected_cases" value="Export"
        title="Export the cases for selected cases." />
		</span>
	</div>
	<table class="list border-bottom" id="testcases_table" cellpadding="0" cellspacing="0" border="0">
		<thead>
			<tr>
				<th width="18px">
					<a id="id_blind_all_link">
						<img src="{{ STATIC_URL }}images/t1.gif" border="0" alt="" class="collapse-all">
					</a>
				</th>
				<th width="20" class="nosort">
					<input type="checkbox" id="id_checkbox_all_case" title="Select all/Select none">
				</th>
				<th class="widthID"><a href="{{query_url}}&order_by=case_id" title="Sort by Case Id">ID</a></th>
				<th><a href="{{query_url}}&order_by=summary" title="Sort by Summary">Summary</a></th>
				<th width="100"><a href="{{query_url}}&order_by=author__username" title="Sort by Author">Author</a></th>
				<th width="130"><a href="{{query_url}}&order_by=default_tester__username" title="Sort by Default Tester">Default Tester</th>
				<th width="140"><a href="{{query_url}}&order_by=is_automated" title="Sort by Automated">Automated</a></th>
				<th width="90" ><a href="{{query_url}}&order_by=case_status" title="Sort by Case Status">Status</a></th>
				<th width="120"><a href="{{query_url}}&order_by=category__name" title="Sort by Category">Category</a></th>
				<th width="60"><a href="{{query_url}}&order_by=priority" title="Sort by Priority">Priority</th>
				<th width="140" colspan='2'><a href="{{query_url}}&order_by=create_date" title="Sort by Create Date">Created</a></th>
			</tr>
		</thead>
		<tbody>
			{% for test_case in this_page %}
			<tr class="case_title {% cycle 'odd' 'even' %}">
				<td class="expandable">
					<img class="expand blind_icon" src="{{ STATIC_URL }}images/t1.gif" border="0" alt="">
				</td>
				<td valign="top"><input type="checkbox" name="case" value="{{ test_case.case_id }}"></td>
				<td valign="top"><a href="{% url "case-get" test_case.case_id %}">{{ test_case.case_id }}</a></td>
				<td valign="top" class="expandable"><a id="link_{{ test_case.case_id }}" href="{% url "case-get" test_case.case_id %}">{{ test_case.summary }}</a></td>
				<td valign="top"><a href="{% url "user-profile" test_case.author.username %}">{{ test_case.author }}</a></td>
				<td valign="top">{% if test_case.default_tester_id %}<a href="{% url "user-profile" test_case.default_tester.username %}">{{ test_case.default_tester }}</a>{% else %}None{% endif %}</td>
				<td valign="top">{{ test_case.get_is_automated_status }}</td>
				<td valign="top">{{ test_case.case_status }}</td>
				<td valign="top">{{ test_case.category }}</td>
				<td valign="top" align="center">{{ test_case.priority }}</td>
				<td valign="top" colspan='2'>{{ test_case.create_date }}</td>
			</tr>
			<tr class="case_content hide" style="display: none;">
				<td colspan="11">
					<div id="id_loading_{{ test_case.pk }}" class="ajax_loading"></div>
				</td>
			</tr>
			{% empty %}
			<tr>
				<td colspan="11"><center>No test cases found.</center></td>
			</tr>
			{% endfor %}
		</tbody>
	</table>
</form>
{% include "search/navigator.html" %}
