83 lines
2.3 KiB
HTML
83 lines
2.3 KiB
HTML
{% extends "newbase.html" %}
|
|
{% load static %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}Workouts{% endblock %}
|
|
|
|
{% block main %}
|
|
<h1>Available on NK Logbook</h1>
|
|
<ul class="main-content">
|
|
{% if workouts %}
|
|
<li>
|
|
<a href="/rowers/workout/nkimport/all/{{ startdate }}/{{ enddate }}" class="blue button">Import all NEW</a>
|
|
</li>
|
|
<li class="grid_3">
|
|
<p>This imports all workouts that have not been imported to rowsandall.com.
|
|
The action may take a longer time to process, so please be patient. Click on Import in the list below to import an individual workout.
|
|
</p>
|
|
</li>
|
|
{% endif %}
|
|
<li class="grid_2">
|
|
<form enctype="multipart/form-data" method="post">
|
|
<table>
|
|
{{ dateform.as_table }}
|
|
</table>
|
|
{% csrf_token %}
|
|
<input name='daterange' type="submit" value="Select Dates">
|
|
</form>
|
|
</li>
|
|
|
|
{% if workouts %}
|
|
<li class="grid_4">
|
|
<form enctype="multipart/form-data" method="post">
|
|
{% csrf_token %}
|
|
<input name='workouts' type="submit" value="Import selected workouts">
|
|
<a href="/rowers/workout/nkimport/?selectallnew=true">Select All New</a>
|
|
<table width="70%" class="listtable">
|
|
<thead>
|
|
<tr>
|
|
<th> Import </th>
|
|
<th> Name</th>
|
|
<th> Date</th>
|
|
<th> Duration </th>
|
|
<th> Distance </th>
|
|
<th> New</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for workout in workouts %}
|
|
<tr>
|
|
<td>
|
|
{% if workout|lookup:'new' == 'NEW' and checknew == 'true' %}
|
|
<input checked type="checkbox" value={{ workout|lookup:'id' }} name="workoutid">
|
|
{% else %}
|
|
<input type="checkbox" value={{ workout|lookup:'id' }} name="workoutid">
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ workout|lookuplong:'name' }}</td>
|
|
<td class="block" style="width:auto">{{ workout|lookuplong:'starttime' }}</td>
|
|
<td>{{ workout|lookup:'duration' }} </td>
|
|
<td>{{ workout|lookup:'distance' }} m</td>
|
|
<td>{{ workout|lookup:'new' }}</td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</li>
|
|
{% else %}
|
|
<li class="grid_4">
|
|
<p>
|
|
No workouts found
|
|
</p>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
{% block sidebar %}
|
|
{% include 'menu_workouts.html' %}
|
|
{% endblock %}
|