Private
Public Access
1
0

Merge branch 'release/v6.11'

This commit is contained in:
Sander Roosendaal
2018-03-08 08:39:40 +01:00
6 changed files with 28 additions and 5 deletions
+13 -1
View File
@@ -3149,11 +3149,23 @@ def thumbnails_set(r,id,favorites):
rowdata.dropna(axis=1,how='all',inplace=True) rowdata.dropna(axis=1,how='all',inplace=True)
if rowdata.empty: if rowdata.empty:
return [ try:
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=False,
workstrokesonly=False)
except:
return [
{'script':"",
'div':"",
'notes':""
}]
if rowdata.empty:
return [
{'script':"", {'script':"",
'div':"", 'div':"",
'notes':"" 'notes':""
}] }]
else: else:
try: try:
rowdata.sort_values(by='time',ascending=True,inplace=True) rowdata.sort_values(by='time',ascending=True,inplace=True)
+2 -2
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>
+3
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 %}
+5 -1
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>
+4
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,
}) })
+1 -1
View File
@@ -94,7 +94,7 @@ MIDDLEWARE_CLASSES = [
'async_messages.middleware.AsyncMiddleware', 'async_messages.middleware.AsyncMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'tz_detect.middleware.TimezoneMiddleware', 'tz_detect.middleware.TimezoneMiddleware',
'rowers.middleware.GDPRMiddleWare', # 'rowers.middleware.GDPRMiddleWare',
'rowers.middleware.PowerTimeFitnessMetricMiddleWare', 'rowers.middleware.PowerTimeFitnessMetricMiddleWare',
] ]