{% extends "tcms_base.html" %}

{% load extra_filters %}

{% block subtitle %}Test plans{% endblock %}

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

{% block custom_javascript %}
<script type="text/javascript" src="{{ STATIC_URL }}js/lib/jquery.dataTables.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/testplan_actions.js"></script>
<script type="text/javascript" src="/jsi18n/"></script>
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/core.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/calendar.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/admin/DateTimeShortcuts.js"></script>

<script type="text/javascript">
Nitrate.Utils.after_page_load(Nitrate.TestPlans.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 "plans-all" %}">Planning</a>
		>> Search result
		{% else %}
		>> Planning
		{% endif %}
	</div>
	<div id="itemSearch" class="itemSearch">
		<form id="id_search_plan_form" action="{% url "plans-all" %}" method="get">
			<input type="hidden" name="action" value="search" />
			<h2>Search Plan</h2>
			{% include 'plan/form/search.html' %}
			<div class="bottom">
				<input type="submit" size="7" value="Search" class="left_float" />
				<input type="reset" size="7" value="Reset" title="Reset the form" class="left_float" />
				<div class="allSearch">
					<a title="list all the plans" href="?name=&author=&product_id=&env_group_id=&is_active=on">View All Plans</a><span>|</span><a href="/advance-search/">Advanced Search</a>
				</div>
			</div>
			<div class="clear"></div>
		</form>
	</div>
	{% if query_result %}
		{% include 'plan/common/plans_filtered.html' %}
	{% endif %}
</div>
{% endblock %}
