session coach view v1
This commit is contained in:
126
rowers/templates/plannedsessionscoach.html
Normal file
126
rowers/templates/plannedsessionscoach.html
Normal file
@@ -0,0 +1,126 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Planned Sessions{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid_12 alpha">
|
||||
{% include "planningbuttons.html" %}
|
||||
</div>
|
||||
<div class="grid_4 alpha">
|
||||
{% if theteam %}
|
||||
<h1>Coach Overview. Team {{ theteam.name }}</h1>
|
||||
{% else %}
|
||||
<h1>Coach Overview</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="timeperiod" class="grid_2 dropdown">
|
||||
<button class="grid_2 alpha button gray small dropbtn">Select Time Period ({{ timeperiod|verbosetimeperiod }})</button>
|
||||
<div class="dropdown-content">
|
||||
<a class="button gray small alpha"
|
||||
href="/rowers/sessions/coach/today">
|
||||
Today
|
||||
</a>
|
||||
<a class="button gray small alpha"
|
||||
href="/rowers/sessions/coach/thisweek">
|
||||
This Week
|
||||
</a>
|
||||
<a class="button gray small alpha"
|
||||
href="/rowers/sessions/coach/thismonth">
|
||||
This Month
|
||||
</a>
|
||||
<a class="button gray small alpha"
|
||||
href="/rowers/sessions/coach/lastweek">
|
||||
Last Week
|
||||
</a>
|
||||
<a class="button gray small alpha"
|
||||
href="/rowers/sessions/coach/lastmonth/">
|
||||
Last Month
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% if user.is_authenticated and user|is_manager %}
|
||||
<div class="grid_2 dropdown">
|
||||
<button class="grid_2 alpha button green small dropbtn">
|
||||
See individual plans for Rower
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{% for member in user|team_rowers %}
|
||||
<a class="button green small" href="/rowers/sessions/{{ timeperiod }}/rower/{{ member.id }}">{{ member.user.first_name }} {{ member.user.last_name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2 dropdown">
|
||||
<button class="grid_2 alpha button green small dropbtn">
|
||||
Select Team
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
<a class="button green small" href="/rowers/sessions/coach/{{ timeperiod }}">
|
||||
All Teams
|
||||
</a>
|
||||
|
||||
{% for team in myteams %}
|
||||
<a class="button green small" href="/rowers/sessions/coach/{{ timeperiod }}/team/{{ team.id }}">{{ team.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid_12 alpha">
|
||||
<table width="90%" class="listtable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>On or after</th>
|
||||
<th>On or before</th>
|
||||
<th>Name</th>
|
||||
{% for r in rowers %}
|
||||
<th class="rotate"><div><span>
|
||||
{{ r.user.first_name }} {{ r.user.last_name }}
|
||||
</span></div></th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, thedict in statusdict.items %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ thedict|lookup:'startdate'|date:"Y-m-d" }}
|
||||
</td>
|
||||
<td>
|
||||
{{ thedict|lookup:'enddate'|date:"Y-m-d" }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/rowers/sessions/{{ key }}">
|
||||
{{ thedict|lookup:'name' }}
|
||||
</a>
|
||||
</td>
|
||||
{% for r in rowers %}
|
||||
<td>
|
||||
{% if thedict|lookup:'results'|lookup:r.id == 'completed' %}
|
||||
<a class="green dot"
|
||||
href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ r.id }}/session/{{ key }}"> </a>
|
||||
{% elif thedict|lookup:'results'|lookup:r.id == 'partial' %}
|
||||
<a class="orange dot"
|
||||
href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ r.id }}/session/{{ key }}"> </a>
|
||||
{% elif thedict|lookup:'results'|lookup:r.id == 'not done' %}
|
||||
<a class="white dot"
|
||||
href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ r.id }}/session/{{ key }}"> </a>
|
||||
{% elif thedict|lookup:'results'|lookup:r.id == 'not assigned' %}
|
||||
|
||||
{% else %}
|
||||
<a class="red dot"
|
||||
href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ r.id }}/session/{{ key }}"> </a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user