Private
Public Access
1
0

expansion to workout_course page

This commit is contained in:
Sander Roosendaal
2021-10-13 21:24:56 +02:00
parent c59e951033
commit 283c7cb996
4 changed files with 141 additions and 0 deletions

View File

@@ -26,6 +26,18 @@
<i class="fas fa-pause fa-fw"></i>&nbsp;Intervals
</a>
</li>
{% if workout|water %}
<li id="workout-courses">
<a href="/rowers/workout/{{ workout.id|encode }}/courses/">
<i class="fas fa-route fa-fw"></i>&nbsp;Measured Courses
</a>
</li>
{% endif %}
<li>
<a href="/rowers/workout/{{ workout.id|encode }}/editintervals/">
<i class="fas fa-pause fa-fw"></i>&nbsp;Intervals
</a>
</li>
{% endif %}
{% if user.is_authenticated %}
<li id="workout-comments">

View File

@@ -0,0 +1,79 @@
{% extends "newbase.html" %}
{% load static %}
{% load rowerfilters %}
{% load leaflet_tags %}
{% block meta %}
{% leaflet_js %}
{% leaflet_css %}
{% endblock %}
{% block scripts %}
{% endblock %}
{% block title %}{{ workout.name }} {% endblock %}
{% block og_title %}{{ workout.name }} {% endblock %}
{% block description %}{{ workout.name }}
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
{% block og_description %}{{ workout.name }}
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
{% block main %}
<h1>{{ workout.name }}</h1>
<ul class="main-content">
<li class="grid_2">
{% if records %}
<li class="grid_4">
<h2>Course Results</h2>
<table class="listtable shortpadded">
<thead>
<tr>
<th>Course</th>
<th>Time</th>
<th>Distance</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td><a href="/rowers/courses/{{ record.course.id }}">{{ record.course.name }}</a></td>
<td>{{ record.duration |durationprint:"%H:%M:%S.%f" }}</td>
<td>{{ record.distance }} m</td>
{% endfor %}
</tbody>
</table>
</li>
{% endif %}
<table width=100%>
<tr>
<th>Rower:</th><td>{{ first_name }} {{ last_name }}</td>
</tr><tr>
<tr>
<th>Name:</th><td>{{ workout.name }}</td>
</tr><tr>
<tr>
<th>Date:</th><td>{{ workout.date }}</td>
</tr><tr>
<th>Time:</th><td>{{ workout.starttime }}</td>
</tr><tr>
<th>Distance:</th><td>{{ workout.distance }}m</td>
</tr><tr>
<th>Duration:</th><td>{{ workout.duration |durationprint:"%H:%M:%S.%f" }}</td>
</tr><tr>
<th>Type:</th><td>{{ workout.workouttype }}</td>
</tr><tr>
<th>Weight Category:</th><td>{{ workout.weightcategory }}</td>
</tr>
</table>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_workout.html' %}
{% endblock %}