Private
Public Access
1
0

gets a tcx for new workouts

This commit is contained in:
Sander Roosendaal
2018-06-05 16:16:16 +02:00
parent 3dd8921f54
commit aa0431740b
4 changed files with 197 additions and 11 deletions

View File

@@ -0,0 +1,42 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Workouts{% endblock %}
{% block content %}
<h1>New Workouts Available on Polar Flow</h1>
<p>Due to a limitation in Polar Flow's API, we can only access new workouts.</p>
{% if workouts %}
<div class="grid_12 alpha">
<table width="70%" class="listtable">
<thead>
<tr>
<th> Import </th>
<th> Date</th>
<th> Duration </th>
<th> Distance </th>
<th> Type</th>
</tr>
</thead>
<tbody>
{% for workout in workouts %}
<tr>
<td>
<a href="/rowers/workout/polarimport/{{ workout|lookup:'id' }}/{{ workout|lookup:'transactionid' }}">Import</a></td>
<td>{{ workout|lookup:'starttime' }}</td>
<td>{{ workout|lookup:'duration' }} </td>
<td>{{ workout|lookup:'distance' }} m</td>
<td>{{ workout|lookup:'type' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p> No new workouts found </p>
{% endif %}
{% endblock %}