diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 72f70a09..f2f5004b 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -181,7 +181,7 @@ def interactive_boxchart(datadf,fieldname,extratitle=''): tools=TOOLS, toolbar_location="above", toolbar_sticky=False, - x_mapper_type='datetime') + x_mapper_type='datetime',plot_width=920) yrange1 = Range1d(start=yaxminima[fieldname],end=yaxmaxima[fieldname]) plot.y_range = yrange1 @@ -2365,7 +2365,7 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='', plot = Figure(x_axis_type=x_axis_type,y_axis_type=y_axis_type, tools=TOOLS, toolbar_location="above", - toolbar_sticky=False) #,plot_width=500,plot_height=500) + toolbar_sticky=False,plot_width=920) # add watermark plot.extra_y_ranges = {"watermark": watermarkrange} diff --git a/rowers/templates/gdpr_optin.html b/rowers/templates/gdpr_optin.html index f340bd93..bc2bb898 100644 --- a/rowers/templates/gdpr_optin.html +++ b/rowers/templates/gdpr_optin.html @@ -1,53 +1,52 @@ -{% extends "base.html" %} +{% extends "newbase.html" %} {% load staticfiles %} {% load rowerfilters %} {% block title %}GDPR Opt-In{% endblock %} -{% block content %} -
-

GDPR Opt-In

-

- - To comply with the European Union General Data Protection Regulation, - we need to record your consent to use personal data on this website. - Please take some time to review our data policies. If you agree and - opt in, click the green button at the bottom to be taken to the site. - If you do not agree, please use the red button to delete your - account. This will irreversibly delete all your data on rowsandall.com - and remove your account. - -

-
+{% block main %} +

GDPR Opt-In

+

+ + To comply with the European Union General Data Protection Regulation, + we need to record your consent to use personal data on this website. + Please take some time to review our data policies. If you agree and + opt in, click the green button at the bottom to be taken to the site. + If you do not agree, please use the red button to delete your + account. This will irreversibly delete all your data on rowsandall.com + and remove your account. + +

+
- {% include "privacypolicy.html" %} +{% include "privacypolicy.html" %} -
+
-

- To start or continue using the site, please give your consent by clicking on the green Opt In button below. -

+

+ To start or continue using the site, please give your consent by clicking on the green Opt In button below. +

-

-

-

- Download your data -

-
-

- -
- Opt in and continue -
+

+ Download your data +

+ +

+ Opt in and continue +

+ +

{% csrf_token %} -
- - -
+ +
- -
+

{% endblock %} + +{% block sidebar %} +{% include 'menu_profile.html' %} +{% endblock %} + diff --git a/rowers/templates/multiflex.html b/rowers/templates/multiflex.html index 2ab83e20..7f432a71 100644 --- a/rowers/templates/multiflex.html +++ b/rowers/templates/multiflex.html @@ -1,10 +1,10 @@ -{% extends "base.html" %} +{% extends "newbase.html" %} {% load staticfiles %} {% load rowerfilters %} {% block title %}View Comparison {% endblock %} -{% block content %} +{% block main %} - -
-

Trend Flex Chart

-
+

Trend Flex Chart

