{% extends "base.html" %}

{% block title %}
	&raquo; Sites
{% endblock %}

{% block nav %}
	Sites [<a href="/sites/add">add</a>]
{% endblock %}

{% block content %}
	<form>
		<fieldset>
			{{input_text('pattern', '')}}
			<input type="submit" value="Search">
		</fieldset>
	</form>					
	{% if sites %}
		<p>Only the first {{limit}} sites of the search results are shown.</p>
		<ul>
			{% for site in sites %}
				<li>
					<a href="/sites/{{site.id}}">{{site.code}} {{site.name}}</a>
				</li>
			{% endfor %}
		</ul>
	{% elif request.values.pattern %}
		<p>No sites matched your search</p>
	{% endif %}
{% endblock %}
