From 4d89711b582aff579dd326c175bbda74108d114d Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Mon, 17 Dec 2018 09:46:23 +0100 Subject: [PATCH] improved race filtering --- rowers/forms.py | 6 +++--- rowers/templates/summary_edit.html | 2 +- rowers/templates/virtualevent.html | 10 ++++------ rowers/templates/workout_form.html | 2 +- rowers/views.py | 13 ------------- 5 files changed, 9 insertions(+), 24 deletions(-) diff --git a/rowers/forms.py b/rowers/forms.py index 3d7a7070..fc4de42a 100644 --- a/rowers/forms.py +++ b/rowers/forms.py @@ -880,8 +880,8 @@ class WorkoutSessionSelectForm(forms.Form): class RaceResultFilterForm(forms.Form): - boatclasses = (type for type in mytypes.workouttypes if type[0] in mytypes.otwtypes) - boatclassinitial = [t for t in mytypes.otwtypes] + boatclasses = (type for type in mytypes.workouttypes if type[0] in mytypes.rowtypes) + boatclassinitial = [t for t in mytypes.rowtypes] sexchoices = ( ('female','Female'), ('male','Male'), @@ -904,7 +904,7 @@ class RaceResultFilterForm(forms.Form): boatclass = forms.MultipleChoiceField( choices=boatclasses, initial=boatclassinitial, - label='Boat Class', + label='Boat/Erg Class', widget=forms.CheckboxSelectMultiple()) boattype = forms.MultipleChoiceField( diff --git a/rowers/templates/summary_edit.html b/rowers/templates/summary_edit.html index f0bc4592..5d61d6bf 100644 --- a/rowers/templates/summary_edit.html +++ b/rowers/templates/summary_edit.html @@ -100,7 +100,7 @@
  • Detailed Summary Edit

    -

    This is still experimental and there are known bugs. Use at your own risk. Nothing is stored permanently until you hit Save on the summary above. You can use the restore original button to restore the original values.

    +

    This is still experimental and there are known bugs. Use at your own risk. Nothing is stored permanently until you hit Save in the Updated Summary section. You can use the restore original button to restore the original values.

    diff --git a/rowers/templates/virtualevent.html b/rowers/templates/virtualevent.html index cd71ec5d..55756c53 100644 --- a/rowers/templates/virtualevent.html +++ b/rowers/templates/virtualevent.html @@ -245,8 +245,8 @@ - {% if race.sessiontype == 'race' %} + {% if race.sessiontype == 'race' %} {% endif %} @@ -273,8 +273,8 @@ {{ result.adaptiveclass }} {% endif %} - {% if race.sessiontype == 'race' %} + {% if race.sessiontype == 'race' %} {% endif %} @@ -308,8 +308,8 @@ {{ result.adaptiveclass }} {% endif %} - {% if race.sessiontype == 'race' %} + {% if race.sessiontype == 'race' %} {% endif %} @@ -366,11 +366,9 @@ + {% if race.sessiontype == 'race' %} - - {% else %} - {% endif %} diff --git a/rowers/templates/workout_form.html b/rowers/templates/workout_form.html index d2fd7321..59136d08 100644 --- a/rowers/templates/workout_form.html +++ b/rowers/templates/workout_form.html @@ -119,7 +119,7 @@ $('#id_workouttype').change();

    {% if indoorraces %} -
  • +
  • Racing

    {% for race in indoorraces %}

    diff --git a/rowers/views.py b/rowers/views.py index c7b4d897..609192f0 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -17595,14 +17595,6 @@ def virtualevent_submit_result_view(request,id=0,workoutid=0): selectedworkout = w_form.cleaned_data['workouts'] splitsecond = 0 recordid = w_form.cleaned_data['record'] -# splittime = w_form.cleaned_data['evaluate_after'] -# if splittime is not None: -# splitsecond = splittime.hour*3600 -# splitsecond += splittime.minute*60 -# splitsecond += splittime.second -# splitsecond += splittime.microsecond/1.e6 -# else: -# splitsecond = 0 else: selectedworkout = None @@ -17621,11 +17613,6 @@ def virtualevent_submit_result_view(request,id=0,workoutid=0): workouts,race,r,recordid=recordid) - # if result: -# for w in ws: -# remove_workout_plannedsession(w,race) -# delete_race_result(w,race) - for c in comments: messages.info(request,c) for er in errors:

  •      ClassBoatTime{{ result.boatclass }}{{ result.boattype }}{{ result.duration |durationprint:"%H:%M:%S.%f" }}{{ result.boatclass }}{{ result.boattype }}DNS
    {{ record.username }} {{ record.teamname }}{{ record.boatclass }}{{ record.boatclass }} {{ record.boattype }}{{ record.boatclass }}{{ record.age }} {{ record.sex }}