Private
Public Access
1
0

Team create, delete, leave, create invite

This commit is contained in:
Sander Roosendaal
2017-02-09 17:50:32 +01:00
parent f459cea2bd
commit 40e18fee21
10 changed files with 473 additions and 60 deletions

View File

@@ -0,0 +1,61 @@
{% extends "base.html" %}
{% block title %}Team {% endblock %}
{% block content %}
<div class="grid_12 alpha">
<h1>{{ team.name }}</h1>
<p>{{ team.notes }}</p>
<div class="grid_2 suffix_10 alpha">
<a class="button red small" href="/rowers/team/{{ team.id }}/leaveconfirm">Leave this team</a>
</div>
<div class="grid_6 alpha">
<p>
<h2>Members</h2>
<table width="100%" class="listtable">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
{% for member in members %}
<tr>
<td> {{ member.user.first_name }} {{ member.user.last_name }}</td>
</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 slist, or you can type his 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>
&nbsp;
</p>
{% endif %}
</div>
</div>
{% endblock %}