Private
Public Access
1
0

Merge branch 'release/v8.07'

This commit is contained in:
Sander Roosendaal
2018-10-19 16:50:22 +02:00
20 changed files with 155 additions and 87 deletions

View File

@@ -313,7 +313,8 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
p.legend.location = "top_left"
p.legend.background_fill_alpha = 0.7
p.sizing_mode = 'scale_width'
# p.sizing_mode = 'scale_width'
p.sizing_mode = 'stretch_both'
p.yaxis.axis_label = 'Minutes'
@@ -3104,7 +3105,7 @@ def interactive_flex_chart2(id=0,promember=0,
plot.title.text = row.name
plot.title.text_font_size=value("1.0em")
plot.sizing_mode = 'scale_width'
plot.xaxis.axis_label = xaxlabel
plot.yaxis.axis_label = yaxlabel
@@ -3338,17 +3339,21 @@ def interactive_flex_chart2(id=0,promember=0,
title="Max Distance",callback=callback)
callback.args["maxdist"] = slider_dist_max
layout = layoutrow([layoutcolumn([annotation,
thesliders = layoutcolumn([annotation,
slider_spm_min,
slider_spm_max,
slider_dist_min,
slider_dist_max,
slider_work_min,
slider_work_max,
],
),
])
thesliders.sizing_mode = 'scale_width'
layout = layoutrow([thesliders,
plot])
# layout.sizing_mode = 'scale_width'
layout.sizing_mode = 'scale_width'
script, div = components(layout)
@@ -3795,7 +3800,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
# add watermark
plot.extra_y_ranges = {"watermark": watermarkrange}
plot.extra_x_ranges = {"watermark": watermarkrange}
plot.sizing_mode = 'scale_width'
plot.sizing_mode = 'stretch_both'
plot.image_url([watermarkurl],0.05,0.9,
watermarkw,watermarkh,

View File

@@ -24,7 +24,7 @@
<ul class="main-content">
<li class="grid_4">
<div id="theplot" class="flexplot">
<div id="theplot" class="flexplot" style="min-width:300px;">
{{ the_div|safe }}
</div>
</li>

View File

@@ -76,51 +76,20 @@
<li class="grid_5">
<h2 class="midden">WHAT WE OFFER</h2>
</li>
{% for offering in offerings %}
<li class="frontitem">
<h3 class="midden">SYNC</h3>
<h3 class="midden">{{ offering.name }}</h3>
<div class="midden">
<img src="/static/img/upload.png"
<img src="{{ offering.image }}"
alt="Analyze" width="62px">
</div>
<p class="midden">
Easily upload data from the most popular devices and apps.
{{ offering.text }}
</p>
</li>
<li class="frontitem">
<h3 class="midden">LOG</h3>
<div class="midden">
<img src="/static/img/log.png"
alt="Analyze" width="62px">
</div>
<p class="midden">
Maintain
a consistent log for all your rowing (indoor and on the water).
</p>
</li>
<li class="frontitem">
<h3 class="midden">ANALYZE</h3>
<div class="midden">
<img src="/static/img/analyze.png"
alt="Analyze" width="62px">
</div>
<p class="midden">
Analyze your workouts with a consistent set of tools
</p>
</li>
<li class="frontitem">
<h3 class="midden">COMPARE</h3>
<div class="midden">
<img src="/static/img/compare.png"
alt="Analyze" width="62px">
</div>
<p class="midden">
Compare your results between workouts and with other rowers in your team
</p>
</li>
<li>
<a class="button midden" href="">
<h2 class="midden"><div class="rounder whiteborder">and more</div></h2>
</a>
{% endfor %}
<li class="grid_5">
<p class="midden">and more</p>
</li>
<li>
&nbsp;

View File

@@ -48,32 +48,41 @@ xo
}
</style>
{% if team %}
<h1>{{ team.name }} Team Workouts</h1>
{% else %}
<h1>
Workouts of {{ rower.user.first_name }} {{ rower.user.last_name }}
</h1>
{% endif %}
<ul class="main-content">
<li class="grid_2">
<li>
<p>
<form enctype="multipart/form-data" method="post">
<table>
{{ dateform.as_table }}
</table>
{% csrf_token %}
<input name='daterange' type="submit" value="Submit">
</form>
<form enctype="multipart/form-data" method="post">
<table>
{{ dateform.as_table }}
</table>
{% csrf_token %}
<input name='daterange' type="submit" value="Submit">
</form>
</p>
{% if team %}
<p>
<form id="searchform" action="/rowers/list-workouts/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
method="get" accept-charset="utf-8">
{% else %}
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
<form id="searchform" action="/rowers/list-workouts/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
method="get" accept-charset="utf-8">
{% endif %}
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
<input type="submit">
{% else %}
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
method="get" accept-charset="utf-8">
{% endif %}
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
<input type="submit">
</input>
</form>
</form>
</p>
</li>
<li class="grid_2">
<li style="min-height:200px;">
<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");
@@ -83,15 +92,6 @@ xo
{{ the_div |safe }}
</li>
<li>
{% if team %}
<h3>{{ team.name }} Team Workouts</h3>
{% else %}
<h3>
Workouts of {{ rower.user.first_name }} {{ rower.user.last_name }}
</h3>
{% endif %}
</li>
<li>
<p>
<span>

View File

@@ -43,7 +43,7 @@
/
<a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}/">delete</a>
/
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% else %}
@@ -51,7 +51,7 @@
&nbsp;
</tr>
<tr>
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</tr>
{% endif %}
</table>
@@ -99,7 +99,7 @@
/
<a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}/">delete</a>
/
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% else %}
@@ -108,7 +108,7 @@
</tr>
<tr>
<td colspan="4">
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% endif %}
@@ -144,7 +144,7 @@
/
<a href="/rowers/deletemesocycle/{{ mesocycle.0.id }}/">delete</a>
/
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% endif %}
@@ -153,7 +153,7 @@
&nbsp;
</tr>
<tr>
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</tr>
{% endif %}
</table>
@@ -201,7 +201,7 @@
/
<a href="/rowers/deletemesocycle/{{ mesocycle.0.id }}/">delete</a>
/
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% else %}
@@ -210,7 +210,7 @@
</tr>
<tr>
<td colspan="4">
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% endif %}
@@ -251,7 +251,7 @@
/
<a href="/rowers/deletemicrocycle/{{ microcycle.id }}/">delete</a>
/
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% endif %}
@@ -262,7 +262,7 @@
</tr>
<tr>
<td colspan="4">
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% endif %}
@@ -310,7 +310,7 @@
/
<a href="/rowers/deletemicrocycle/{{ microcycle.id }}">delete</a>
/
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% else %}
@@ -319,7 +319,7 @@
</tr>
<tr>
<td colspan="4">
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}/user/{{ rower.user.id }}'>sessions</a>
</td>
</tr>
{% endif %}

