test type plannedsessions now have a ranking
This commit is contained in:
1
rowers/templates/.#list_workouts.html
Normal file
1
rowers/templates/.#list_workouts.html
Normal file
@@ -0,0 +1 @@
|
||||
e408191@CZ27LT9RCGN72.36632:1518629534
|
||||
@@ -155,6 +155,8 @@
|
||||
}
|
||||
if (this.value == 'test') {
|
||||
$("td #id_criterium").prop("value","exact");
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
}
|
||||
if (this.value == 'challenge') {
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
|
||||
@@ -160,6 +160,8 @@
|
||||
}
|
||||
if (this.value == 'test') {
|
||||
$("td #id_criterium").prop("value","exact");
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
}
|
||||
if (this.value == 'challenge') {
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
|
||||
@@ -119,3 +119,73 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("td #id_sessionmode").change(function() {
|
||||
|
||||
if (this.value == 'TRIMP') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
}
|
||||
if (this.value == 'distance') {
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
}
|
||||
if (this.value == 'time') {
|
||||
$("td #id_sessionunit").prop("value","min");
|
||||
}
|
||||
|
||||
if (this.value == 'rScore') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("td #id_sessiontype").change(function() {
|
||||
|
||||
if (this.value == 'session') {
|
||||
$("td #id_criterium").prop("value","none");
|
||||
}
|
||||
if (this.value == 'test') {
|
||||
$("td #id_criterium").prop("value","exact");
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
}
|
||||
if (this.value == 'challenge') {
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
}
|
||||
|
||||
if (this.value == 'cycletarget') {
|
||||
$("td #id_criterium").prop("value","none");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
$("td #id_sessionunit").change(function() {
|
||||
|
||||
if (this.value == 'm') {
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
}
|
||||
if (this.value == 'km') {
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
}
|
||||
if (this.value == 'None') {
|
||||
$("td #id_sessionmode").prop("value","rScore");
|
||||
}
|
||||
if (this.value == 'min') {
|
||||
$("td #id_sessionmode").prop("value","time");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -135,3 +135,73 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("td #id_sessionmode").change(function() {
|
||||
|
||||
if (this.value == 'TRIMP') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
}
|
||||
if (this.value == 'distance') {
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
}
|
||||
if (this.value == 'time') {
|
||||
$("td #id_sessionunit").prop("value","min");
|
||||
}
|
||||
|
||||
if (this.value == 'rScore') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("td #id_sessiontype").change(function() {
|
||||
|
||||
if (this.value == 'session') {
|
||||
$("td #id_criterium").prop("value","none");
|
||||
}
|
||||
if (this.value == 'test') {
|
||||
$("td #id_criterium").prop("value","exact");
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
}
|
||||
if (this.value == 'challenge') {
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
}
|
||||
|
||||
if (this.value == 'cycletarget') {
|
||||
$("td #id_criterium").prop("value","none");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
$("td #id_sessionunit").change(function() {
|
||||
|
||||
if (this.value == 'm') {
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
}
|
||||
if (this.value == 'km') {
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
}
|
||||
if (this.value == 'None') {
|
||||
$("td #id_sessionmode").prop("value","rScore");
|
||||
}
|
||||
if (this.value == 'min') {
|
||||
$("td #id_sessionmode").prop("value","time");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -39,6 +39,33 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id="right" class="grid_6 omega">
|
||||
{% if plannedsession.sessiontype == 'test' %}
|
||||
<h1>Ranking</h1>
|
||||
<table class="listtable shortpadded" width="80%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nr</th>
|
||||
<th>Name</th>
|
||||
<th>Distance</th>
|
||||
<th>Time</th>
|
||||
<th>Date</th>
|
||||
<th>Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for result in ranking %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ result|lookup:'name' }}</td>
|
||||
<td>{{ result|lookup:'distance' }}</td>
|
||||
<td>{{ result|lookup:'time'|durationprint:"%H:%M:%S.%f" }}</td>
|
||||
<td>{{ result|lookup:'date'|date:"Y-m-d" }}</td>
|
||||
<td>{{ result|lookup:'type' }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<h1>Workouts attached</h1>
|
||||
<table class="listtable shortpadded" width="80%">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user