Private
Public Access
1
0

list workouts for team members

This commit is contained in:
Sander Roosendaal
2017-02-14 10:50:03 +01:00
parent 9e737458b6
commit 253454ff3f
6 changed files with 181 additions and 115 deletions

View File

@@ -9,7 +9,8 @@
<div class="grid_12">
<h1>Forbidden</h1>
<p>
Access forbidden
Access forbidden. You probably tried to access functionality on a workout
or chart that is not owned by you.
</p>
</div>

View File

@@ -64,7 +64,11 @@
receive stroke
data from the site directly.</p>
<p>The REST API is a work in progress. </p>
<p>The REST API is a work in progress. We are open to improvement
suggestions (provided they don't break existing apps). Please send
email to <a href="mailto:info@rowsandall.com">info@rowsandall.com</a>
with questions and/or suggestions. We
will get back to you as soon as possible.</p>
<ul>
<li>Advantages

View File

@@ -10,7 +10,11 @@
Select start and end date for a date range:
<div class="grid_4 alpha">
{% if team %}
<form enctype="multipart/form-data" action="/rowers/list-workouts/team/{{ team.id }}/" method="post">
{% else %}
<form enctype="multipart/form-data" action="/rowers/list-workouts/" method="post">
{% endif %}
<table>
{{ dateform.as_table }}
@@ -24,7 +28,11 @@
</div>
<div class="grid_8 alpha">
{% if team %}
<h3>{{ team.name }} Team Workouts</h3>
{% else %}
<h3>My Workouts</h3>
{% endif %}
{% if workouts %}
<table width="100%" class="listtable">
@@ -38,8 +46,14 @@
<th> Duration </th>
<th> Avg HR </th>
<th> Max HR </th>
{% if not team %}
<th> Delete</th>
<th> Export</th>
{% else %}
<th colspan="2">
Owner
</th>
{% endif %}
</tr>
</thead>
<tbody>
@@ -47,19 +61,37 @@
<tr>
<td> {{ workout.date |truncatechars:15}} </td>
<td> {{ workout.starttime }} </td>
<td>
<td>
{% if workout.user.user == user %}
{% if workout.name != '' %}
<a href="/rowers/workout/{{ workout.id }}/edit">{{ workout.name }}</a> </td>
{% else %}
<a href="/rowers/workout/{{ workout.id }}/edit">No Name</a> </td>
{% endif %}
{% endif %}
{% else %}
{% if workout.name != '' %}
<a href="/rowers/workout/{{ workout.id }}/">{{ workout.name }}</a> </td>
{% else %}
<a href="/rowers/workout/{{ workout.id }}/">No Name</a> </td>
{% endif %}
{% endif %}
<td> {{ workout.workouttype }} </td>
<td> {{ workout.distance }}m</td>
<td> {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </td>
<td> {{ workout.averagehr }} </td>
<td> {{ workout.maxhr }} </td>
<td> <a class="button red small" href="/rowers/workout/{{ workout.id }}/deleteconfirm">Delete</td>
<td> <a class="button blue small" href="/rowers/workout/{{ workout.id }}/export">Export</a> </td>
{% if not team %}
<td>
<a class="button red small" href="/rowers/workout/{{ workout.id }}/deleteconfirm">Delete
</td>
<td>
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/export">Export</a>
</td>
{% else %}
<td colspan="2">
{{ workout.user.user.first_name }} {{ workout.user.user.last_name }}
</td>
{% endif %}
<td> <a class="button blue small" href="/rowers/workout/{{ workout.id }}/flexchart">Flex</a> </td>
@@ -106,8 +138,13 @@
<div class="grid_5 alpha">
{% if team %}
<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" }}"
method="get" accept-charset="utf-8">
{% endif %}
<div class="grid_3 prefix_1 alpha">
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
</div>