{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}

{% block title %}Graphs{% endblock %}

{% block content %}
<h1>Recent Graphs</h1>

<form id="searchform" action="."
      method="get" accept-charset="utf-8">
  <button class="button blue small" type="submit">
    Search
  </button>
  <input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
</form>
	{% if graphs1 %}
		<div class="grid_1 alpha">
		<p>&nbsp;</p>
		</div>

		{% for graph in graphs1 %}
		<div id="thumb-container" class="grid_2">
		<p class="caption"><a href="/rowers/graph/{{ graph.id }}/">
		<img src="/{{ graph.filename }}" 
			onerror="this.src='/static/img/waiting.png'"
			alt="{{ graph.filename }}" width="120" height="100"></a></p>
		<p class="caption">{{ graph.workout.name }}</p>
		</div>
		{% endfor %}

		<div class="grid_1 omega">
		<p>&nbsp;</p>
		</div>


		<div class="grid_12">
		<p>&nbsp;</p>
		</div>

		<div class="grid_1 alpha">
		<p>&nbsp;</p>
		</div>

		{% for graph in graphs2 %}
		<div id="thumb-container" class="grid_2">
		<a href="/rowers/graph/{{ graph.id }}/">
		<p class="caption"><img src="/{{ graph.filename }}" 
			onerror="this.src='/static/img/waiting.png'"
			alt="{{ graph.filename }}" width="120" height="100"></a></p>
		<p class="caption">{{ graph.workout.name }}</p>
		</div>
		{% endfor %}


		<div class="grid_1 omega">
		<p>&nbsp;</p>
		</div>


	{% else %}
		<p> No graphs found </p>
	{% endif %}
{% endblock %}
