Private
Public Access
1
0

finally making admin widgets work

This commit is contained in:
Sander Roosendaal
2019-02-19 21:04:40 +01:00
parent 8575443220
commit e388d56177
6 changed files with 32 additions and 5 deletions

View File

@@ -189,7 +189,7 @@
</td>
<td> {{ workout.date|date:"Y-m-d" }} </td>
<td> {{ workout.starttime|date:"H:i" }} </td>
{% if workout.user.user == user or user == team.manager %}
{% if workout|may_edit:request %}
{% if workout.name != '' %}
<td>
<a href={% url rower.defaultlandingpage id=workout.id|encode %}>
@@ -215,18 +215,27 @@
<td> {{ workout.maxhr }} </td>
{% if team %}
<td colspan="2">
{% if workout|may_edit:request %}
<a class="small" href="/rowers/{{ workout.user.id }}/list-workouts/">
{{ 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 %}
<a class="small"
href="/rowers/workout/{{ workout.id|encode }}/edit/"
title="Edit">
<i class="fas fa-pencil-alt fa-fw"></i>
</a>
{% else %}
&nbsp;
{% endif %}
</td>
<td>
<a class="small"
@@ -236,17 +245,25 @@
</a>
</td>
<td>
{% if workout|may_edit:request %}
<a class="small"
href="/rowers/workout/{{ workout.id|encode }}/stats/"
title="Stats">
<i class="fal fa-table fa-fw"></i>
</a>
{% else %}
&nbsp;
{% endif %}
</td>
<td>
{% if workout.user.user == user or user == team.manager %}
<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>
</tr>