team upload
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "newbase.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
|
|
||||||
{% block title %}File loading{% endblock %}
|
{% block title %}File loading{% endblock %}
|
||||||
@@ -30,10 +30,11 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block main %}
|
||||||
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
<ul class="main-content">
|
||||||
<div id="left" class="grid_6 alpha">
|
<li class="grid_2">
|
||||||
<h1>Upload Workout File</h1>
|
<h1>Upload Workout File</h1>
|
||||||
|
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
<p style="color: red;">
|
<p style="color: red;">
|
||||||
Please correct the error{{ form.errors|pluralize }} below.
|
Please correct the error{{ form.errors|pluralize }} below.
|
||||||
@@ -47,9 +48,8 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
|
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
|
||||||
<input class="button green" type="submit" value="Submit">
|
<input class="button green" type="submit" value="Submit">
|
||||||
</div>
|
</li>
|
||||||
</div>
|
<li class="grid_2">
|
||||||
<div id="right" class="grid_6 omega">
|
|
||||||
<h1>Optional extra actions</h1>
|
<h1>Optional extra actions</h1>
|
||||||
<p>
|
<p>
|
||||||
<table>
|
<table>
|
||||||
@@ -60,23 +60,41 @@
|
|||||||
You can select one static plot to be generated immediately for this workout. You can select to upload to Concept2 automatically. If you check "make private", this workout will not be visible to your followers and will not show up in your teams' workouts list.
|
You can select one static plot to be generated immediately for this workout. You can select to upload to Concept2 automatically. If you check "make private", this workout will not be visible to your followers and will not show up in your teams' workouts list.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
</li>
|
||||||
Valid file types are:
|
|
||||||
<ul>
|
|
||||||
<li>Painsled iOS Stroke Export (CSV)</li>
|
|
||||||
<li>Painsled desktop version Stroke Export (CSV)</li>
|
|
||||||
<li>A TCX file with location data (lat,long) - with or without Heart Rate value, for example from RiM or CrewNerd</li>
|
|
||||||
<li>RowPro CSV export</li>
|
|
||||||
<li>SpeedCoach GPS and SpeedCoach GPS 2 CSV export</li>
|
|
||||||
<li>ErgData CSV export</li>
|
|
||||||
<li>ErgStick CSV export</li>
|
|
||||||
<li>BoatCoach CSV export</li>
|
|
||||||
<li>A FIT file with location data (experimental)</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sidebar %}
|
||||||
|
{% include 'menu_workouts.html' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$('#id_workouttype').on('change', function(){
|
||||||
|
if (
|
||||||
|
$(this).val() == 'rower'
|
||||||
|
|| $(this).val() == 'skierg'
|
||||||
|
|| $(this).val() == 'dynamic'
|
||||||
|
|| $(this).val() == 'slides'
|
||||||
|
|| $(this).val() == 'paddle'
|
||||||
|
|| $(this).val() == 'bike'
|
||||||
|
|| $(this).val() == 'snow'
|
||||||
|
) {
|
||||||
|
$('#id_boattype').toggle(false);
|
||||||
|
$('#id_boattype').val('1x');
|
||||||
|
} else {
|
||||||
|
$('#id_boattype').toggle(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#id_workouttype').change();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@@ -10301,6 +10301,17 @@ def team_workout_upload_view(request,message="",
|
|||||||
else:
|
else:
|
||||||
request.session['uploadoptions'] = uploadoptions
|
request.session['uploadoptions'] = uploadoptions
|
||||||
|
|
||||||
|
breadcrumbs = [
|
||||||
|
{
|
||||||
|
'url':'/rowers/list-workouts',
|
||||||
|
'name':'Workouts'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'url': reverse(team_workout_upload_view),
|
||||||
|
'name': 'Team Upload'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
myteams = Team.objects.filter(manager=request.user)
|
myteams = Team.objects.filter(manager=request.user)
|
||||||
|
|
||||||
@@ -10320,6 +10331,7 @@ def team_workout_upload_view(request,message="",
|
|||||||
res = handle_uploaded_file(f)
|
res = handle_uploaded_file(f)
|
||||||
t = form.cleaned_data['title']
|
t = form.cleaned_data['title']
|
||||||
offline = form.cleaned_data['offline']
|
offline = form.cleaned_data['offline']
|
||||||
|
boattype = form.cleaned_data['boattype']
|
||||||
if rowerform.is_valid():
|
if rowerform.is_valid():
|
||||||
u = rowerform.cleaned_data['user']
|
u = rowerform.cleaned_data['user']
|
||||||
if u:
|
if u:
|
||||||
@@ -10424,6 +10436,8 @@ def team_workout_upload_view(request,message="",
|
|||||||
'team_document_form.html',
|
'team_document_form.html',
|
||||||
{'form':form,
|
{'form':form,
|
||||||
'teams':get_my_teams(request.user),
|
'teams':get_my_teams(request.user),
|
||||||
|
'active': 'nav-workouts',
|
||||||
|
'breadcrumbs':breadcrumbs,
|
||||||
'optionsform': optionsform,
|
'optionsform': optionsform,
|
||||||
'rowerform': rowerform,
|
'rowerform': rowerform,
|
||||||
})
|
})
|
||||||
@@ -10439,6 +10453,9 @@ def team_workout_upload_view(request,message="",
|
|||||||
{'form':form,
|
{'form':form,
|
||||||
'teams':get_my_teams(request.user),
|
'teams':get_my_teams(request.user),
|
||||||
'optionsform': optionsform,
|
'optionsform': optionsform,
|
||||||
|
'active': 'nav-workouts',
|
||||||
|
'breadcrumbs':breadcrumbs,
|
||||||
|
'rower':r,
|
||||||
'rowerform':rowerform,
|
'rowerform':rowerform,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user