From e764daeee1061c1ccbfb0be555989ec1fc5373b4 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 17 Oct 2018 20:58:02 +0200 Subject: [PATCH] fixes --- rowers/templates/menu_workout.html | 10 +++++----- rowers/templates/summary_edit.html | 32 ++++++++++++++++++++++++++++++ rowers/views.py | 6 +++++- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/rowers/templates/menu_workout.html b/rowers/templates/menu_workout.html index 01a2f1d8..5164c65f 100644 --- a/rowers/templates/menu_workout.html +++ b/rowers/templates/menu_workout.html @@ -49,6 +49,11 @@ --> {% if user.is_authenticated and workout|may_edit:request %} +
  • + +  Upload Image + +
  •  Delete @@ -117,11 +122,6 @@
  • {% endif %} -
  • - -  Upload Image - -
  • diff --git a/rowers/templates/summary_edit.html b/rowers/templates/summary_edit.html index d4de5063..62957cca 100644 --- a/rowers/templates/summary_edit.html +++ b/rowers/templates/summary_edit.html @@ -87,6 +87,38 @@

  • +
  • +

    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.

    +
    + + + + + + + + {% for i in nrintervals|times %} + + + + + + + {% endfor %} + +
    #TimeDistanceType
    {{ i }}  + {% get_field_id i "intervalt_" detailform %} + + {% get_field_id i "intervald_" detailform %} + + {% get_field_id i "type_" detailform %} +
    + {% csrf_token %} + + +
    +
  • Interval Shorthand How-To

    This is a quick way to enter the intervals using a special mini-language.

    diff --git a/rowers/views.py b/rowers/views.py index 0b761670..8a7d3440 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -11961,7 +11961,11 @@ def workout_summary_edit_view(request,id,message="",successmessage="" rowdata.updateintervaldata(ivalues,iunits,itypes,iresults=iresults) intervalstats = rowdata.allstats() row.summary = intervalstats - row.notes += "\n"+s + try: + row.notes += "\n"+s + except TypeError: + pass + row.save() rowdata.write_csv(f1,gzip=True) dataprep.update_strokedata(id,rowdata.df)