manifests/manifests/templates/shipList.html
2012-04-22 16:35:14 +05:30

107 lines
3.9 KiB
HTML

<!doctype html>
<html>
<head>
<script type="text/javascript" src="/media/js/jquery.js"></script>
<style type="text/css">
.goodRow {
display: none;
}
</style>
<script type="text/javascript">
$(function() {
$('.shipRow').click(function() {
var $goodRow = $(this).next();
$goodRow.slideToggle();
});
});
</script>
</head>
<body>
<div id="wrapper">
<div id="status">
No of results: {{ no_of_results }} &nbsp; displaying page {{ page }} of {{ no_of_pages }} &nbsp; Results per page: {{ page_size }}
</div>
<div id="leftCol">
<form id="shipFilterForm" action="" method="GET">
<!--
<input type="date" name="start_date" id="id_start_date" />
<input type="date" name="end_date" id="id_end_date" />
-->
<label for="id_bill_type">Bill Type:</label>
<select name="bill_type" id="id_bill_type">
<option value="Import">Import</option>
<option value="Export">Export</option>
<option value="Rexport">Rexport</option>
</select><br />
<label for="id_ship_name">Ship Name:</label>
<input type="text" name="ship_name" id="id_ship_name" /> <br />
<label for="id_port">Port:</label>
<input type="text" name="port" id="id_port" /><br />
<label for="id_captain">Captain:</label>
<input type="text" name="captain" id="id_captain" /><br />
<label for="id_owner">Owner:</label>
<input type="text" name="owner" id="id_owner" /><br />
<label for="id_goods">Goods:</label>
<input type="text" name="goods" id="id_goods" /><br />
<input type="submit" value="Submit" />
</form>
</div>
<div id="rightCol">
<table>
<thead>
<td>Ship Number</td>
<td>Bill Type</td>
<td>Date</td>
<td>Ship Name</td>
<td>Captain</td>
<td>Owner</td>
<td>Port</td>
<td>Country</td>
</thead>
{% for s in ships %}
<tr class="shipRow">
<td>{{ s.number }}</td>
<td>{{ s.bill_type }}</td>
<td>{{ s.date|date:"d, M, Y" }}</td>
<td>{{ s.get_ship_name }}</td>
<td>{{ s.get_captain }}</td>
<td>{{ s.get_owner }}</td>
<td>{{ s.port }}</td>
<td>{{ s.country|default:"" }}</td>
</tr>
<tr class="goodRow">
<td></td>
<td colspan="7">
<table class="goodTable">
{% for good in s.good_set.all %}
<tr>
<td>{{ good.description_string_trans }}</td>
<td>{{ good.no_of_packages }}</td>
<td>{{ good.weight }}</td>
</tr>
{% endfor %}
<tr>
<td>Total wt.: {{ s.total_weight }}</td>
</tr>
</table>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</body>
</html>