Private
Public Access
1
0

list-graphs

This commit is contained in:
Sander Roosendaal
2018-10-04 13:52:37 +02:00
parent 3ea75b4d48
commit f29e986dc1
2 changed files with 100 additions and 65 deletions

View File

@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
@@ -8,61 +8,88 @@
{% include "monitorjobs.html" %}
{% endblock %}
{% block content %}
{% block main %}
<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>
<ul class="main-content">
{% if graphs %}
<li class="grid_2">
<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>
</li>
<li class="grid_2">
<p>
<span>
{% if graphs.has_previous %}
{% if request.GET.q %}
<a class="wh" href="?page=1&q={{ request.GET.q }}">
<i class="fas fa-arrow-alt-to-left"></i>
</a>
<a class="wh" href="?page={{ workouts.previous_page_number }}&q={{ request.GET.q }}">
<i class="fas fa-arrow-alt-left"></i>
</a>
{% else %}
<a class="wh" href="?page=1">
<i class="fas fa-arrow-alt-to-left"></i>
</a>
<a class="wh" href="?page={{ graphs.previous_page_number }}">
<i class="fas fa-arrow-alt-left"></i>
</a>
{% endif %}
{% endif %}
<span>
Page {{ graphs.number }} of {{ graphs.paginator.num_pages }}.
</span>
{% if graphs.has_next %}
{% if request.GET.q %}
<a class="wh" href="?page={{ graphs.next_page_number }}&q={{ request.GET.q }}">
<i class="fas fa-arrow-alt-right"></i>
</a>
<a class="wh" href="?page={{ graphs.paginator.num_pages }}&q={{ request.GET.q }}">
<i class="fas fa-arrow-alt-to-right">
</a>
{% else %}
<a class="wh" href="?page={{ graphs.next_page_number }}">
<i class="fas fa-arrow-alt-right"></i>
</a>
<a class="wh" href="?page={{ graphs.paginator.num_pages }}">
<i class="fas fa-arrow-alt-to-right"></i>
</a>
{% endif %}
{% endif %}
</span>
</p>
</li>
{% for graph in graphs %}
<li>
<p class="caption">
<a href="/rowers/graph/{{ graph.id }}/">
<img src="/{{ graph.filename }}"
onerror="this.src='/static/img/rowingtimer.gif'"
alt="{{ graph.filename }}" width="120" height="100">
</a>
</p>
<p class="caption">{{ graph.workout.name }}</p>
</li>
{% endfor %}
{% else %}
<li class="grid_4">
<p>
No charts found
</p>
</li>
{% endif %}
</ul>
{% 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/rowingtimer.gif'"
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/rowingtimer.gif'"
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 %}
{% block sidebar %}
{% include 'menu_workouts.html' %}
{% endblock %}