Private
Public Access
1
0

Merge branch 'develop' into feature/workoutslist

This commit is contained in:
Sander Roosendaal
2021-12-28 13:15:22 +01:00
18 changed files with 76 additions and 543 deletions

View File

@@ -13,13 +13,14 @@
on behalf of {{ name }}.
</p>
<p>
By accepting the invite, you are agreeing with the sharing
By accepting the invite, you are agreeing with the sharing
of personal data according to our privacy policy.
</p>
<p>
To accept the login to the
site and you will find the invitation here on the Teams page:
<a href="{{ siteurl }}/rowers/me/teams">{{ siteurl }}/rowers/me/teams</a>
<a href="{{ siteurl }}/rowers/me/teams">{{ siteurl }}/rowers/me/teams</a>,
including the email address of {{ name }}, if you need a contact.
</p>
<p>
You can also click the direct link:

View File

@@ -10,9 +10,11 @@
</li>
<li id="compare">
{% if team %}
<a href="/rowers/team-compare-select/team/{{ team.id }}/"><i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare</a>
<a href="/rowers/user-analysis-select/compare/team/{{ team.id }}/">
<i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare</a>
{% else %}
<a href="/rowers/team-compare-select/team/0/"><i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare</a>
<a href="/rowers/user-analysis-select/compare/team/0/">
<i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare</a>
{% endif %}
</li>
<li>

View File

@@ -48,7 +48,7 @@
</a>
</li>
<li id="compare">
<a href="/rowers/team-compare-select/workout/{{ workout.id|encode }}/">
<a href="/rowers/user-analysis-select/compare/workout/{{ workout.id|encode }}/">
<i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare
</a>
</li>

View File

@@ -10,10 +10,10 @@
</li>
<li id="compare">
{% if team %}
<a href="/rowers/team-compare-select/team/{{ team.id }}/">
<a href="/rowers/user-analysis-select/compare/team/{{ team.id }}/">
<i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare</a>
{% else %}
<a href="/rowers/team-compare-select/team/0/">
<a href="/rowers/user-analysis-select/compare/team/0/">
<i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare</a>
{% endif %}
</li>

View File

@@ -1,144 +0,0 @@
{% extends "newbase.html" %}
{% load static %}
{% load rowerfilters %}
{% block title %}Workouts{% endblock %}
{% block main %}
<script>
function toggle(source) {
checkboxes = document.querySelectorAll("input[name='workouts']");
for(var i=0, n=checkboxes.length;i<n;i++) {
checkboxes[i].checked = source.checked;
}
}
</script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(function() {
// Get the form fields and hidden div
var modality = $("#id_modality");
var hidden = $("#id_waterboattype");
// Hide the fields.
// Use JS to do this in case the user doesn't have JS
// enabled.
hidden.hide();
if (modality.val() == 'water') {
hidden.show();
}
// Setup an event listener for when the state of the
// checkbox changes.
modality.change(function() {
// Check to see if the checkbox is checked.
// If it is, show the fields and populate the input.
// If not, hide the fields.
var Value = modality.val();
if (Value=='water') {
// Show the hidden fields.
hidden.show();
} else {
// Make sure that the hidden fields are indeed
// hidden.
hidden.hide();
// You may also want to clear the value of the
// hidden fields here. Just in case somebody
// shows the fields, enters data to them and then
// unticks the checkbox.
//
// This would do the job:
//
// $("#hidden_field").val("");
}
});
});
</script>
<h1>{{ team.name }} Compare Workouts</h1>
<ul class="main-content">
<li class="grid_4">
<p>Select two or more workouts on the left, set your plot settings,
and press submit</p>
<p>
You can use the date and search forms 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>
</li>
<li class="grid_2">
<form enctype="multipart/form-data"
action=""
method="post">
<table>
{{ dateform.as_table }}
</table>
<table>
{{ modalityform.as_table }}
</table>
{% csrf_token %}
<p>
<input name='modalityform' class="button green" type="submit" value="Filter">
</p>
</form>
</li>
<li class="grid_2">
<form id="searchform"
action=""
method="get" accept-charset="utf-8">
{{ searchform }}
<input type="submit" value="GO"></input>
</form>
</li>
<li class="grid_2 maxheight">
{% if workouts %}
<form enctype="multipart/form-data"
action="/rowers/multi-compare/"
method="post">
<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 %}
</li>
<li class="grid_2">
<p>
{% csrf_token %}
<table>
{{ chartform.as_table }}
</table>
</p>
<p>
<input name="chartform" type="submit" value="Compare">
</p>
</form>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_workouts.html' %}
{% endblock %}