View File

@@ -483,6 +483,10 @@ urlpatterns = [
url(r'^sessions/print/user/(?P<userid>\d+)$',views.plannedsessions_print_view),
url(r'^sessions/$',views.plannedsessions_view),
url(r'^sessions/user/(?P<userid>\d+)$',views.plannedsessions_view),
url(r'^sessions/(?P<startdatestring>\d+-\d+-\d+)/(?P<enddatestring>\d+-\d+-\d+)$',
views.plannedsessions_view),
url(r'^sessions/(?P<startdatestring>\d+-\d+-\d+)/(?P<enddatestring>\d+-\d+-\d+)/user/(?P<userid>\d+)$',
views.plannedsessions_view),
url(r'^courses/(?P<id>\d+)/edit$',views.course_edit_view,
name='course_edit_view'),
url(r'^courses/(?P<id>\d+)/delete$',views.course_delete_view),

View File

@@ -6678,7 +6678,6 @@ def workouts_view(request,message='',successmessage='',
'name':'Workouts'
},
]
return render(request, 'list_workouts.html',
{'workouts': workouts,
'active': 'nav-workouts',
@@ -14395,7 +14394,7 @@ def plannedsessions_coach_view(request,
@login_required()
def plannedsessions_view(request,
userid=0):
userid=0,startdatestring='',enddatestring=''):
r = getrequestrower(request,userid=userid)
@@ -14407,6 +14406,18 @@ def plannedsessions_view(request,
startdate,enddate = get_dates_timeperiod(timeperiod)
if startdatestring:
try:
startdate = iso8601.parse_date(startdatestring)
except ParseError:
pass
if enddatestring:
try:
enddate = iso8601.parse_date(enddatestring)
except ParseError:
pass
try:
trainingplan = TrainingPlan.objects.filter(
startdate__lte = startdate,

View File

@@ -5,14 +5,77 @@ from rowers.forms import LoginForm
from rowingdata import main as rmain
import random
def rootview(request):
magicsentence = rmain()
loginform = LoginForm()
planoffering = {
'name': 'PLAN',
'image':'/static/img/Plan.png',
'text':'We offer a fully integrated way for you or your coach to set up a training plan. Compare plan vs execution based on time, distance, heart rate or power.'
}
uploadoffering = {
'name': 'SYNC',
'image':'/static/img/upload.png',
'text':'Easily upload data from the most popular devices and apps'
}
logoffering = {
'name': 'LOG',
'image':'/static/img/log.png',
'text':'Maintain a consistent log for all your rowing (indoor and on the water)'
}
analyzeoffering = {
'name': 'ANALYZE',
'image':'/static/img/analyze.png',
'text':'Analyze your workouts with a consistent set of tools'
}
compareoffering = {
'name': 'COMPARE',
'image':'/static/img/compare.png',
'text':'Compare your results between workouts and with other rowers in your team'
}
raceoffering = {
'name': 'RACE',
'image':'/static/img/Race 01.png',
'text':'Virtual regattas are an informal way to add a competitive element to your training and can be used as a quick way to set up small regattas'
}
coachoffering = {
'name': 'COACHING',
'image':'/static/img/Remote coaching.png',
'text':'Rowsandall.com is the ideal platform for remote rowing coaching. As a coach, you can easily manage your athletes, set up plans and monitor execution and technique'
}
allofferings = [
planoffering,
uploadoffering,
logoffering,
analyzeoffering,
raceoffering,
compareoffering,
coachoffering,
]
aux = list(allofferings)
random.shuffle(aux)
offerings = aux[0:5]
return render(request,
'frontpage.html',
{
'versionstring': magicsentence,
'form':loginform,
'offerings':offerings,
})

View File

@@ -281,7 +281,7 @@ th.rotate > div > span {
}
.frontitem {
background-color: rgba(255,255,255,0.5);
background-color: rgba(255,255,255,0.7);
border: solid 1px wite;
padding: 5px;
margin: 5px;

View File

@@ -438,6 +438,19 @@
color: #dddddd;
padding: 1em 1em 1em 1em;
}
.ad img {
display: block;
width: 100%;
height: auto;
padding: 5px;
}
.ad a {
color: white;
}
.main-footer {
grid-area: footer;
background: #ededed;

BIN
static/img/Plan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/img/Race 01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/img/Race 02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/img/prygl.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -291,7 +291,10 @@
<div class="ad">
{% block ad %}
Advertising
<a href="https://pryglrowing.com">
<img src="/static/img/prygl.jpg">
<p style="text-align: center">Prygl Rowing Camps</p>
</a>
{% endblock %}
</div>