Private
Public Access
1
0
Files
rowsandall/rowers/templates/team.html
2019-01-09 22:49:59 +01:00

83 lines
2.7 KiB
HTML

{% extends "newbase.html" %}
{% block title %}Team {% endblock %}
{% block main %}
<h1>{{ team.name }}</h1>
<ul class="main-content">
<li>
<p>{{ team.notes }}</p>
<p><b>Manager:</b> {{ team.manager.first_name }} {{ team.manager.last_name }}</p>
</li>
<li>
{% if hasrequested %}
<p>You have requested access to this team</p>
{% elif team not in myteams and team not in memberteams %}
<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>
<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>
{% endif %}
</li>
<li class="grid_2">
<h2>Members</h2>
<table width="100%" class="listtable">
<thead>
<tr>
<th>Name</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for member in members %}
<tr>
{% if team.manager == user %}
<td><a href="/rowers/me/edit/{{ member.id }}/"> {{ member.user.first_name }} {{ member.user.last_name }}</a></td>
<td><a class="button red small" href="/rowers/me/team/{{ team.id }}/drop/{{ member.user.id }}/">Drop</a></td>
{% else %}
<td>{{ member.user.first_name }} {{ member.user.last_name }}</td>
<td>&nbsp;</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</li>
<li class="grid_2">
{% 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 %}
<input class="button green" type="submit" value="Submit">
</form>
{% else %}
<p>
&nbsp;
</p>
{% endif %}
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_teams.html' %}
{% endblock %}