Private
Public Access
1
0

Merge branch 'develop' into feature/freecoach

This commit is contained in:
Sander Roosendaal
2019-05-14 21:32:56 +02:00
4 changed files with 19 additions and 20 deletions

View File

@@ -1349,18 +1349,13 @@ def new_workout_from_file(r, f2,
# handle non-Painsled by converting it to painsled compatible CSV
if (fileformat != 'csv'):
try:
f2, summary, oarlength, inboard, fileformat = handle_nonpainsled(
f2,
fileformat,
summary=summary
)
if not f2:
message = 'Something went wrong'
return (0, message, '')
except Exception as e:
errorstring = str(sys.exc_info()[0])
message = 'Something went wrong: ' + e.message
f2, summary, oarlength, inboard, fileformat = handle_nonpainsled(
f2,
fileformat,
summary=summary
)
if not f2:
message = 'Something went wrong'
return (0, message, '')
dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat)

View File

@@ -10,12 +10,13 @@
function toggle(source) {
checkboxes = document.querySelectorAll("input[type='checkbox']");
for (var i=0, n=checkboxes.length;i<n;i++) {
if (checkboxes[i].name.includes('selector')) {
if (checkboxes[i].name.includes('selector')) {
checkboxes[i].checked = source.checked
}
}
}
</script>
</script>
<h1>Training Plan - {{ plan.name }}</h1>
<p>This plan starts on {{ plan.startdate }} and ends on {{ plan.enddate }}.
@@ -47,7 +48,7 @@
{{ macrocycle.0.name }} ({{ macrocycle.0.startdate }} - {{ macrocycle.0.enddate }})
</th>
</tr>
{% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %}
{% if todays_date <= macrocycle.0.enddate %}
<tr>
&nbsp;
</tr>
@@ -114,7 +115,7 @@
<td>{{ macrocycle.0.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %}
{% if todays_date <= macrocycle.0.enddate %}
<tr>
<td>&nbsp;</td>
</tr>
@@ -166,7 +167,7 @@
Meso {{ mesocycle.0.name }} ({{ mesocycle.0.startdate }} - {{ mesocycle.0.enddate }})
</th>
</tr>
{% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %}
{% if todays_date <= mesocycle.0.enddate %}
{% if mesocycle.0.plan.type == 'userdefined' %}
<tr>
&nbsp;
@@ -235,7 +236,7 @@
<td>{{ mesocycle.0.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %}
{% if todays_date <= mesocycle.0.enddate %}
<tr>
<td>&nbsp;</td>
</tr>
@@ -292,7 +293,7 @@
Micro {{ microcycle.name }} ({{ microcycle.startdate }} - {{ microcycle.enddate }})
</th>
</tr>
{% if todays_date <= microcycle.enddate|date:"Y-m-d" %}
{% if todays_date <= microcycle.enddate %}
{% if microcycle.plan.type == 'userdefined' %}
<tr>
<td>&nbsp;</td>
@@ -365,7 +366,7 @@
<td>{{ microcycle.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= microcycle.enddate|date:"Y-m-d" %}
{% if todays_date <= microcycle.enddate %}
<tr>
<td>&nbsp;</td>
</tr>

View File

@@ -2301,6 +2301,7 @@ def rower_trainingplan_view(request,
return render(request,'trainingplan.html',
{
'plan':plan,
'todays_date': timezone.now().date(),
'active':'nav-plan',
'breadcrumbs':breadcrumbs,
'rower':r,