View File

@@ -6,7 +6,7 @@
</div>
<div class="grid_2">
<p>
<a class="button gray small" href="/rowers/team-compare-select/team/{{ teamid }}/">Multi Compare</a>
<a class="button gray small" href="/rowers/user-analysis-select/compare/{{ teamid }}/">Multi Compare</a>
</p>
</div>
<div class="grid_2">

View File

@@ -21,7 +21,7 @@
<a href="/rowers/team/{{ team.id }}/">{{ team.name }}</a>
</td>
<td>
<a class="button small red" href="/rowers/team/{{ team.id }}/leaveconfirm/">Leave</a>
<a href="/rowers/team/{{ team.id }}/leaveconfirm/">Leave</a>
</td>
</tr>
{% endfor %}
@@ -29,7 +29,7 @@
</table>
</li>
{% endif %}
{% if otherteams %}
<li class="grid_2">
<h2>Open Groups</h2>
@@ -73,7 +73,7 @@
<a href="/rowers/team/{{ team.id }}/">{{ team.name }}</a>
</td>
<td>
<a class="button small red" href="/rowers/team/{{ team.id }}/deleteconfirm/">Delete</a>
<a href="/rowers/team/{{ team.id }}/deleteconfirm/">Delete</a>
</td>
</tr>
{% endfor %}
@@ -98,7 +98,7 @@
{{ coach.user.first_name }} {{ coach.user.last_name }}
</td>
<td>
<a class="button small red"
<a
href="/rowers/coaches/{{ coach.id }}/dropcoachconfirm/">Remove
</a>
</td>
@@ -124,7 +124,7 @@
{{ coachee.user.first_name }} {{ coachee.user.last_name }}
</td>
<td>
<a class="button small red"
<a
href="/rowers/coaches/{{ coachee.id }}/dropconfirm/">Remove
</a>
</td>
@@ -138,11 +138,11 @@
<li class="grid_2">
<h2>Group Invitations and Requests</h2>
<p>This section lists open invites to join a group. By accepting
a group invite, you are agreeing with the sharing
a group invite, you are agreeing with the sharing
of personal data between group members and coaches according to
our <a href="/rowers/legal/">privacy policy</a>.
</p>
<p>As a group manager, by accepting a group invite, you are agreeing
with our <a href="/rowers/legal/">privacy policy</a> regarding groups and
personal data owned by group members.</p>
@@ -163,10 +163,10 @@
<td><a href="/rowers/team/{{ i.team.id }}/">{{ i.team.name }}</a></td>
<td>{{ i.team.manager.first_name }} {{ i.team.manager.last_name }}</td>
<td>{{ user.first_name }} {{ user.last_name }}</td>
<td><a class="button small green" href="/rowers/me/invitation/{{ i.code }}/">Accept</a>
<td><a href="/rowers/me/invitation/{{ i.code }}/">Accept</a>
</td>
<td>
<a class="button small red" href="/rowers/me/invitation/{{ i.id }}/reject/">Reject</a>
<a href="/rowers/me/invitation/{{ i.id }}/reject/">Reject</a>
</td>
</tr>
{% endfor %}
@@ -184,9 +184,9 @@
<td><a href="/rowers/team/{{ i.team.id }}/">{{ i.team.name }}</a></td>
<td>{{ i.team.manager.first_name }} {{ i.team.manager.last_name }}</td>
<td>{{ i.user.first_name }} {{ i.user.last_name }}</td>
<td><a class="button small green" href="/rowers/me/request/{{ i.code }}/">Accept</a>
<td><a href="/rowers/me/request/{{ i.code }}/">Accept</a>
<td>
<a class="button small red" href="/rowers/me/request/{{ i.id }}/reject/">Reject</a>
<a href="/rowers/me/request/{{ i.id }}/reject/">Reject</a>
</td>
</tr>
{% endfor %}
@@ -201,7 +201,7 @@
{% endif %}
<td>&nbsp;
<td>
<a class="button small red" href="/rowers/me/invitation/{{ i.id }}/revoke/">Revoke</a>
<a href="/rowers/me/invitation/{{ i.id }}/revoke/">Revoke</a>
</td>
</tr>
{% endfor %}
@@ -218,7 +218,7 @@
<table>
{{ form.as_table }}
</table>
<input class="button green" type="submit" value="Submit">
<input class="button" type="submit" value="Submit">
</form>
{% endif %}
{% if mycoachrequests or mycoachoffers or coachoffers or coachrequests %}
@@ -226,16 +226,17 @@
<h2>Coaching Offers and Requests</h2>
<p>This section lists open offers and requests related to coaching.
By accepting a coaching offer, the coach can run
analysis, add workouts and edit settings on behalf of the athlete.
analysis, add workouts and edit settings on behalf of the athlete.
You agree to the sharing
of personal data between athletes and coaches according to
our <a href="/rowers/legal/">privacy policy</a>.
</p>
</p>
<table width="90%" class="listtable">
<thead>
<tr>
<th>Coach</th>
<th>User</th>
<th>E-mail</th>
<th>Action</th>
<th>&nbsp;</th>
</tr>
@@ -245,12 +246,13 @@
<tr>
<td>{{ i.coach.user.first_name }} {{ i.coach.user.last_name }}</td>
<td>{{ i.user.first_name }} {{ i.user.last_name }}</td>
<td>{{ i.user.email }}</td>
<td><a
class="button small green"
href="/rowers/me/coachrequest/{{ i.code }}/accept">Accept</a>
</td>
<td>
<a class="button small red" href="/rowers/me/coachrequest/{{ i.id }}/reject/">Reject</a>
<a href="/rowers/me/coachrequest/{{ i.id }}/reject/">Reject</a>
</td>
</tr>
{% endfor %}
@@ -261,7 +263,7 @@
<td>&nbsp;
</td>
<td>
<a class="button small red" href="/rowers/me/coachoffer/{{ i.id }}/revoke/">Revoke</a>
<a href="/rowers/me/coachoffer/{{ i.id }}/revoke/">Revoke</a>
</td>
</tr>
{% endfor %}
@@ -272,7 +274,7 @@
<td>&nbsp;</td>
<td>
<a
class="button small red"
href="/rowers/me/coachrequest/{{ i.id }}/revoke/">Revoke</a>
</td>
</tr>
@@ -282,12 +284,12 @@
<td>{{ i.coach.user.first_name }} {{ i.coach.user.last_name }}</td>
<td>{{ i.user.first_name }} {{ i.user.last_name }}</td>
<td><a
class="button small green"
href="/rowers/me/coachoffer/{{ i.code }}/accept/">Accept</a>
</td>
<td>
<a
class="button small red"
href="/rowers/me/coachoffer/{{ i.id }}/revoke/">Reject</a>
</td>
</tr>
@@ -312,14 +314,14 @@
<td>{{ a.user.first_name }} {{ a.user.last_name }}</td>
<td>
<a
class="button small green"
href="/rowers/me/coachoffer/{{ a.user.id }}/">Offer Coaching</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</li>
</li>
{% endif %}
{% if potentialcoaches %}
<li class="grid_2">
@@ -337,7 +339,7 @@
<td>{{ c.first_name }} {{ c.last_name }}</td>
<td>
<a
class="button small green"
href="/rowers/me/coachrequest/{{ c.id }}/">Request Coaching</a>
</td>
</tr>