{% extends "tcms_base.html" %}
{% load static %}

{% block subtitle %}Test runs{% endblock %}

{% block custom_stylesheet %}
<link rel="stylesheet" type="text/css" href="{% static "style/dataTables/jquery.dataTables.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static "style/dataTables/jquery.dataTables_themeroller.css" %}" />
{% endblock %}

{% block custom_javascript %}
<script type="text/javascript" src="{% static "js/lib/jquery.dataTables.js" %}"></script>
<script type="text/javascript" src="{% static "js/testrun_actions.js" %}"></script>
<script type="text/javascript" src="{% static "js/management_actions.js" %}"></script>
<script type="text/javascript">
Nitrate.TestRuns.Search.numberOfRuns = {{ total_count }};
Nitrate.Utils.after_page_load(Nitrate.TestRuns.List.on_load);
</script>
{% endblock %}

{% block contents %}

<div id="content">
	<div class="sprites crumble">
		<a href="{% url "nitrate-index" %}">Home</a>
		{% if query_result %}
		>> <a href="{% url "runs-all" %}">Test Runs</a> >> Search result
		{% else %}
		>> Test Runs
		{% endif %}
	</div>
	<form action="{% url "runs-all" %}" method="get">
		<div id="itemSearch" class="itemSearch">
			<input type="hidden" name="action" value="search" />
			<div>
				<h2>Search Run</h2>
				{% include 'run/form/search.html' %}
			</div>
			<div class="bottom">
				<input type="submit" size="7" value="Search" class="left_float" />
				<input type="reset" size="7"  value="Reset" class="left_float" />
				<div class="allSearch">
					<a href="?summary=&plan=&product_id=&env_group_id=&manager=&status=">View All Runs</a><span>
					|
					</span><a href="{% url "advanced-search" %}">Advanced Search</a>
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</form>
	{% include "run/search_result.html" %}
</div>
{% endblock %}
