Private
Public Access
1
0

multicompare view line 330 urls.py

This commit is contained in:
Sander Roosendaal
2018-10-09 22:03:07 +02:00
parent c693655966
commit 40ec94d5b0
5 changed files with 209 additions and 192 deletions

View File

@@ -1,10 +1,10 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}View Comparison {% 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">
@@ -13,58 +13,31 @@
{{ 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>
<h1>Interactive Comparison</h1>
<ul class="main-content">
<li class="grid_2">
<form enctype="multipart/form-data" action="/rowers/multi-compare" method="post">
{% csrf_token %}
<table>
{{ chartform.as_table }}
</table>
<style>
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
html, body {height: 100%; margin:5px;}
</style>
<div class="grid_12 alpha">
{% include "teambuttons.html" with teamid=teamid team=team %}
</div>
<div class="grid_12">
<div id="workouts" class="grid_8 alpha">
<h1>Interactive Comparison</h1>
</div>
<div class="grid_4 omega">
<form enctype="multipart/form-data" action="/rowers/multi-compare" method="post">
{% csrf_token %}
<table>
{{ chartform.as_table }}
</table>
<div class="grid_1 prefix_2 suffix_1">
<p>
<input name='workoutselectform' class="button green" type="submit" value="Submit">
</p>
</form>
</li>
<li class="grid_4">
<div>
{{ the_div|safe }}
</div>
</form>
</div>
</div>
<div class="grid_12 alpha">
<div id="theplot" class="grid_12 alpha flexplot">
{{ the_div|safe }}
</div>
</div>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_workouts.html' %}
{% endblock %}