Private
Public Access
1
0

added user names to workouts to help coaches

This commit is contained in:
Sander Roosendaal
2018-03-08 08:38:44 +01:00
parent dd77159c8d
commit b4074f50ce
4 changed files with 14 additions and 3 deletions

View File

@@ -101,10 +101,10 @@
<td> <td>
{% if ps.name != '' %} {% if ps.name != '' %}
<a class="small" <a class="small"
href="/rowers/sessions/{{ ps.id }}">{{ ps.name }}</a> href="/rowers/sessions/{{ ps.id }}/{{ timeperiod }}/rower/{{ rower.id }}">{{ ps.name }}</a>
{% else %} {% else %}
<a class="small" <a class="small"
href="/rowers/sessions/{{ ps.id }}">Unnamed Session</a> href="/rowers/sessions/{{ ps.id }}/{{ timeperiod }}/rower/{{ rower.id }}">Unnamed Session</a>
{% endif %} {% endif %}
</td> </td>
<td> {{ ps.get_sessiontype_display }} </td> <td> {{ ps.get_sessiontype_display }} </td>

View File

@@ -72,6 +72,9 @@
<div id="page" class="grid_12 alpha"> <div id="page" class="grid_12 alpha">
<div class="grid_10 prefix_2 alpha"> <div class="grid_10 prefix_2 alpha">
<h1>{{ workout.name }}</h1> <h1>{{ workout.name }}</h1>
{% if workout.user.user != user %}
<h2>{{ workout.user.user.first_name }} {{ workout.user.user.last_name }}
{% endif %}
</div> </div>
<div id="leftpanel" class="grid_2 alpha"> <div id="leftpanel" class="grid_2 alpha">
{% block left_panel %} {% block left_panel %}

View File

@@ -70,7 +70,11 @@
<div class="grid_6 alpha"> <div class="grid_6 alpha">
<table width=100%> <table width=100%>
<tr> <tr>
{% localtime on %} {% localtime on %}
{% if workout.user.user != user %}
<th>Rower:</th><td>{{ rower.user.first_name }} {{ rower.user.last_name }}</td>
</tr><tr>
{% endif %}
<th>Date/Time:</th><td>{{ workout.startdatetime|localtime}}</td> <th>Date/Time:</th><td>{{ workout.startdatetime|localtime}}</td>
{% endlocaltime %} {% endlocaltime %}
</tr><tr> </tr><tr>

View File

@@ -8067,6 +8067,8 @@ def workout_flexchart3_view(request,*args,**kwargs):
promember=1 promember=1
if request.user == row.user.user: if request.user == row.user.user:
mayedit=1 mayedit=1
if checkworkoutuser(request.user,row):
mayedit=1
workouttype = 'ote' workouttype = 'ote'
if row.workouttype in ('water','coastal'): if row.workouttype in ('water','coastal'):
@@ -8796,6 +8798,7 @@ def workout_edit_view(request,id=0,message="",successmessage=""):
'mapscript':mapscript, 'mapscript':mapscript,
'aantalcomments':aantalcomments, 'aantalcomments':aantalcomments,
'mapdiv':mapdiv, 'mapdiv':mapdiv,
'rower':r,
}) })
else: else:
@@ -8808,6 +8811,7 @@ def workout_edit_view(request,id=0,message="",successmessage=""):
'mapscript':mapscript, 'mapscript':mapscript,
'aantalcomments':aantalcomments, 'aantalcomments':aantalcomments,
'mapdiv':mapdiv, 'mapdiv':mapdiv,
'rower':r,
}) })