{% load i18n %}
{% load static %}
{% load extra_filters %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>Printable copy for test cases</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta http-equiv="Content-Language" content="utf-8" />
	<link rel="stylesheet" type="text/css" href="{% static 'style/print.css' %}" media="print" />
	{% block custom_stylesheet %}{% endblock %}
	<style TYPE="text/css">
	div.thick-line { background-color: rgb(0, 0, 0);  width: 100%; height: 0.2ex; }
	div.thin-line  { background-color: rgb(0, 0, 0);  width: 100%; height: 0.1ex; }
	div.case-stage { width:100%; float:left; white-space:normal; }
	div.case-stage pre{white-space:normal; padding-right:10px;}
	div.plan_title { width: 100%; clear: left;}
	</style>
</head>
<body>
    {% if test_plan %}
    <!-- Title area -->
    <div class="plan_title">
        <div>
            <h1>TP-{{ test_plan.pk }}: <b>{{ test_plan.name }}</b></h1>
        </div>
        <div class="thick-line"></div>
        <div class="contents">
            <h3>{% trans "Contents" %}</h3>
            <div>
                <ol>
                    {% for test_case in test_plan.case.all %}
                    <li>TC-{{ test_case.pk }}: {{ test_case.summary }}, {{ test_case.case_status }}</li>
                    {% endfor %}
                </ol>
            </div>
        </div>
        <div>
            <h2 id="plan_document">{% trans "Test Plan Document" %}</h2>
            <div class="thick-line"></div>
            {{ test_plan.text|markdown2html }}
        </div>
    </div>
    {% endif %}

    <div>
        <h2 id="plan_cases">{% trans "Test Cases" %}</h2>
        <div class="thick-line"></div>
	{% for test_case in test_cases %}
        <div style="clear: left">
		<h3>TC-{{ test_case.pk }}: {{ test_case.summary }}</h3>
		<div class="thin-line"></div>
		<div class="case-stage">
			{{ test_case.text|markdown2html }}
		</div>
	</div>
	{% endfor %}
    </div>
</body>
