{% extends 'base_rigs.html' %}
{% load paginator from filters %}

{% block title %}Event Archive{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-sm-12">
            <h2>Event Archive</h2>
        </div>
        <div class="col-sm-12">
            <form class="form-inline">
                    
                <div class="input-group">
                      <div class="input-group-addon">Start</div>
                    <input type="date" name="start" id="start" value="{{ start|default_if_none:"" }}" placeholder="Start" class="form-control" />
                </div>
            
                <div class="input-group">
                      <div class="input-group-addon">End</div>
                    <input type="date" name="end" id="end" value="{{ end|default_if_none:"" }}" placeholder="End" class="form-control" />
                </div>
            
                <div class="input-group">
                    <div class="input-group-addon">Keyword</div>
                    <input type="search" name="q" placeholder="Keyword" value="{{ request.GET.q }}"
                           class="form-control"/>
                </div>
                        
                <div class="input-group">
                        <input type="submit" class="btn btn-primary" value="Search"/>
                </div>
                    
            </form>
        </div>

    <div class="col-sm-12">
    {% if is_paginated %}
        <div class="pull-right">
            {% paginator %}
        </div>
    {% endif %}  
        
    </div>
    <div class="row">
        <div class="col-sm-12">
            {% with object_list as events %}
                {% include 'RIGS/event_table.html' %}
            {% endwith %}
        </div>
    </div>

    {% if is_paginated %}
        <div class="row">
            <div class="text-right">
                {% paginator %}
            </div>
        </div>
    {% endif %}
{% endblock %}