lots of ui changes
This commit is contained in:
@@ -5,29 +5,10 @@
|
||||
{% block title %}New Planned Session{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<h1>Create Sessions for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
|
||||
<h1>New 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/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
||||
{{ timeperiod|timedeltadays }} days</a>
|
||||
</p>
|
||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
||||
{{ timeperiod|timedeltadays }} days</a>
|
||||
</p>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<h1>New Session</h1>
|
||||
<li class="grid_4">
|
||||
<form enctype="multipart/form-data" action=""
|
||||
method="post">
|
||||
{% if form.errors %}
|
||||
@@ -40,120 +21,12 @@
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input class="button" 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>
|
||||
</form>
|
||||
<div class="padded" id="id_guidance">
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<h1>Plan</h1>
|
||||
<p>
|
||||
Click on session name to view
|
||||
</p>
|
||||
<table class="listtable shortpadded" width="80%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>After</th>
|
||||
<th>Before</th>
|
||||
<th>Name</th>
|
||||
<th>Value</th>
|
||||
<th> </th>
|
||||
<th>Edit</th>
|
||||
<th>Clone</th>
|
||||
<th>Delete</th>
|
||||
<th>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/user/{{ rower.user.id }}/?when={{ timeperiod }}/?when={{ timeperiod }}">
|
||||
<i class="fas fa-pencil-alt fa-fw"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone/user/{{ rower.user.id }}/?when={{ timeperiod }}/?when={{ timeperiod }}">
|
||||
<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>
|
||||
</li>
|
||||
<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/user/{{ rower.user.id }}/?when={{ timeperiod }}">
|
||||
<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>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user