Private
Public Access
1
0

lots of ui changes

This commit is contained in:
Sander Roosendaal
2021-03-08 12:02:11 +01:00
parent 35d97797c7
commit 760ac8702d
9 changed files with 148 additions and 601 deletions

View File

@@ -5,129 +5,37 @@
{% block title %}New Planned Session{% endblock %}
{% block main %}
<h1>Edit Team Session</h1>
<h1>Edit Session {{ plannedsession.name }}</h1>
<ul class="main-content">
<li class="grid_2">
<p>
<form enctype="multipart/form-data" method="get">
<table>
{{ dateform.as_table }}
</table>
<input type="Submit" value="Set Date Range">
</form>
</p>
</li>
<li class="grid_2">
<p><a href="/rowers/sessions/coach/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
{{ timeperiod|timedeltadays }} days</a>
</p>
<p><a href="/rowers/sessions/coach/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
{{ timeperiod|timedeltadays }} days</a>
</p>
</li>
</ul>
<form enctype="multipart/form-data" action="" method="post">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
{% csrf_token %}
<ul class="main-content">
<li class="grid_2">
<h1>Select Team</h1>
<li class="grid_4">
<p>
Selecting a team assigns this session to all members of the team.
Unselecting a team does not remove rowers
who are already assigned to this session. Use the Rowers selection for that.
</p><p>
<table>
{{ teamform.as_table }}
</table></p>
</li>
<li class="grid_2">
<h1>Select Rowers</h1>
<p>
</table>
<table>
{{ rowersform.as_table }}
</table>
</p>
</li>
<li class="grid_2">
<h1>Session {{ plannedsession.name }}</h1>
<li class="grid_4">
<table>
{{ form.as_table }}
</table>
<p><input class="button" type="submit" value="Save" name="_save"></p>
<p><input class="button" type="submit" value="Save and Keep Editing" name="_continue"></p>
<p>
<a href="/rowers/sessions/{{ plannedsession.id }}/deleteconfirm"><i class="fas fa-trash-alt fa-fw"></i> Delete</a>
</p>
<p>
<a href="/rowers/sessions/{{ plannedsession.id }}/clone"><i class="fas fa-clone fa-fw"></i> Clone</a>
</p>
<p>
<input type="submit" value="Save">
</p>
<div id="id_guidance" class="padded">
</div>
</li>
<li class="grid_2">
{% if plannedsessions %}
<h1>Team Plan Sessions</h1>
<p>
<table class="listtable shortpadded" width="80%">
<thead>
<tr>
<th>After</th>
<th>Before</th>
<th>Name</th>
<th>Value</th>
<th>&nbsp;</th>
<th>Edit</th>
<th>Clone</th>
<th>Delete</th>
<th>To Library</th>
</tr>
</thead>
<tbody>
{% for ps in plannedsessions %}
<tr>
<td> {{ ps.startdate|date:"Y-m-d" }} </td>
<td> {{ ps.enddate|date:"Y-m-d" }} </td>
<td>
{% if ps.name != '' %}
<a class="small"
href="/rowers/sessions/{{ ps.id }}">{{ ps.name }}</a>
{% else %}
<a class="small"
href="/rowers/sessions/{{ ps.id }}">Unnamed Session</a>
{% endif %}
</td>
<td> {{ ps.sessionvalue }} </td>
<td> {{ ps.sessionunit }} </td>
<td>
<a class="small" href="/rowers/sessions/{{ ps.id }}/edit"><i class="fas fa-pencil-alt fa-fw"></i></a>
</td>
<td>
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone"><i class="fas fa-clone fa-fw"></i></a>
</td>
<td>
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm"><i class="fas fa-trash-alt fa-fw"></i></a>
</td>
<td>
<a class="small" href="/rowers/sessions/{{ ps.id }}/maketemplate/"><i class="fas fa-books fa-fw"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
{% endif %}
</li>
</ul>
</form>
{% endblock %}