flex chart
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
{% load tz %}
|
||||
@@ -6,7 +6,7 @@
|
||||
{% block title %} Flexible Plot {% endblock %}
|
||||
|
||||
{% localtime on %}
|
||||
{% block content %}
|
||||
{% block main %}
|
||||
|
||||
{{ js_res | safe }}
|
||||
{{ css_res| safe }}
|
||||
@@ -20,197 +20,45 @@
|
||||
{{ the_script |safe }}
|
||||
|
||||
|
||||
<style>
|
||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||
html, body {height: 100%; margin:5px;}
|
||||
</style>
|
||||
|
||||
<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">
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/workout/{{ id }}/workflow">Workflow View</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2 suffix_6 omega">
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/workout/{{ id }}/advanced">Advanced Edit</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
<div id="plotbuttons" class="grid_12 alpha">
|
||||
|
||||
|
||||
<div id="x-axis" class="grid_9 alpha">
|
||||
<div class="grid_3 alpha dropdown">
|
||||
<button class="grid_2 alpha button blue small dropbtn">X-axis</button>
|
||||
<div class="dropdown-content">
|
||||
<div style="float: left; width:67%;">
|
||||
{% for key, value in axchoicesbasic.items %}
|
||||
{% if key != 'None' %}
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if promember %}
|
||||
{% for key, value in axchoicespro.items %}
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/scatter">{{ value }}</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key, value in axchoicespro.items %}
|
||||
<a class="button rosy small" href="/rowers/promembership">{{ value }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="float: right; width: 33%;">
|
||||
{% if promember %}
|
||||
{% for key, value in extrametrics.items %}
|
||||
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key, value in extrametrics.items %}
|
||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="left-y" class="grid_3 dropdown">
|
||||
<button class="grid_2 alpha button blue small dropbtn">Left</button>
|
||||
<div class="dropdown-content">
|
||||
<div style="float: left; width:67%;">
|
||||
{% for key, value in axchoicesbasic.items %}
|
||||
{% if key not in noylist and key != 'None' %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if promember %}
|
||||
{% for key, value in axchoicespro.items %}
|
||||
{% if key not in noylist %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key, value in axchoicespro.items %}
|
||||
{% if key not in noylist %}
|
||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="float: right; width:33%;">
|
||||
{% if promember %}
|
||||
{% for key, value in extrametrics.items %}
|
||||
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key, value in extrametrics.items %}
|
||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Flexible Chart</h1>
|
||||
|
||||
<div id="right-y" class="grid_3 dropdown omega">
|
||||
<button class="grid_2 alpha button blue small dropbtn">Right</button>
|
||||
<div class="dropdown-content">
|
||||
<div style="float: left; width:67%;">
|
||||
{% for key, value in axchoicesbasic.items %}
|
||||
{% if key not in noylist %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if promember %}
|
||||
{% for key, value in axchoicespro.items %}
|
||||
{% if key not in noylist %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key, value in axchoicespro.items %}
|
||||
{% if key not in noylist %}
|
||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="float: right; width:33%;">
|
||||
{% if promember %}
|
||||
{% for key, value in extrametrics.items %}
|
||||
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ plottype }}">{{ value }}</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key, value in extrametrics.items %}
|
||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
<div id="theplot">
|
||||
{{ the_div|safe }}
|
||||
</div>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<form enctype="multipart/form-data"
|
||||
action=""
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ chartform.as_table }}
|
||||
</table>
|
||||
<table>
|
||||
{{ optionsform.as_table }}
|
||||
</table>
|
||||
<p>
|
||||
<input name="chartform" class="button green" type="submit"
|
||||
value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="y-axis" class="grid_3 omega">
|
||||
<div class="grid_2 alpha tooltip">
|
||||
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||
{% csrf_token %}
|
||||
{% if workstrokesonly %}
|
||||
<input type="hidden" name="workstrokesonly" value="True">
|
||||
<input class="grid_2 alpha button blue small" value="Remove Rest Strokes" type="Submit">
|
||||
{% else %}
|
||||
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="False">
|
||||
<input class="grid_2 alpha button blue small" value="Include Rest Strokes" type="Submit">
|
||||
{% endif %}
|
||||
</form>
|
||||
<span class="tooltiptext">If your data source allows, this will show or hide strokes taken during rest intervals.</span>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
{% if plottype == 'scatter' %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/line">Line</a>
|
||||
{% else %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/scatter">Scatter</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="theplot" class="grid_12 alpha">
|
||||
|
||||
|
||||
{{ the_div|safe }}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="favorites" class="grid_12 alpha">
|
||||
<div class="grid_2 suffix_4 alpha">
|
||||
{% if maxfav >= 0 %}
|
||||
<a class="button gray small" href="/rowers/me/favoritecharts">Manage Favorites</a>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
{% if favoritenr > 0 %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:-1 }}"><</a>
|
||||
{% else %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ maxfav }}"><</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<li class="grid_2">
|
||||
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||
{% if favoritenr > 0 %}
|
||||
<a class="wh"
|
||||
href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:-1 }}">
|
||||
<i class="fas fa-arrow-alt-left"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="wh"
|
||||
href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ maxfav }}">
|
||||
<i class="fas fa-arrow-alt-left"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% csrf_token %}
|
||||
<input class="grid_2 alpha button blue small" type="hidden" name="savefavorite" value="True">
|
||||
{% if workstrokesonly %}
|
||||
@@ -218,22 +66,28 @@
|
||||
{% else %}
|
||||
<input type="hidden" name="workstrokesonlysave" value="True">
|
||||
{% endif %}
|
||||
<input class="grid_2 alpha button blue small" value="Make Favorite" type="Submit">
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
{% if favoritenr < maxfav %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:1 }}">></a>
|
||||
<input value="Make Favorite" type="Submit">
|
||||
{% if favoritenr < maxfav %}
|
||||
<a class="wh"
|
||||
href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:1 }}">
|
||||
<i class="fas fa-arrow-alt-right"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart=0">></a>
|
||||
<a class="wh"
|
||||
href="/rowers/workout/{{ id }}/flexchart?favoritechart=0">
|
||||
<i class="fas fa-arrow-alt-right"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if favoritechartnotes %}
|
||||
<div class="grid_6 prefix_6 alpha">
|
||||
</form>
|
||||
{% if favoritechartnotes %}
|
||||
<p>Chart {{ favoritenr|add:1 }}:{{ favoritechartnotes }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
{% endlocaltime %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_workout.html' %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user