+ +
-
-
-
+ +
  • + {% csrf_token %} {{ chartform.as_table }}
    -
    -

    - -

    -
    +

    + +

  • -
    -
    + +
  • - You can use the form above to change the metric or filter the data. + You can use the form to change the metric or filter the data. Set Min SPM and Max SPM to select only strokes in a certain range of stroke rates. Set Work per Stroke to a minimum value to remove "paddle" strokes or turns.

    -
  • -
    -
    + + {% endblock %} @@ -93,3 +72,7 @@ {% endblock %} + +{% block sidebar %} +{% include 'menu_analytics.html' %} +{% endblock %} diff --git a/rowers/templates/user_multiflex_select.html b/rowers/templates/user_multiflex_select.html index 4eb69f21..2e0ede5c 100644 --- a/rowers/templates/user_multiflex_select.html +++ b/rowers/templates/user_multiflex_select.html @@ -28,7 +28,9 @@ hidden.hide(); - + if (modality.val() == 'water') { + hidden.show(); + } // Setup an event listener for when the state of the // checkbox changes. @@ -70,8 +72,14 @@ {% endif %} diff --git a/rowers/templates/userprofile_deactivate.html b/rowers/templates/userprofile_deactivate.html index 7f4b2c15..de600442 100644 --- a/rowers/templates/userprofile_deactivate.html +++ b/rowers/templates/userprofile_deactivate.html @@ -1,11 +1,10 @@ -{% extends "base.html" %} +{% extends "newbase.html" %} {% load staticfiles %} {% load rowerfilters %} {% block title %}Deactivate your account{% endblock %} -{% block content %} -
    +{% block main %}

    Deactivate your account


    Account deactivation is reversible. After you logout, you will not be @@ -17,6 +16,10 @@ -

    + +{% endblock %} + +{% block sidebar %} +{% include 'menu_profile.html' %} {% endblock %} diff --git a/rowers/templates/userprofile_delete.html b/rowers/templates/userprofile_delete.html index 04331c3f..d5099477 100644 --- a/rowers/templates/userprofile_delete.html +++ b/rowers/templates/userprofile_delete.html @@ -1,12 +1,11 @@ -{% extends "base.html" %} +{% extends "newbase.html" %} {% load staticfiles %} {% load rowerfilters %} {% block title %}Delete your account{% endblock %} -{% block content %} -
    -

    Delete your account

    +{% block main %} +

    Delete your account


    Warning: This will remove your account and all your data. You will not be able to recover from this action. We cannot restore @@ -17,6 +16,9 @@ -

    {% endblock %} + +{% block sidebar %} +{% include 'menu_profile.html' %} +{% endblock %} diff --git a/rowers/urls.py b/rowers/urls.py index 25fffff4..46cf766d 100644 --- a/rowers/urls.py +++ b/rowers/urls.py @@ -329,9 +329,8 @@ urlpatterns = [ url(r'^user-boxplot/user/(?P\d+)$',views.boxplot_view), url(r'^user-boxplot$',views.boxplot_view), url(r'^user-boxplot-data$',views.boxplot_view_data), - url(r'^user-multiflex/(?P\d+)$',views.multiflex_view), + url(r'^user-multiflex/user/(?P\d+)$',views.multiflex_view), url(r'^user-multiflex/$',views.multiflex_view), - url(r'^user-multiflex$',views.multiflex_view), url(r'^user-multiflex-data$',views.multiflex_data), url(r'^me/deactivate$',views.deactivate_user), url(r'^me/delete$',views.remove_user), diff --git a/rowers/views.py b/rowers/views.py index 3b9cb626..247cf04d 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -5437,17 +5437,14 @@ def user_multiflex_select(request, except: ploterrorbars = False - - -# if 'startdate' in request.session: -# startdate = iso8601.parse_date(request.session['startdate']) + if 'startdate' in request.session: + startdate = iso8601.parse_date(request.session['startdate']) -# if 'enddate' in request.session: -# enddate = iso8601.parse_date(request.session['enddate']) + if 'enddate' in request.session: + enddate = iso8601.parse_date(request.session['enddate']) - if 'waterboattype' in request.session: waterboattype = request.session['waterboattype'] else: waterboattype = types.waterboattype @@ -5468,7 +5465,7 @@ def user_multiflex_select(request, modalities = [m[0] for m in types.workouttypes] modality = 'all' - if request.method == 'POST' and 'daterange' in request.POST: + if request.method == 'POST': dateform = DateRangeForm(request.POST) if dateform.is_valid(): startdate = dateform.cleaned_data['startdate'] @@ -5477,13 +5474,6 @@ def user_multiflex_select(request, enddatestring = enddate.strftime('%Y-%m-%d') request.session['startdate'] = startdatestring request.session['enddate'] = enddatestring - else: - dateform = DateRangeForm(initial={ - 'startdate':startdate, - 'enddate':enddate, - }) - - if request.method == 'POST' and 'modality' in request.POST: modalityform = TrendFlexModalForm(request.POST) if modalityform.is_valid(): modality = modalityform.cleaned_data['modality'] @@ -5501,6 +5491,12 @@ def user_multiflex_select(request, request.session['modalities'] = modalities request.session['waterboattype'] = waterboattype request.session['rankingonly'] = rankingonly + else: + dateform = DateRangeForm(initial={ + 'startdate':startdate, + 'enddate':enddate, + }) + startdate = datetime.datetime.combine(startdate,datetime.time()) enddate = datetime.datetime.combine(enddate,datetime.time(23,59,59)) @@ -5577,9 +5573,25 @@ def user_multiflex_select(request, request.session['modalities'] = modalities + breadcrumbs = [ + { + 'url':'/rowers/analysis', + 'name':'Analysis' + }, + { + 'url':reverse(user_multiflex_select,kwargs={'userid':userid}), + 'name': 'Compare Select' + }, + { + 'url':reverse(multi_compare_view), + 'name': 'Comparison Chart' + } + ] + return render(request, 'user_multiflex_select.html', {'workouts': workouts, 'dateform':dateform, + 'breadcrumbs':breadcrumbs, 'startdate':startdate, 'enddate':enddate, 'theuser':user, @@ -5846,6 +5858,13 @@ def multiflex_view(request,userid=0, except KeyError: palette = 'monochrome_blue' + if 'startdate' in request.session: + startdate = iso8601.parse_date(request.session['startdate']) + + + if 'enddate' in request.session: + enddate = iso8601.parse_date(request.session['enddate']) + workstrokesonly = not includereststrokes if userid==0: @@ -5946,10 +5965,30 @@ def multiflex_view(request,userid=0, request.session['options'] = options + + r = getrequestrower(request,userid=userid) + + breadcrumbs = [ + { + 'url':'/rowers/analysis', + 'name':'Analysis' + }, + { + 'url':reverse(user_multiflex_select,kwargs={'userid':userid}), + 'name': 'Trend Flex Select' + }, + { + 'url':reverse(multiflex_view), + 'name': 'Trend Flex Chart' + } + ] return render(request,'multiflex.html', {'interactiveplot':'', + 'active':'nav-analysis', + 'rower':r, + 'breadcrumbs':breadcrumbs, 'the_div':div, 'active':'nav-analysis', 'chartform':chartform, @@ -6135,11 +6174,11 @@ def user_boxplot_select(request, request.session['startdate'] = startdatestring request.session['enddate'] = enddatestring - r = getrower(request.user) + breadcrumbs = [ { - 'url':'/rowers/list-workouts', - 'name':'Workouts' + 'url':'/rowers/analysis', + 'name':'Analysis' }, { 'url':reverse(user_boxplot_select,kwargs={'userid':userid}), @@ -6343,8 +6382,8 @@ def boxplot_view(request,userid=0, r = getrequestrower(request,userid=userid) breadcrumbs = [ { - 'url':'/rowers/list-workouts', - 'name':'Workouts' + 'url':'/rowers/Analysis', + 'name':'Analysis' }, { 'url':reverse(user_boxplot_select,kwargs={'userid':userid}),