diff --git a/rowers/templates/flexchart3otw.html b/rowers/templates/flexchart3otw.html index bff59e38..c7f2517a 100644 --- a/rowers/templates/flexchart3otw.html +++ b/rowers/templates/flexchart3otw.html @@ -191,8 +191,8 @@ {% endif %} {% if favoritechartnotes %} -
-

{{ favoritechartnotes }}

+
+

Chart {{ favoritenr|add:1 }}:{{ favoritechartnotes }}

{% endif %}
diff --git a/rowers/templates/flexthumbnails.html b/rowers/templates/flexthumbnails.html index e036ad44..0ff56cc2 100644 --- a/rowers/templates/flexthumbnails.html +++ b/rowers/templates/flexthumbnails.html @@ -8,7 +8,9 @@ {{ chart.div | safe }} + {% if rower.showfavoritechartnotes %} {{ chart.notes }} + {% endif %} {% endfor %} diff --git a/rowers/views.py b/rowers/views.py index 783e5d90..e40aedfb 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -6034,6 +6034,7 @@ def workout_workflow_view(request,id): 'mapscript':mapscript, 'mapdiv':mapdiv, 'statcharts':statcharts, + 'rower':r, }) # The famous flex chart @@ -6052,7 +6053,7 @@ def workout_flexchart3_view(request,*args,**kwargs): try: favoritenr = int(request.GET['favoritechart']) except: - favoritenr = 0 + favoritenr = -1 try: @@ -6088,7 +6089,7 @@ def workout_flexchart3_view(request,*args,**kwargs): try: t = favorites[favoritenr].xparam except IndexError: - favoritenr=0 + favoritenr=-1 if 'xparam' in kwargs: xparam = kwargs['xparam'] @@ -6118,10 +6119,12 @@ def workout_flexchart3_view(request,*args,**kwargs): else: yparam2 = 'hr' - if favoritenr and r.showfavoritechartnotes: + print favoritenr + if favoritenr>=0 and r.showfavoritechartnotes: favoritechartnotes = favorites[favoritenr].notes else: favoritechartnotes = '' + favoritenr = 0 if 'plottype' in kwargs: plottype = kwargs['plottype'] @@ -8770,6 +8773,7 @@ def rower_edit_view(request,message=""): email = ucd['email'] defaultlandingpage = cd['defaultlandingpage'] weightcategory = cd['weightcategory'] + showfavoritechartnotes = cd['showfavoritechartnotes'] getemailnotifications = cd['getemailnotifications'] defaulttimezone=cd['defaulttimezone'] u = request.user @@ -8786,6 +8790,7 @@ def rower_edit_view(request,message=""): r.weightcategory = weightcategory r.getemailnotifications = getemailnotifications r.defaultlandingpage = defaultlandingpage + r.showfavoritechartnotes = showfavoritechartnotes r.save() form = RowerForm(instance=r) powerform = RowerPowerForm(instance=r)