Private
Public Access
1
0

Merge branch 'release/v8.03'

This commit is contained in:
Sander Roosendaal
2018-10-18 08:52:24 +02:00
9 changed files with 146 additions and 108 deletions
+2 -1
View File
@@ -1200,7 +1200,8 @@ def createmicrofillers(plan):
plan = plan
).order_by("startdate")
if cycles[0].startdate > plan.startdate:
if cycles and cycles[0].startdate > plan.startdate:
macr = TrainingMicroCycle(
plan=plan,
startdate = plan.startdate,
+48 -61
View File
@@ -14,49 +14,6 @@
<h2 class="midden">For Rowers. By Rowers.</h2>
</p>
</li>
{% if user.is_anonymous %}
<li>
&nbsp;
</li>
<li>
&nbsp;
</li>
<li class="rounder whiteborder">
<a class="button midden" href="/rowers/register">
<h1 class="midden">SIGN UP FREE</h1>
</a>
</li>
<li>
&nbsp;
</li>
<li>
&nbsp;
</li>
<li>
&nbsp;
</li>
<li>
&nbsp;
</li>
<li class="rounder whiteborder">
<form id="idLogInForm" method="post" action="{% url 'login' %}" class="loginForm">{% csrf_token %}
<a class="button midden" href="/rowers/register">
<h2 class="midden">Sign In</h2></a>
{{ form.as_p }}
<button class="midden button white"
id="idLogInSubmit"
name="idLogInSubmit"
type="submit">Login
</button>
</form>
</li>
<li>
&nbsp;
</li>
<li>
&nbsp;
</li>
{% endif %}
<li class="grid_5">
<p class="midden">There is no shortage of training advice for rowers.</p>
@@ -67,10 +24,49 @@
you are, set objectives, make a plan, track progress,
and adjust based on the results you are getting.
</p>
<h2 class="midden">WHAT WE OFFER</h2>
<p class="midden">This site is more than a rowing log book. It enables you
and your coach
to plan and track all your rowing, indoor and on the water, with a large
number of devices and apps. On top of that, it offers the best in
rowing data analytics. Train smart.
</li>
<li class="grid_5">
<div class="midden">
<img src="/static/img/horizontal_line.png"
alt="horizontal line">
</div>
</li>
{% if user.is_anonymous %}
<li>
&nbsp;
<a class="button midden" href="/rowers/register">
<h1 class="midden">
<div class="rounder whiteborder">SIGN UP FREE</div>
</h1>
</a>
</li>
<li class="rounder whiteborder">
<form id="idLogInForm" method="post" action="{% url 'login' %}" class="loginForm">{% csrf_token %}
<a class="button midden" href="/rowers/register">
<h2 class="midden">Sign In</h2></a>
<a href="/password_reset/">Forgot password?</a>
{{ form.as_p }}
<button class="midden button white"
id="idLogInSubmit"
name="idLogInSubmit"
type="submit">Login
</button>
</form>
</li>
<li class="grid_5">
<div class="midden">
<img src="/static/img/horizontal_line.png"
alt="horizontal line">
</div>
</li>
{% endif %}
<li class="grid_5">
<h2 class="midden">WHAT WE OFFER</h2>
</li>
<li class="frontitem">
<h3 class="midden">LOG</h3>
@@ -104,17 +100,8 @@
</p>
</li>
<li>
&nbsp;
</li>
<li>
&nbsp;
</li>
<li>
&nbsp;
</li>
<li class="rounder whiteborder">
<a class="button midden" href="/rowers/features">
<h2 class="midden">VIEW ALL</h2>
<a class="button midden" href="">
<h2 class="midden"><div class="rounder whiteborder">and more</div></h2>
</a>
</li>
<li>
@@ -129,14 +116,14 @@
alt="horizontal line">
</div>
</li>
<li class="grid_5">
<p class="midden">
</ul>
<p class="midden">
<a class="twitter-follow-button"
href="https://twitter.com/rowsandall">
Follow @rowsandall</a>
</p>
</li>
</ul>
</p>
<p class="midden">
Local Time: {% now "jS F Y H:i" %}
+1 -1
View File
@@ -23,7 +23,7 @@
</a>
</li>
<li id="fitness-powerprogress">
<a href="/rowers/fitnessprogress/">
<a href="/rowers/fitness-progress/">
<i class="far fa-watch-fitness fa-fw"></i>&nbsp;Power Progress
</a>
</li>
+6 -6
View File
@@ -2,7 +2,7 @@
<h1>Workout</h1>
<ul class="cd-accordion-menu animated">
<li class="has-children" id="workout">
<input type="checkbox" name="group-workout" id="group-workout">
<input type="checkbox" name="group-workout" id="group-workout" checked>
<label for="group-workout">Workout</label>
<ul>
<li id="workout-dashboard">
@@ -49,6 +49,11 @@
</li>
-->
{% if user.is_authenticated and workout|may_edit:request %}
<li id="chart-image">
<a href="/rowers/workout/{{ workout.id }}/image">
<i class="fas fa-file-image fa-fw"></i>&nbsp;Upload Image
</a>
</li>
<li id="workout-delete">
<a href="/rowers/workout/{{ workout.id }}/delete">
<i class="fas fa-trash-alt fa-fw"></i>&nbsp;Delete
@@ -117,11 +122,6 @@
</a>
</li>
{% endif %}
<li id="chart-image">
<a href="/rowers/workout/{{ workout.id }}/image">
<i class="fas fa-file-image fa-fw"></i>&nbsp;Upload Image
</a>
</li>
</ul>
</li>
<li class="has-children" id="export">
+21 -17
View File
@@ -1,39 +1,43 @@
{% extends "basefront.html" %}
{% extends "newbasefront.html" %}
{% block content %}
{% block main %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
<table>
<tr>
<ul class="main-content">
<li class="frontitem">
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
<tr>
</tr>
<tr>
<td></td>
<td><a href="/password_reset/">Forgot password?</a></td>
</tr>
</tr>
</table>
</table>
<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
</li>
</ul>
<p class="midden"><a class="twitter-follow-button"
<p class="midden"><a class="twitter-follow-button"
href="https://twitter.com/rowsandall">
Follow @rowsandall</a>
</p>
</p>
{% endblock %}
+32
View File
@@ -87,6 +87,38 @@
</pre>
</p>
</li>
<li class="grid_2">
<h1>Detailed Summary Edit</h1>
<p>This is still experimental and there are known bugs. Use at your own risk. Nothing is stored permanently until you hit Save on the summary above. You can use the restore original button to restore the original values.</p>
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/editintervals" method="post">
<table width=100%>
<thead>
<tr>
<th>#</th><th>Time</th><th>Distance</th><th>Type</th>
</tr>
</thead>
<tbody>
{% for i in nrintervals|times %}
<tr>
<td>{{ i }}&nbsp;</td>
<td>
{% get_field_id i "intervalt_" detailform %}
</td>
<td>
{% get_field_id i "intervald_" detailform %}
</td>
<td>
{% get_field_id i "type_" detailform %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% csrf_token %}
<input type="hidden" name="nrintervals" value={{ nrintervals }}>
<input class="button green" type="submit" value="Update">
</form>
</li>
<li class="grid_4">
<h1 id="howto">Interval Shorthand How-To</h1>
<p>This is a quick way to enter the intervals using a special mini-language.</p>
+7
View File
@@ -4002,11 +4002,14 @@ def rankings_view2(request,theuser=0,
velo = d/t
p = 500./velo
pwr = 2.8*(velo**3)
try:
a = {'distance':int(d),
'duration':timedeltaconv(t),
'pace':timedeltaconv(p),
'power':int(pwr)}
predictions.append(a)
except:
pass
# CP model
pwr = p1[0]/(1+t/p1[2])
@@ -11961,7 +11964,11 @@ def workout_summary_edit_view(request,id,message="",successmessage=""
rowdata.updateintervaldata(ivalues,iunits,itypes,iresults=iresults)
intervalstats = rowdata.allstats()
row.summary = intervalstats
try:
row.notes += "\n"+s
except TypeError:
pass
row.save()
rowdata.write_csv(f1,gzip=True)
dataprep.update_strokedata(id,rowdata.df)
-1
View File
@@ -11,7 +11,6 @@
.wrapper > * {
/* border: 2px solid #f08c00; */
border 0;
padding: 5px;
}
.wrapper nav {
+8
View File
@@ -288,6 +288,14 @@ th.rotate > div > span {
color: black;
}
.frontitem label {
color: black;
}
.frontitem a {
color: #1c75bc;
}
.vignet {
border-radius: 50%;
display: block;