{% extends "base.html" %}

{% load render_table from django_tables2 %}

{% block title %}{% if listHeader %}{{listHeader}}{% else %}Followup List{% endif %}{% endblock %}

{% block content %}

<body>

<div id="quickfollowup">
<nav id="navigation">
<ul>
{% if not public %}
<li><a HREF="../{% if listHeader %}../{% endif %}">home</a></li>
<li><a HREF="..{% if listHeader %}/..{% endif %}/followup/1/">confirmed</a></li>
<li><a HREF="..{% if listHeader %}/..{% endif %}/followup/2/">good</a></li>
<li><a HREF="..{% if listHeader %}/..{% endif %}/followup/3/">possible</a></li>
<li><a HREF="..{% if listHeader %}/..{% endif %}/followup/5/">attic</a></li>
<li><a HREF="..{% if listHeader %}/..{% endif %}/followup/4/">eyeball</a></li>
<li><a HREF="..{% if listHeader %}/..{% endif %}/followup/0/">garbage</a></li>
<li><a HREF="..{% if listHeader %}/..{% endif %}/userlist/">custom</a></li>
{% else %}
<li><a HREF="../{% if listHeader %}../{% endif %}">home</a></li>
<li><a HREF="../{% if listHeader %}../{% endif %}public_quickview/">object quickview list</a></li>
{% endif %}
{% if form_searchobject %}
<li>
{% if form_searchobject.errors %}
    <p style="color: red;">
        Please correct the error{{ form_searchobject.errors|pluralize }} below.
    </p>
{% endif %}

<form id="search_form" action="" method="post">
    {{ form_searchobject.non_field_errors }}
    <div class="fieldWrapper">
    <p>
        {{ form_searchobject.searchText.errors }}
        {{ form_searchobject.searchText }}
    <input type="submit" value="Find Object" /></p>
    </div>
</form>
</li>
{% endif %}

</ul>
</nav>

<section id="table_layout">
<article id="followup_table">
<header id="followup_list">
<hgroup>
{% if listHeader %}
   <h1>{{ listHeader }}</h1>
{% else %}
   <h1>Object List</h1>
{% endif %}

<h2>({{count}})</h2>
</hgroup>
</header>

{% for row in table %}
    {{ row.id }} {{ row.ra_sex }} {{ row.dec_sex }}<br />
{% endfor %}

<div class="pagination">
    <span class="step-links">
        {% if table.has_previous %}
            <a href="?page={{ table.previous_page_number }}">previous</a>
        {% endif %}

        <span class="current">
            Page {{ table.number }} of {{ table.paginator.num_pages }}.
        </span>

        {% if table.has_next %}
            <a href="?page={{ table.next_page_number }}">next</a>
        {% endif %}
    </span>
</div>
</article>
</section>
</div>
{% endblock %}
