Private
Public Access
1
0

als tabel

This commit is contained in:
Sander Roosendaal
2021-12-27 10:13:24 +01:00
parent 06945b68c3
commit 113c2d0f05

View File

@@ -153,134 +153,41 @@
</span>
</p>
</li>
<li class="maxheight grid_4">
<li class="grid_4">
{% if workouts %}
<table width="100%" class="listtable shortpadded" style="word-break: break-all">
<thead>
<tr>
<th> R</th>
<th style="width:80"> Date</th>
<th> Time</th>
<th> Name</th>
<th> Type</th>
<th> Distance </th>
<th> Duration </th>
<th> Avg HR </th>
<th> Max HR </th>
{% if not team %}
<th> &nbsp;</th>
{% else %}
<th colspan="2">
Owner
</th>
{% endif %}
</tr>
</thead>
<table class="listtable " style="width:100%">
<tbody>
{% for workout in workouts %}
{% if workout.rankingpiece %}
<tr style="font-weight:bold">
{% else %}
<tr>
{% endif %}
<td id="mypointer"
class="rankingtoggle" workoutid="{{ workout.id|encode }}">
{% if workout.rankingpiece %}
<span id="star{{ workout.id|encode }}" class="yellow">&star;</span>
{% else %}
<span id="star{{ workout.id|encode }}" class="notyellow">&star;</span>
{% endif %}
</td>
<td> {{ workout.date|date:"Y-m-d" }} </td>
<td> {{ workout.starttime|date:"H:i" }} </td>
{% if workout|may_edit:request %}
{% if workout.name != '' %}
<td>
<a href={% url rower.defaultlandingpage id=workout.id|encode %}>
{{ workout.workouttype }}
</td>
<td>
{% if workout.name != '' %}
<h2>
{{ workout.name }}
</a>
</h2>
{% else %}
<h2>
No Name
</h2>
{% endif %}
<p> {{ workout.date|date:"Y-m-d" }} {{ workout.starttime|date:"H:i" }} </p>
<p>{{ workout.distance }}m {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </p>
</td>
{% else %}
<td>
<a href={% url rower.defaultlandingpage id=workout.id|encode %}>No Name
</a></td>
{% endif %}
{% else %}
{% if workout.name != '' %}
<td><a href="/rowers/workout/{{ workout.id|encode }}/">{{ workout.name }}</a></td>
{% else %}
<td><a href="/rowers/workout/{{ workout.id|encode }}/">No Name</a> </td>
{% endif %}
{% endif %}
<td> {{ workout.workouttype }} </td>
<td> {{ workout.distance }}m</td>
<td> {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </td>
<td> {{ workout.averagehr }} </td>
<td> {{ workout.maxhr }} </td>
{% if team %}
<td colspan="2">
{% if workout|may_edit:request %}
<a class="small" href="/rowers/list-workouts/user/{{ workout.user.user.id }}/">
{{ workout.user.user.first_name }}
{{ workout.user.user.last_name }}
</a>
{% else %}
{{ workout.user.user.first_name }}
{{ workout.user.user.last_name }}
{% endif %}
</td>
{% endif %}
<td>
{% if workout|may_edit:request %}
<p>{% if workout|may_edit:request %}
<a class="small"
href="/rowers/workout/{{ workout.id|encode }}/edit/"
href={% url rower.defaultlandingpage id=workout.id|encode %}
title="Edit">
<i class="fas fa-pencil-alt fa-fw"></i>
<i class="fas fa-search fa-fw"></i>
</a>
{% else %}
&nbsp;
{% endif %}
</td>
<td>
<a class="small"
href="/rowers/user-analysis-select/{{ user.rower.fav_analysis }}/workout/{{ workout.id|encode }}/"
title="{{ user.rower.fav_analysis|verbose }}">
<i class="fas {{ user.rower.fav_analysis|icon }} fa-fw"></i>
</a>
</td>
<td>
<a class="small"
href="/rowers/workout/{{ workout.id|encode }}/flexchartstacked/"
title="Chart Stack">
<i class="fas fa-align-justify fa-fw"></i>
</a>
</td>
<td>
<a class="small"
href="/rowers/workout/{{ workout.id|encode }}/flexchart/"
title="Flex Chart">
<i class="fas fa-chart-line fa-fw"></i>
</a>
</td>
<td>
<a class="small"
href="/rowers/workout/{{ workout.id|encode }}/stats/"
title="Stats">
<i class="fal fa-table fa-fw"></i>
</a>
</td>
<td>
{% if workout|may_edit:request %}
<a class="small" href="/rowers/workout/{{ workout.id|encode }}/delete/"
title="Delete">
<i class="fas fa-trash-alt fa-fw"></i>
</a>
{% else %}
&nbsp;
{% endif %}
</td>
</p>
</td>
</tr>
{% endfor %}