73 lines
2.9 KiB
Django/Jinja
73 lines
2.9 KiB
Django/Jinja
|
|
#include "header.html.j2"
|
|
# from "macros.html.j2" import rowToggle
|
|
|
|
<h4>Tasks by User</h4>
|
|
<table class="data-list">
|
|
<tr>
|
|
<td class="paginate" colspan="3">
|
|
#if (userPages |length) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'tasksbyuser?start=' + this.value * {{ userRange }} + '{{ util.passthrough('order') }}';">
|
|
#for pageNum in userPages
|
|
<option value="{{ pageNum }}"{{ ' selected' if pageNum == userCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
|
#endfor
|
|
</select>
|
|
</form>
|
|
#endif
|
|
#if userStart > 0
|
|
<a href="tasksbyuser?start={{ userStart - userRange }}{{ util.passthrough('order') }}"><<<</a>
|
|
#endif
|
|
#if totalUsers != 0
|
|
<strong>Users {{ userStart + 1 }} through {{ userStart + userCount }} of {{ totalUsers }}</strong>
|
|
#endif
|
|
#if userStart + userCount < totalUsers
|
|
<a href="tasksbyuser?start={{ userStart + userRange }}{{ util.passthrough('order') }}">>>></a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
<tr class="list-header">
|
|
<th><a href="tasksbyuser?order={{ util.toggleOrder('name') }}">Name</a> {{ util.sortImage('name') }}</th>
|
|
<th><a href="tasksbyuser?order={{ util.toggleOrder('tasks') }}">Tasks</a> {{ util.sortImage('tasks') }}</th>
|
|
<th> </th>
|
|
</tr>
|
|
#if (users |length) > 0
|
|
#for user in users
|
|
<tr class="{{ rowToggle(loop) }}">
|
|
<td><a href="userinfo?userID={{ user.id }}">{{ user.name }}</a></td>
|
|
<td width="{{ graphWidth + 5 }}"><img src="{{ util.themePath('images/1px.gif') }}" width="{{ increment * user.tasks }}" height="15" class="graphrow" alt="graph row"/></td>
|
|
<td>{{ user.tasks }}</td>
|
|
</tr>
|
|
#endfor
|
|
#else
|
|
<tr class="row-odd">
|
|
<td colspan="3">No users</td>
|
|
</tr>
|
|
#endif
|
|
<tr>
|
|
<td class="paginate" colspan="3">
|
|
#if (userPages |length) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'tasksbyuser?start=' + this.value * {{ userRange }} + '{{ util.passthrough('order') }}';">
|
|
#for pageNum in userPages
|
|
<option value="{{ pageNum }}"{{ ' selected' if pageNum == userCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
|
#endfor
|
|
</select>
|
|
</form>
|
|
#endif
|
|
#if userStart > 0
|
|
<a href="tasksbyuser?start={{ userStart - userRange }}{{ util.passthrough('order') }}"><<<</a>
|
|
#endif
|
|
#if totalUsers != 0
|
|
<strong>Users {{ userStart + 1 }} through {{ userStart + userCount }} of {{ totalUsers }}</strong>
|
|
#endif
|
|
#if userStart + userCount < totalUsers
|
|
<a href="tasksbyuser?start={{ userStart + userRange }}{{ util.passthrough('order') }}">>>></a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
#include "footer.html.j2"
|