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,163 +5,37 @@
{% block title %}New Planned Session{% endblock %}
{% block main %}
<h1>Create Team Session</h1>
<h1>New Team Session</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/teamcreate/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
{{ timeperiod|timedeltadays }} days</a>
</p>
<p><a href="/rowers/sessions/teamcreate/?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 %}
<ul class="main-content">
<li class="grid_2">
<li class="grid_4">
<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 %}
<h1>New Team Session</h1>
<table>
{{ teamform.as_table }}
</table>
<table>
{{ form.as_table }}
</table>
<input class="button green" type="submit" value="Save">
<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><input class="button" type="submit" value="Save and Create New Session" name="_addanother"></p>
<div id="id_guidance" class="padded">
</div>
</form>
</li>
{% if plannedsessions %}
<li class="grid_2">
<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>
</li>
{% endif %}
<li class="grid_2">
<h1>Session Library</h1>
{% if alltags %}
<p>
Click on a tag to filter:
{% for tag in alltags %}
<a href="/rowers/sessions/create/?when={{ timeperiod }}&tag={{ tag }}">{{ tag }}</a>
{% endfor %}
</p>
<p>
<a href="/rowers/sessions/create/?when={{ timeperiod }}">Clear tags</a>
</p>
{% endif %}
<table class="listtable shortpadded" width="80%">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>Copy to Calendar</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
{% for ps in sessiontemplates %}
<tr>
<td>
{% if ps.name != '' %}
{{ ps.name }}
{% else %}
Unnamed Session
{% endif %}
</td>
<td> {{ ps.sessionvalue }} {{ ps.sessionunit }} </td>
<td>
<a class="small"
href="/rowers/sessions/{{ ps.id }}/clone/team/">
<i class="fas fa-clone fa-fw"></i>
</a>
</td>
{% if ps.manager == request.user %}
<td>
<a class="small" href="/rowers/sessions/{{ ps.id }}/templateedit/"><i class="fas fa-pencil-alt fa-fw"></i></a>
</td>
<td>
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm/?next={{ request.path|urlencode }}"><i class="fas fa-trash-alt fa-fw"></i></a>
</td>
{% else %}
<td></td><td></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</li>
</ul>
</form>
{% endblock %}