finally making admin widgets work
This commit is contained in:
@@ -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 %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user