Team create, delete, leave, create invite
This commit is contained in:
61
rowers/templates/team.html
Normal file
61
rowers/templates/team.html
Normal 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>
|
||||
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user