Private
Public Access
1
0

workout histo

This commit is contained in:
Sander Roosendaal
2018-10-08 18:01:18 +02:00
parent b9ea9a0e59
commit 94ec66b27d
3 changed files with 42 additions and 55 deletions

View File

@@ -1,66 +1,34 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}View Workout {% endblock %}
{% block content %}
{% block main %}
<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>
<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>
{{ interactiveplot |safe }}
<div id="navigation" class="grid_12 alpha">
{% if user.is_authenticated and mayedit %}
<div class="grid_2 alpha">
<p>
<a class="button gray small" href="/rowers/workout/{{ id }}/edit">Edit Workout</a>
</p>
</div>
<div class="grid_2 suffix_8 omega">
<p>
<a class="button gray small" href="/rowers/workout/{{ id }}/advanced">Advanced Edit</a>
</p>
</div>
{% endif %}
</div>
<div id="title" class="grid_12 alpha">
<h1>Indoor Rower Power Histogram</h1>
</div>
<div id="graph" class="grid_12 alpha">
{% if user.is_authenticated and mayedit %}
<h1>Indoor Rower Power Histogram</h1>
<ul class="main-content">
<li class="grid_4">
{{ the_div|safe }}
</div>
</li>
</ul>
{% endif %}
{% endblock %}
{% block sidebar %}
{% include 'menu_workouts.html' %}
{% endblock %}