trend flex and jobs status
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% block main %}
|
||||
|
||||
|
||||
<h1>Your Tasks Status</h1>
|
||||
@@ -117,4 +117,8 @@
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_workouts.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
<i class="fas fa-watch-fitness fa-fw"></i> Fitness</label>
|
||||
<ul>
|
||||
<li id="fitness-ranking">
|
||||
<a href="">
|
||||
<a href="/rowers/ote-bests2">
|
||||
<i class="fas fa-star fa-fw"></i> Ranking Pieces
|
||||
</a>
|
||||
</li>
|
||||
<li id="fitness-otecp">
|
||||
<a href="">
|
||||
<a href="/rowers/ote-ranking">
|
||||
<i class="fas fa-user-chart fa-fw"></i> CP Chart OTE
|
||||
</a>
|
||||
</li>
|
||||
<li id="fitness-otwcp">
|
||||
<a href="">
|
||||
<a href="/rowers/otw-bests">
|
||||
<i class="far fa-user-chart fa-fw"></i> CP Chart OTW
|
||||
</a>
|
||||
</li>
|
||||
<li id="fitness-powerprogress">
|
||||
<a href="">
|
||||
<a href="/rowers/fitnessprogress">
|
||||
<i class="far fa-watch-fitness fa-fw"></i> Power Progress
|
||||
</a>
|
||||
</li>
|
||||
@@ -36,29 +36,29 @@
|
||||
</label>
|
||||
<ul>
|
||||
<li id="stats-boxchart">
|
||||
<a href="">
|
||||
<a href="/rowers/user-boxplot-select">
|
||||
<i class="fas fa-box-open fa-fw"></i> Box Chart
|
||||
</a>
|
||||
</li>
|
||||
<li id="stats-trendflex">
|
||||
<a href="">
|
||||
<a href="/rowers/user-multiflex-select">
|
||||
<i class="far fa-chart-line fa-fw"></i> Trend Flex
|
||||
</a>
|
||||
</li>
|
||||
<li id="stats-cumstats">
|
||||
<a href="">
|
||||
<a href="/rowers/cumstates">
|
||||
<i class="fal fa-table fa-fw"></i> Statistics
|
||||
</a>
|
||||
</li>
|
||||
<li id="stats-histopower">
|
||||
<a href="">
|
||||
<a href="/rowers/histo">
|
||||
<i class="fas fa-chart-bar"></i> Power Histogram
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="">
|
||||
<a href="/rowers/flexall">
|
||||
<i class="fas fa-chart-line fa-fw"></i> Cumulative Flex Chart
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Workouts{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block main %}
|
||||
<script>
|
||||
function toggle(source) {
|
||||
checkboxes = document.querySelectorAll("input[name='workouts']");
|
||||
@@ -63,125 +63,83 @@
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{% if team %}
|
||||
<div class="grid_12 alpha">
|
||||
{% include "teambuttons.html" with teamid=team.id team=team %}
|
||||
</div>
|
||||
{% if theuser %}
|
||||
<h1>Select {{ theuser.first_name }}'s Workouts for the Trend Flex Chart</h1>
|
||||
{% else %}
|
||||
<h1>Select {{ user.first_name }}'s Workouts for the Trend Flex Chart</h1>
|
||||
{% endif %}
|
||||
<div class="grid_12 alpha">
|
||||
<div class="grid_4 alpha">
|
||||
{% if theuser %}
|
||||
<h3>{{ theuser.first_name }}'s Workouts</h3>
|
||||
{% else %}
|
||||
<h3>{{ user.first_name }}'s Workouts</h3>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 prefix_6 omega">
|
||||
{% if user.is_authenticated and user|is_manager %}
|
||||
<div class="grid_2 alpha dropdown">
|
||||
<button class="grid_2 alpha button green small dropbtn">
|
||||
{{ theuser.first_name }} {{ theuser.last_name }}
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{% for member in user|team_members %}
|
||||
<a class="button green small" href="/rowers/user-multiflex-select/user/{{ member.id }}/">{{ member.first_name }} {{ member.last_name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_12 alpha">
|
||||
<div class="grid_6 alpha">
|
||||
{% if theuser %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/user/{{ theuser.id }}/" method="post">
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/" method="post">
|
||||
{% endif %}
|
||||
<div class="grid_4 alpha">
|
||||
|
||||
<table>
|
||||
{{ dateform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<input name='daterange' class="button green" type="submit" value="Submit">
|
||||
</div>
|
||||
</form>
|
||||
{% if theuser %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/user/{{ theuser.id }}/" method="post">
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/" method="post">
|
||||
{% endif %}
|
||||
<div class="grid_4 alpha">
|
||||
|
||||
<table>
|
||||
{{ modalityform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<input name='modalityform' class="button green" type="submit" value="Submit">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid_5 prefix_1 omega">
|
||||
<form id="searchform" action=""
|
||||
method="get" accept-charset="utf-8">
|
||||
<div class="grid_3 prefix_1 alpha">
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/{{ theuser.id }}" method="post">
|
||||
<div id="workouts_table" class="grid_8 alpha">
|
||||
|
||||
|
||||
<ul class="main-content">
|
||||
<li class="grid_2 maxheight">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/{{ theuser.id }}" method="post">
|
||||
{% if workouts %}
|
||||
|
||||
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
|
||||
<table width="100%" class="listtable">
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% else %}
|
||||
<p> No workouts found </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="form_settings" class="grid_4 alpha">
|
||||
<p><b>Warning: You are on an experimental part of the site. Use at your own risk.</b></p>
|
||||
<p>Select one or more workouts on the left, set your plot settings below,
|
||||
and press submit"</p>
|
||||
{% else %}
|
||||
<p> No workouts found </p>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
{% 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>
|
||||
</div>
|
||||
<div class="grid_4">
|
||||
<p>
|
||||
<input name='workoutselectform' class="button green" type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
{% if theuser %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/user/{{ theuser.id }}/" method="post">
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/" method="post">
|
||||
{% endif %}
|
||||
|
||||
<table>
|
||||
{{ dateform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input name='daterange' class="button green" type="submit" value="Submit">
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
{% if theuser %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/user/{{ theuser.id }}/" method="post">
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/" method="post">
|
||||
{% endif %}
|
||||
<table>
|
||||
{{ modalityform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input name='modalityform' class="button green" type="submit" value="Submit">
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<form id="searchform" action=""
|
||||
method="get" accept-charset="utf-8">
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
<li class="grid_2">
|
||||
<p>You can use the date and search forms above to search through all
|
||||
workouts from this team.</p>
|
||||
<p>TIP: Agree with your team members to put tags (e.g. '8x500m') in the notes section of
|
||||
your workouts. That makes it easy to search.</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_analytics.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -286,6 +286,12 @@ def is_not_past_due(self):
|
||||
|
||||
@register.filter
|
||||
def userurl(path,member):
|
||||
userstring = 'user/%s/' % member.id
|
||||
replaced = re.sub('user\/\d+\/',userstring,path)
|
||||
print path
|
||||
pattern = re.compile('user\/\d+')
|
||||
userstring = 'user/%s' % member.id
|
||||
if pattern.search(path) is not None:
|
||||
replaced = pattern.sub(userstring,path)
|
||||
else:
|
||||
replaced = path+userstring
|
||||
|
||||
return replaced
|
||||
|
||||
@@ -164,8 +164,8 @@ urlpatterns = [
|
||||
url(r'^workouts-join-select/team/(?P<teamid>\d+)/$',views.workouts_join_select),
|
||||
url(r'^workouts-join-select/(?P<startdatestring>\w+.*)/(?P<enddatestring>\w+.*)$',views.workouts_join_select),
|
||||
url(r'^workouts-join-select/$',views.workouts_join_select),
|
||||
url(r'^user-boxplot-select/user/(?P<userid>\d+)$',views.user_boxplot_select),
|
||||
url(r'^user-boxplot-select/user/(?P<userid>\d+)/(?P<startdatestring>\w+.*)/(?P<enddatestring>\w+.*)$',views.user_boxplot_select),
|
||||
url(r'^user-boxplot-select/user/(?P<userid>\d+)/$',views.user_boxplot_select),
|
||||
url(r'^user-boxplot-select/(?P<startdatestring>\w+.*)/(?P<enddatestring>\w+.*)$',views.user_boxplot_select),
|
||||
url(r'^user-boxplot-select/$',views.user_boxplot_select),
|
||||
url(r'^user-multiflex-select/user/(?P<userid>\d+)/(?P<startdatestring>\w+.*)/(?P<enddatestring>\w+.*)$',views.user_multiflex_select),
|
||||
|
||||
@@ -5536,6 +5536,7 @@ def user_multiflex_select(request,
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
'theuser':user,
|
||||
'rower':r,
|
||||
'form':form,
|
||||
'chartform':chartform,
|
||||
'modalityform':modalityform,
|
||||
@@ -5903,6 +5904,7 @@ def multiflex_view(request,userid=0,
|
||||
return render(request,'multiflex.html',
|
||||
{'interactiveplot':'',
|
||||
'the_div':div,
|
||||
'active':'nav-analysis',
|
||||
'chartform':chartform,
|
||||
'userid':userid,
|
||||
'teams':get_my_teams(request.user),
|
||||
|
||||
Reference in New Issue
Block a user