Private
Public Access
1
0

Merge branch 'feature/localtime' into develop

This commit is contained in:
Sander Roosendaal
2017-09-21 21:32:31 +02:00
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -51,7 +51,7 @@
<table width="100%" class="listtable shortpadded"> <table width="100%" class="listtable shortpadded">
<thead> <thead>
<tr> <tr>
<th style="width:80px"> Date</th> <th style="width:80"> Date</th>
<th> Time</th> <th> Time</th>
<th> Name</th> <th> Name</th>
<th> Type</th> <th> Type</th>
@@ -76,8 +76,8 @@
{% else %} {% else %}
<tr> <tr>
{% endif %} {% endif %}
<td> {{ workout.date |truncatechars:15}} </td> <td> {{ workout.date|date:"Y-m-d" }} </td>
<td> {{ workout.starttime }} </td> <td> {{ workout.starttime|date:"H:i" }} </td>
<td> <td>
{% if workout.user.user == user or user == team.manager %} {% if workout.user.user == user or user == team.manager %}
{% if workout.rankingpiece %} {% if workout.rankingpiece %}
+4 -4
View File
@@ -4341,17 +4341,17 @@ def workouts_view(request,message='',successmessage='',
if theteam.viewing == 'allmembers' or theteam.manager == request.user: if theteam.viewing == 'allmembers' or theteam.manager == request.user:
workouts = Workout.objects.filter(team=theteam, workouts = Workout.objects.filter(team=theteam,
startdatetime__gte=startdate, startdatetime__gte=startdate,
startdatetime__lte=enddate).order_by("-date", "-starttime") startdatetime__lte=enddate).order_by("-startdatetime")
g_workouts = Workout.objects.filter(team=theteam, g_workouts = Workout.objects.filter(team=theteam,
startdatetime__gte=activity_startdate, startdatetime__gte=activity_startdate,
startdatetime__lte=activity_enddate).order_by("-date", "-starttime") startdatetime__lte=activity_enddate).order_by("-date", "-starttime")
elif theteam.viewing == 'coachonly': elif theteam.viewing == 'coachonly':
workouts = Workout.objects.filter(team=theteam,user=r, workouts = Workout.objects.filter(team=theteam,user=r,
startdatetime__gte=startdate, startdatetime__gte=startdate,
startdatetime__lte=enddate).order_by("-date","-starttime") startdatetime__lte=enddate).order_by("-startdatetime")
g_workouts = Workout.objects.filter(team=theteam,user=r, g_workouts = Workout.objects.filter(team=theteam,user=r,
startdatetime__gte=activity_startdate, startdatetime__gte=activity_startdate,
enddatetime__lte=activity_enddate).order_by("-date","-starttime") enddatetime__lte=activity_enddate).order_by("-startdatetime")
else: else:
@@ -4361,7 +4361,7 @@ def workouts_view(request,message='',successmessage='',
startdatetime__lte=enddate).order_by("-date", "-starttime") startdatetime__lte=enddate).order_by("-date", "-starttime")
g_workouts = Workout.objects.filter(user=r, g_workouts = Workout.objects.filter(user=r,
startdatetime__gte=activity_startdate, startdatetime__gte=activity_startdate,
startdatetime__lte=activity_enddate).order_by("-date","-starttime") startdatetime__lte=activity_enddate).order_by("-startdatetime")
query = request.GET.get('q') query = request.GET.get('q')
if query: if query: