<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="master.html" />
  <xi:include href="../misc/paginate.html" />
<head>
	<link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/progress.css')}" />
	<title>$model listing</title>
</head>
<body>
	<div id="content" style="margin-left: 20px;">
		<h2>$model Listing</h2>
		<form action="" method="get">
			<p class="table_filter">
				<strong>Tube:</strong><br />
				<select id="tube_id" name="tube_id" onchange="this.form.submit()">
					<option value=""></option>
					<option py:for="(tube_id, tube_name) in tubes"
					        py:content="tube_name"
							py:attrs="dict(selected=(tube_id==kw['tube_id'] and 'selected' or None), value=tube_id)"></option>
				</select>
			</p>
			<p class="table_filter">
				<strong>Variant name:</strong><br />
				<select id="variant_name" name="variant_name" onchange="this.form.submit()">
					<option value=""></option>
					<option py:for="variant_name in variant_names"
					        py:content="variant_name"
							py:attrs="dict(selected=(variant_name==kw['variant_name'] and 'selected' or None))"></option>
				</select>
			</p>
		</form>
	    <a href="new">New</a> $model
	    <span py:if="tmpl_context.paginators and tmpl_context.paginators.value_list.page_count > 1"
		      py:strip="True"
	          py:content="paginate_nav(tmpl_context.paginators.value_list)"/>
		<div style="clear: both;">
			${XML(tmpl_context.widget(value=[line_formater(v) for v in value_list], action='../'+model.lower()+'s.json'))}
		</div>
		<span style="float: right;"><a href="docs">$model Docs</a></span>
	    <span py:if="tmpl_context.paginators and tmpl_context.paginators.value_list.page_count > 1"
		      py:strip="True"
	          py:content="paginate_nav(tmpl_context.paginators.value_list)"/>
	</div>
</body>
</html>
