a bit more logic navigating the training planning functions
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
Please correct the error{{ form.errors|pluralize }} below.
|
Please correct the error{{ form.errors|pluralize }} below.
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
{{ form.as_table }}
|
{{ form.as_table }}
|
||||||
</table>
|
</table>
|
||||||
@@ -89,9 +89,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm/">Delete</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm/">Delete</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/maketemplate/">Save</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/maketemplate/">Save</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
|
|
||||||
$("td #id_course").hide();
|
$("td #id_course").hide();
|
||||||
$("th label[for='id_course']").hide();
|
$("th label[for='id_course']").hide();
|
||||||
|
|
||||||
$("td #id_sessionmode").change(function() {
|
$("td #id_sessionmode").change(function() {
|
||||||
|
|
||||||
if (this.value == 'TRIMP') {
|
if (this.value == 'TRIMP') {
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
$("th label[for='id_course']").hide();
|
$("th label[for='id_course']").hide();
|
||||||
$("td #id_course").hide();
|
$("td #id_course").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.value == 'challenge') {
|
if (this.value == 'challenge') {
|
||||||
$("td #id_criterium").prop("value","minimum");
|
$("td #id_criterium").prop("value","minimum");
|
||||||
$('#id_guidance').html("<p>For Challenges, the default criterium is 'At Least'</p>");
|
$('#id_guidance').html("<p>For Challenges, the default criterium is 'At Least'</p>");
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,14 @@
|
|||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
<p><a href="/rowers/sessions/coach/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
||||||
{{ timeperiod|timedeltadays }} days</a>
|
{{ timeperiod|timedeltadays }} days</a>
|
||||||
</p>
|
</p>
|
||||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
<p><a href="/rowers/sessions/coach/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
||||||
{{ timeperiod|timedeltadays }} days</a>
|
{{ timeperiod|timedeltadays }} days</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_4">
|
<li class="grid_4">
|
||||||
|
|
||||||
|
|
||||||
<table width="90%" class="listtable">
|
<table width="90%" class="listtable">
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
<p>
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<td>
|
<td>
|
||||||
<a href={% url rower.defaultlandingpage id=workout.id|encode %}>No Name
|
<a href={% url rower.defaultlandingpage id=workout.id|encode %}>No Name
|
||||||
</a></td>
|
</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
<td> {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </td>
|
<td> {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </td>
|
||||||
<td> {{ workout.averagehr }} </td>
|
<td> {{ workout.averagehr }} </td>
|
||||||
<td> {{ workout.maxhr }} </td>
|
<td> {{ workout.maxhr }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
<p><a href="/rowers/sessions/teamcreate/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
||||||
{{ timeperiod|timedeltadays }} days</a>
|
{{ timeperiod|timedeltadays }} days</a>
|
||||||
</p>
|
</p>
|
||||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
<p><a href="/rowers/sessions/teamcreate/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
||||||
{{ timeperiod|timedeltadays }} days</a>
|
{{ timeperiod|timedeltadays }} days</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -34,21 +34,21 @@
|
|||||||
Please correct the error{{ form.errors|pluralize }} below.
|
Please correct the error{{ form.errors|pluralize }} below.
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<ul class="main-content">
|
<ul class="main-content">
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<h1>New Team Session</h1>
|
<h1>New Team Session</h1>
|
||||||
<table>
|
<table>
|
||||||
{{ teamform.as_table }}
|
{{ teamform.as_table }}
|
||||||
</table>
|
</table>
|
||||||
<table>
|
<table>
|
||||||
{{ form.as_table }}
|
{{ form.as_table }}
|
||||||
</table>
|
</table>
|
||||||
<input class="button green" type="submit" value="Save">
|
<input class="button green" type="submit" value="Save">
|
||||||
<div id="id_guidance" class="padded">
|
<div id="id_guidance" class="padded">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% if plannedsessions %}
|
{% if plannedsessions %}
|
||||||
@@ -90,15 +90,18 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone/">Clone</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone/">Clone</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm/">Delete</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm/">Delete</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/maketemplate/">Save</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
@@ -150,7 +153,7 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("td #id_course").hide();
|
$("td #id_course").hide();
|
||||||
$("th label[for='id_course']").hide();
|
$("th label[for='id_course']").hide();
|
||||||
|
|
||||||
$("td #id_sessionmode").change(function() {
|
$("td #id_sessionmode").change(function() {
|
||||||
|
|
||||||
if (this.value == 'TRIMP') {
|
if (this.value == 'TRIMP') {
|
||||||
@@ -165,16 +168,16 @@
|
|||||||
$("td #id_sessionunit").prop("value","min");
|
$("td #id_sessionunit").prop("value","min");
|
||||||
$('#id_guidance').html("<p>Time: Set value to minutes</p>");
|
$('#id_guidance').html("<p>Time: Set value to minutes</p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.value == 'rScore') {
|
if (this.value == 'rScore') {
|
||||||
$("td #id_sessionunit").prop("value","None");
|
$("td #id_sessionunit").prop("value","None");
|
||||||
$('#id_guidance').html("<p>rScore has no unit</p>");
|
$('#id_guidance').html("<p>rScore has no unit</p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("td #id_sessiontype").change(function() {
|
$("td #id_sessiontype").change(function() {
|
||||||
|
|
||||||
if (this.value == 'session') {
|
if (this.value == 'session') {
|
||||||
$("td #id_criterium").prop("value","none");
|
$("td #id_criterium").prop("value","none");
|
||||||
$('#id_guidance').html("<p>For Training Sessions, the default criterium is 'Approximately'</p>");
|
$('#id_guidance').html("<p>For Training Sessions, the default criterium is 'Approximately'</p>");
|
||||||
@@ -205,18 +208,18 @@
|
|||||||
$("td #id_criterium").prop("value","minimum");
|
$("td #id_criterium").prop("value","minimum");
|
||||||
$('#id_guidance').html("<p>For Challenges, the default criterium is 'At Least'</p>");
|
$('#id_guidance').html("<p>For Challenges, the default criterium is 'At Least'</p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.value == 'cycletarget') {
|
if (this.value == 'cycletarget') {
|
||||||
$("td #id_criterium").prop("value","none");
|
$("td #id_criterium").prop("value","none");
|
||||||
$('#id_guidance').html("<p>For Cycle Targets, the default criterium is 'Approximately'</p>");
|
$('#id_guidance').html("<p>For Cycle Targets, the default criterium is 'Approximately'</p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$("td #id_sessionunit").change(function() {
|
$("td #id_sessionunit").change(function() {
|
||||||
|
|
||||||
if (this.value == 'm') {
|
if (this.value == 'm') {
|
||||||
$("td #id_sessionmode").prop("value","distance");
|
$("td #id_sessionmode").prop("value","distance");
|
||||||
$('#id_guidance').html("<p>Mode was set to distance</p>");
|
$('#id_guidance').html("<p>Mode was set to distance</p>");
|
||||||
@@ -233,13 +236,13 @@
|
|||||||
$("td #id_sessionmode").prop("value","time");
|
$("td #id_sessionmode").prop("value","time");
|
||||||
$('#id_guidance').html("<p>Mode was set to time</p>");
|
$('#id_guidance').html("<p>Mode was set to time</p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
<p><a href="/rowers/sessions/coach/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
||||||
{{ timeperiod|timedeltadays }} days</a>
|
{{ timeperiod|timedeltadays }} days</a>
|
||||||
</p>
|
</p>
|
||||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
<p><a href="/rowers/sessions/coach/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
||||||
{{ timeperiod|timedeltadays }} days</a>
|
{{ timeperiod|timedeltadays }} days</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -41,10 +41,10 @@
|
|||||||
<p>
|
<p>
|
||||||
Selecting a team assigns this session to all members of the team.
|
Selecting a team assigns this session to all members of the team.
|
||||||
Unselecting a team does not remove rowers
|
Unselecting a team does not remove rowers
|
||||||
who are already assigned to this session. Use the Rowers selection for that.
|
who are already assigned to this session. Use the Rowers selection for that.
|
||||||
</p><p>
|
</p><p>
|
||||||
<table>
|
<table>
|
||||||
{{ teamform.as_table }}
|
{{ teamform.as_table }}
|
||||||
</table></p>
|
</table></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
@@ -112,15 +112,18 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone">Clone</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone">Clone</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm">Delete</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm">Delete</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/maketemplate/">Save</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -134,7 +137,7 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
var o = $("td #id_sessiontype").find(":selected").val();
|
var o = $("td #id_sessiontype").find(":selected").val();
|
||||||
|
|
||||||
if (o != 'coursetest') {
|
if (o != 'coursetest') {
|
||||||
$("td #id_course").hide();
|
$("td #id_course").hide();
|
||||||
$("th label[for='id_course']").hide();
|
$("th label[for='id_course']").hide();
|
||||||
@@ -230,7 +233,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
Login <em>{{ rower.user }}</em>
|
||||||
|
</p>
|
||||||
{% if userform.errors %}
|
{% if userform.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.
|
||||||
@@ -26,7 +29,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if accountform.errors %}
|
{% if accountform.errors %}
|
||||||
<p style="color: red;">
|
<p style="color: red;">
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form enctype="multipart/form-data" action="" method="post">
|
<form enctype="multipart/form-data" action="" method="post">
|
||||||
|
|||||||
Reference in New Issue
Block a user