85 lines
2.4 KiB
HTML
85 lines
2.4 KiB
HTML
{% extends "base.html" %}
|
|
{% load staticfiles %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}View Workout {% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<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>
|
|
|
|
{{ interactiveplot |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, false, false);
|
|
};
|
|
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="title" class="grid_12 alpha">
|
|
<h1>Indoor Rower Power Histogram</h1>
|
|
</div>
|
|
|
|
<div id="summary" class="grid_6 alpha">
|
|
|
|
|
|
|
|
<p>Summary for {{ theuser.first_name }} {{ theuser.last_name }}
|
|
between {{ startdate|date }} and {{ enddate|date }}</p>
|
|
|
|
<p>Direct link for other Pro users:
|
|
<a href="/rowers/{{ id }}/histo/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}">http://rowsandall.com/rowers/{{ id }}/histo/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}</a>
|
|
</p>
|
|
</div>
|
|
<div id="form" class="grid_6 omega">
|
|
<p>Use this form to select a different date range:</p>
|
|
<p>
|
|
Select start and end date for a date range:
|
|
<div class="grid_4 alpha">
|
|
|
|
<form enctype="multipart/form-data" action="" method="post">
|
|
|
|
<table>
|
|
{{ form.as_table }}
|
|
</table>
|
|
{% csrf_token %}
|
|
</div>
|
|
<div class="grid_2 omega">
|
|
<input name='daterange' class="button green" type="submit" value="Submit"> </form>
|
|
</div>
|
|
<div class="grid_4 alpha">
|
|
<form enctype="multipart/form-data" action="" method="post">
|
|
Or use the last {{ deltaform }} days.
|
|
</div>
|
|
<div class="grid_2 omega">
|
|
{% csrf_token %}
|
|
<input name='datedelta' class="button green" type="submit" value="Submit">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="graph" class="grid_12 alpha">
|
|
|
|
{{ the_div|safe }}
|
|
|
|
</div>
|
|
|
|
{% endblock %} |