107 lines
3.3 KiB
HTML
107 lines
3.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Team {% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="grid_12 alpha">
|
|
{% include "teambuttons.html" with teamid=team.id %}
|
|
</div>
|
|
<div class="grid_12">
|
|
<div class="grid_8 alpha">
|
|
<h1>{{ team.name }}</h1>
|
|
|
|
<div class="grid_4 omega">
|
|
<p>{{ team.notes }}</p>
|
|
<p><b>Manager:</b> {{ team.manager.first_name }} {{ team.manager.last_name }}</p>
|
|
</div>
|
|
</div>
|
|
<div class="grid_12 alpha">
|
|
{% if ismember %}
|
|
<div class="grid_2 alpha">
|
|
<a class="button red small" href="/rowers/team/{{ team.id }}/leaveconfirm">Leave this team</a>
|
|
</div>
|
|
{% if team.manager == user %}
|
|
<div class="grid_2 suffix_8 omega">
|
|
<a class="button blue small" href="/rowers/team/{{ team.id }}/edit">Edit Team</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="grid_2 suffix_8 omega">
|
|
<p>
|
|
</div>
|
|
{% endif %}
|
|
{% elif hasrequested %}
|
|
<p>You have requested access to this team</p>
|
|
{% else %}
|
|
<p>You can request access to this team. By requesting access, you
|
|
agree to the <a href="/rowers/legal">Privacy Policy</a> regarding
|
|
team functionality. You agree to share your workout data (except
|
|
workouts marked as "private") to all team members and the team manager.
|
|
You also grant the team manager access to your heart rate and power
|
|
zone settings, as well as your functional threshold information. You
|
|
are granting the team manager permission to edit your workouts.</p>
|
|
<div class="grid_2 suffix_10 alpha tooltip">
|
|
<a class="button green small" href="/rowers/team/{{ team.id }}/requestmembership/{{ user.id }}">Join</a>
|
|
<span class="tooltiptext">A request will be sent to the team manager</span>
|
|
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="grid_12 alpha">
|
|
<div class="grid_6 alpha">
|
|
<p>
|
|
<h2>Members</h2>
|
|
<table width="70%" class="listtable">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for member in members %}
|
|
<tr>
|
|
<td><a href="/rowers/rower/edit/{{ member.id }}"> {{ member.user.first_name }} {{ member.user.last_name }}</a></td>
|
|
{% if team.manager == user %}
|
|
<td><a class="button red small" href="/rowers/me/team/{{ team.id }}/drop/{{ member.user.id }}">Drop</a></td>
|
|
{% else %}
|
|
<td> </td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</p>
|
|
|
|
|
|
</div>
|
|
<div class="grid_6 omega">
|
|
{% if team.manager == user %}
|
|
<p>Use the form to add a new user. You can either select a user from the list of your existing club members who are not on this team yet, or you can type the user's email address, which also works for users who have not registered to the site yet.</p>
|
|
{% if inviteform.errors %}
|
|
<p style="color: red;">
|
|
Please correct the error{{ inviteform.errors|pluralize }} below.
|
|
</p>
|
|
{% endif %}
|
|
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
|
<table>
|
|
{{ inviteform.as_table }}
|
|
</table>
|
|
{% csrf_token %}
|
|
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
|
|
<input class="button green" type="submit" value="Submit">
|
|
</div>
|
|
</form>
|
|
{% else %}
|
|
<p>
|
|
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|