{% load adminmedia %}
{% if results %}

<table cellspacing="0">
<thead>
<tr>
<th>&nbsp;</th>
{% for header in result_headers %}<th{{ header.class_attrib }}>
{% if header.sortable %}<a href="{{ header.url }}">{% endif %}
{{ header.text|capfirst }}
{% if header.sortable %}</a>{% endif %}</th>{% endfor %}
</tr>
</thead>
<tbody>
{% for result in results %}
<tr class="{% cycle 'row1' 'row2' %}">
	<td>
		<div class="qe-buttons">
			<a name="quickedit-{{ result.quickedit.instance.pk }}" href="#quickedit-{{ result.quickedit.instance.pk }}" class="quickedit" id="quickedit-{{ result.quickedit.instance.pk }}"><img src="{% admin_media_prefix %}img/admin/icon_changelink.gif" alt="Quick Edit" title="Show Quick Edit form" width="10" height="10"></a> 
			{% if result.quickedit.instance.get_absolute_url %}<a href="{{ result.quickedit.instance.get_absolute_url }}" target="_blank"><img src="{% admin_media_prefix %}img/admin/selector-search.gif" alt="View on site" title="View on site" width="10" height="10"></a>{% endif %}
		</div>
	</td>{% for item in result.fields %}{{ item }}{% endfor %}
</tr>
<tr class="quickedit-row" id="qe-form-{{ result.quickedit.instance.pk }}" style="display: None">
	<td colspan="{{ result.fields|length }}" >
		<table border="0" class="qe-table">
		{{ result.quickedit.as_table }}
		<tr>
			<td>
				<input type="reset" value="Reset" class="qe-reset left" style="margin-right:10px;">
				<input type="submit" value="Save" class="qe-button left" name="_save">
			</td>
		</tr>
		</table>
	</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
