Private
Public Access
1
0

standards_view and standard_view

This commit is contained in:
Sander Roosendaal
2020-05-26 16:47:49 +02:00
parent 08c7562c51
commit b953d2714b
8 changed files with 247 additions and 3 deletions

View File

@@ -0,0 +1,84 @@
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Rowsandall Course Standards List{% endblock %}
{% block scripts %}
{% endblock %}
{% block main %}
<style>
#mypointer {
cursor: pointer;
}
</style>
<h1>Standards Collections</h1>
<ul class="main-content">
<li class="grid_3">
{% if standards %}
<p>
<table width="100%" class="listtable shortpadded">
<thead>
<tr>
<th> Name</th>
<th> Maintainer</th>
</tr>
</thead>
<tbody>
{% for standard in standards %}
<tr>
<td>{{ standard.name }} </td>
<td>{{ standard.manager.first_name }} {{ standard.manager.last_name }}</td>
<td>
{% if standard.manager == user %}
<a href="/rowers/standards/{{ standard.id }}/">{{ standard.name }}</a>
{% else %}
<a href="/rowers/standards/{{ standard.id }}/">{{ standard.name }}</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
{% else %}
<p> No standards found </p>
{% endif %}
</li>
<li>
<p>
<form id="searchform" action="/rowers/list-standards/"
method="get" accept-charset="utf-8">
{{ searchform }}
<input type="submit" value="GO"></input>
</form>
</p>
<p>
<a href="/rowers/standards/upload/">Add Standards</a>
</p>
</li>
<li class="grid_4">
<h2>How-to</h2>
<p>
A set of Course Standard Times allows you to calculate a score for
each participant on how well they have done against the course
standard time for their category. This allows for comparison
and competition between the different categories.
</p>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_racing.html' %}
{% endblock %}

View File

@@ -131,6 +131,11 @@
</ul>
</li>
{% endif %}
<li id="standards">
<a href="/rowers/list-standards/">
<i class="fas fa-award fa-fw"></i>&nbsp;Course Time Standards
</a>
</li>
</ul> <!-- cd-accordion-menu -->
{% include 'menuscript.html' %}

View File

@@ -0,0 +1,72 @@
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% load leaflet_tags %}
{% block meta %}
{% leaflet_js %}
{% leaflet_css %}
{% endblock %}
{% block scripts %}
{% include "monitorjobs.html" %}
{% endblock %}
{% block title %}{{ standard.name }} {% endblock %}
{% block og_title %}{{ standard.name }} {% endblock %}
{% block main %}
<h1>{{ standard.name }}</h1>
<ul class="main-content">
<li class="grid_2">
<table class="listtable shortpadded" width="100%">
<tr>
<th>Name</th><td>{{ collection.name }}</td>
</tr>
<tr>
<th>Manager</th><td>{{ collection.manager.first_name }} {{ collection.manager.last_name }}</td>
</tr>
<tr>
<th>Notes</th><td>{{ collection.notes|linebreaks }}</td>
</tr>
</table>
</li>
<li class="grid_4">
<h2>Standard Times</h2>
<table class="listtable shortpadded" width="100%"?
<tr>
<th>Name<a href="?order_by=name">&#9650;</a><a href="?order_by=-name">&#9660;</a></th>
<th>Distance<a href="?order_by=coursedistance">&#9650;</a><a href="?order_by=-coursedistance">&#9660;</a></th>
<th>Standard Time<a href="?order_by=coursetime">&#9650;</a><a href="?order_by=-coursetime">&#9660;</a></th>
<th>Boat Class<a href="?order_by=boatclass">&#9650;</a><a href="?order_by=-boatclass">&#9660;</a></th>
<th>Boat Type<a href="?order_by=boattype">&#9650;</a><a href="?order_by=-boattype">&#9660;</a></th>
<th>Gender<a href="?order_by=sex">&#9650;</a><a href="?order_by=-sex">&#9660;</a></th>
<th>Weight Class<a href="?order_by=weightclass">&#9650;</a><a href="?order_by=-weightclass">&#9660;</a></th>
<th>Adaptive Class<a href="?order_by=adaptiveclass">&#9650;</a><a href="?order_by=-adaptiveclass">&#9660;</a></th>
<th>Skill Class<a href="?order_by=skillclass">&#9650;</a><a href="?order_by=-skillclass">&#9660;</a></th>
<th>Minimum<a href="?order_by=agemin">&#9650;</a><a href="?order_by=-agemin">&#9660;</a>/Maximum Age<a href="?order_by=agemax">&#9650;</a><a href="?order_by=-agemax">&#9660;</a></th>
</tr>
{% for standard in standards %}
<tr>
<td>{{ standard.name }}</td>
<td>{{ standard.coursedistance }}</td>
<td>{{ standard.coursetime }}</td>
<td>{{ standard.boatclass }}</td>
<td>{{ standard.boattype }}</td>
<td>{{ standard.sex }}</td>
<td>{{ standard.weightclass }}</td>
<td>{{ standard.adaptiveclass }}</td>
<td>{{ standard.skillclass }}</td>
<td>{{ standard.agemin }}/{{ standard.agemax }}</td>
</tr>
{% endfor %}
</table>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_racing.html' %}
{% endblock %}