Everyone's favourite, past events, now working and loading in ~800ms

This commit is contained in:
Tom Price
2015-01-26 15:06:39 +00:00
parent 13ce96809b
commit 9c9dc07929
4 changed files with 73 additions and 1 deletions

View File

@@ -0,0 +1,45 @@
{% extends 'base.html' %}
{% load paginator from filters %}
{% block title %}Event Archive{% endblock %}
{% block content %}
<div class="row">
<h2>Event Archive</h2>
<div class="col-sm-12 col-md-6 pagination">
<form class="form-inline">
<div class="form-group">
<label for="start">Start</label>
<input type="date" name="start" id="start" value="{{ request.GET.start }}" placeholder="Start" class="form-control" />
</div>
<div class="form-group">
<label for="end">End</label>
<input type="date" name="end" id="end" value="{% if request.GET.end %}{{ request.GET.end }}{% else %}{% now "Y-m-d" %}{% endif %}" placeholder="End" class="form-control" />
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" />
</div>
</form>
</div>
{% if is_paginated %}
<div class="col-md-6 text-right">
{% paginator %}
</div>
{% endif %}
</div>
<div class="row">
{% with latest as events %}
{% include 'RIGS/event_table.html' %}
{% endwith %}
</div>
{% if is_paginated %}
<div class="row">
<div class="text-right">
{% paginator %}
</div>
</div>
{% endif %}
{% endblock %}