Template cleanup

This commit is contained in:
Sebastian Lohff 2017-01-28 19:10:40 +01:00
parent f5cf3ac368
commit 0c69ee13b1
4 changed files with 6 additions and 6 deletions

View File

@ -162,7 +162,7 @@ def viewUserQSOs(request, uid, page=1):
userRefs = set(map(lambda _x: _x["refStr"], user.qso_set.filter(ref__isnull=False).values("ref", "refStr")))
return render(request, "contest/viewUserQSOs.html", {'owner': user, 'qsos': qsos, 'qsoPager': qsoPager, 'qsoPage': qsoPage, 'userRefs': userRefs})
return render(request, "contest/viewUserQSOs.html", {'owner': user, 'qsos': qsos, 'qsoPage': qsoPage, 'userRefs': userRefs})
@staff_member_required
def updateRef(request, shadow, uid):
@ -214,7 +214,7 @@ def viewAllQSOs(request, page=1):
qsoPager = Paginator(qsos, 10)
qsoPage = getPage(qsoPager, request.GET.get('page'))
return render(request, 'contest/viewAllQSOs.html', {'qsoPager': qsoPager, 'qsoPage': qsoPage})
return render(request, 'contest/viewAllQSOs.html', {'qsoPage': qsoPage})
def overview(request):
# FIXME: Hardcoded for cqtu... everywhere

View File

@ -5,7 +5,7 @@
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% for pageNo in pages.page_range %}
{% for pageNo in page.paginator.page_range %}
<li{% if pageNo == page.number %} class="active"{% endif %}><a href="?page={{ pageNo }}" pageNo %}">{{ pageNo }}</a></li>
{% endfor %}
<li class="{% if not page.has_next %}disabled{% endif %}">

View File

@ -1,4 +1,4 @@
{% include "contest/paginationNav.html" with page=qsoPage pages=qsoPager %}
{% include "contest/paginationNav.html" with page=qsoPage %}
<table class="table">
<thead>
<tr>
@ -36,4 +36,4 @@
{% endfor %}
</tbody>
</table>
{% include "contest/paginationNav.html" with page=qsoPage pages=qsoPager %}
{% include "contest/paginationNav.html" with page=qsoPage %}

View File

@ -8,7 +8,7 @@
<div class="panel panel-default">
<div class="panel-heading">All QSOs</div>
<div class="panel-body">
{% include "contest/qsoAdminTable.html" with qsoPage=qsoPage qsoPager=qsoPager %}
{% include "contest/qsoAdminTable.html" with qsoPage=qsoPage %}
</div>
</div>
</div>