142 lines
3.8 KiB
HTML
142 lines
3.8 KiB
HTML
{% extends "base.html" %}
|
|
{% load staticfiles %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}Rowsandall Courses List{% endblock %}
|
|
|
|
{% block scripts %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<style>
|
|
#mypointer {
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
<div class="grid_12">
|
|
|
|
<div id="courses_table" class="grid_8 alpha">
|
|
<h3>Courses</h3>
|
|
|
|
{% if courses %}
|
|
<table width="100%" class="listtable shortpadded">
|
|
<thead>
|
|
<tr>
|
|
<th> Country</th>
|
|
<th> Name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for course in courses %}
|
|
<td> {{ course.country }} </td>
|
|
<td>
|
|
{% if course.manager.user == user %}
|
|
<a href="/rowers/courses/{{ course.id }}/edit">{{ course.name }}</a>
|
|
{% else %}
|
|
<a href="/rowers/courses/{{ course.id }}">{{ course.name }}</a>
|
|
{% endif %}
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p> No courses found </p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
|
|
<div class="grid_4 omega">
|
|
<div class="grid_4" id="announcements">
|
|
{% if announcements %}
|
|
<h3>What's New?</h3>
|
|
{% for a in announcements %}
|
|
<div class="site-announcement-box">
|
|
<div class="site-announcement">
|
|
<i>{{ a.created }}:</i>
|
|
{{ a.announcement|urlize }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
<p> </p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="grid_4" id="about">
|
|
<h3>About</h3>
|
|
<p>This site is a beta site, pioneering rowing data visualization and analysis. No warranties. The site's author is
|
|
Sander Roosendaal. A Masters rower.
|
|
|
|
Read his <a href="http://blog.rowsandall.com/">blog</a>
|
|
</p>
|
|
<div style="text-align: right; padding: 2em">
|
|
<a href="http://blog.rowsandall.com/">
|
|
<img src="/static/img/sander.jpg" width="80"></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="grid_6 alpha">
|
|
{% if rankingonly and not team %}
|
|
<div class="grid_2 prefix_1 alpha">
|
|
<a class="button small green" href="/rowers/list-courses">All Courses</a>
|
|
</div>
|
|
{% elif not team %}
|
|
<div class="grid_2 prefix_1 alpha">
|
|
<a class="button small green" href="/rowers/list-courses/ranking">Ranking Pieces Only</a>
|
|
</div>
|
|
{% endif %}
|
|
<div class="grid_2 suffix_1 omega">
|
|
<a class="button small gray" href="/rowers/courses-join-select">Glue Courses</a>
|
|
</div>
|
|
<p> </p>
|
|
{% if team %}
|
|
<form id="searchform" action="/rowers/list-courses/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
|
method="get" accept-charset="utf-8">
|
|
{% else %}
|
|
<form id="searchform" action="/rowers/list-courses/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
|
method="get" accept-charset="utf-8">
|
|
{% endif %}
|
|
<div class="grid_3 prefix_1 alpha">
|
|
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
|
</div>
|
|
<div class="grid_1 omega">
|
|
<button class="button blue small" type="submit">
|
|
Search
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="grid_2 omega">
|
|
<span class="button gray small">
|
|
{% if courses.has_previous %}
|
|
{% if request.GET.q %}
|
|
<a class="wh" href="?page={{ courses.previous_page_number }}&q={{ request.GET.q }}"><</a>
|
|
{% else %}
|
|
<a class="wh" href="?page={{ courses.previous_page_number }}"><</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<span>
|
|
Page {{ courses.number }} of {{ courses.paginator.num_pages }}.
|
|
</span>
|
|
|
|
{% if courses.has_next %}
|
|
{% if request.GET.q %}
|
|
<a class="wh" href="?page={{ courses.next_page_number }}&q={{ request.GET.q }}">></a>
|
|
{% else %}
|
|
<a class="wh" href="?page={{ courses.next_page_number }}">></a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</span>
|
|
|
|
{% endblock %}
|