split workout (bugs)
This commit is contained in:
113
rowers/templates/splitworkout.html
Normal file
113
rowers/templates/splitworkout.html
Normal file
@@ -0,0 +1,113 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
{% load tz %}
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="workouts" class="grid_6 alpha">
|
||||
|
||||
{% if form.errors %}
|
||||
<p style="color: red;">
|
||||
Please correct the error{{ form.errors|pluralize }} below.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h1>Edit Workout Interval Data</h1>
|
||||
<div class="grid_6 alpha">
|
||||
<div class="grid_2 alpha">
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/edit">Edit</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/export">Export</a>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2 omega tooltip">
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/advanced">Advanced</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Advanced Functionality (More interactive Charts)</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% localtime on %}
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<th>Date/Time:</th><td>{{ workout.startdatetime }}</td>
|
||||
</tr><tr>
|
||||
<th>Distance:</th><td>{{ workout.distance }}m</td>
|
||||
</tr><tr>
|
||||
<th>Duration:</th><td>{{ workout.duration |durationprint:"%H:%M:%S.%f" }}</td>
|
||||
</tr><tr>
|
||||
<th>Public link to this workout</th>
|
||||
<td>
|
||||
<a href="/rowers/workout/{{ workout.id }}">https://rowsandall.com/rowers/workout/{{ workout.id }}</a>
|
||||
<td>
|
||||
</tr><tr>
|
||||
<th>Public link to interactive chart</th>
|
||||
<td>
|
||||
<a href="/rowers/workout/{{ workout.id }}/interactiveplot">https://rowsandall.com/rowers/workout/{{ workout.id }}/interactiveplot</a>
|
||||
<td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endlocaltime %}
|
||||
<h1>Workout Split</h1>
|
||||
<p>Split your workout in half</p>
|
||||
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/split" method="post">
|
||||
<table width=100%>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
|
||||
<input class="button green" type="submit" value="Split">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="advancedplots" class="grid_6 omega">
|
||||
<div class="grid_6 alpha">
|
||||
|
||||
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
{{ thescript |safe }}
|
||||
|
||||
<script>
|
||||
// Set things up to resize the plot on a window resize. You can play with
|
||||
// the arguments of resize_width_height() to change the plot's behavior.
|
||||
var plot_resize_setup = function () {
|
||||
var plotid = Object.keys(Bokeh.index)[0]; // assume we have just one plot
|
||||
var plot = Bokeh.index[plotid];
|
||||
var plotresizer = function() {
|
||||
// arguments: use width, use height, maintain aspect ratio
|
||||
plot.resize_width_height(true, true, true);
|
||||
};
|
||||
window.addEventListener('resize', plotresizer);
|
||||
plotresizer();
|
||||
};
|
||||
window.addEventListener('load', plot_resize_setup);
|
||||
</script>
|
||||
<style>
|
||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||
html, body {height: 100%; margin:5px;}
|
||||
</style>
|
||||
|
||||
|
||||
<div id="interactiveplot" class="grid_6 omega">
|
||||
{{ thediv |safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user