{% extends "adagios_standard.html" %}
{% block title %}List Objects{% endblock %}
{% block smallheader %}ObjectBrowser{% endblock %}
{% block largeheader %}Search{% endblock %}
{% block nav1 %}<a href="{% url objectbrowser %}">objectbrowser</a>{% endblock %}


{% block sidebar %}
{% endblock %}

{% block footer %}
{{ block.super }}
<script>
$(document).ready(function() {
    $('table#objectsearch').dataTable();
});
</script>
{% endblock %}
{% block content %}

{% if objects %}


<div class="objectbrowser_list_objects ui-tabs ui-widget ui-widget-content ui-corner-all">

	<table border=1 id="objectsearch">
    <thead>
	<tr>
		<th>Short Name</th>
		<th>Object Type</th>
		<th>Object Name</th>
		<th>Filename</th>
	</tr>
    </thead>
    <tbody>
	{% for o in objects %}
		<tr class="{% cycle 'even' 'odd' %}">
			<td><a href="id={{ o.id }}">{{ o.description }}</a></td>
			<td><a href="{% url search %}?object_type={{ o.object_type }}">{{ o.object_type }}</a></td>
			<td><a href="id={{ o.id }}">{{ o.name }} </a></td>
			<td><a href="{% url search %}?filename={{ o.filename }}">{{ o.filename }}</a></td>
		</tr>
	{% endfor %}
    </tbody>
	</table>
{% else %}
	<p>No objects found. </p>
{% endif %}
	<br/><br/>
</div>



{% endblock %}
