Template cleanup
This commit is contained in:
parent
f5cf3ac368
commit
0c69ee13b1
|
@ -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")))
|
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
|
@staff_member_required
|
||||||
def updateRef(request, shadow, uid):
|
def updateRef(request, shadow, uid):
|
||||||
|
@ -214,7 +214,7 @@ def viewAllQSOs(request, page=1):
|
||||||
qsoPager = Paginator(qsos, 10)
|
qsoPager = Paginator(qsos, 10)
|
||||||
qsoPage = getPage(qsoPager, request.GET.get('page'))
|
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):
|
def overview(request):
|
||||||
# FIXME: Hardcoded for cqtu... everywhere
|
# FIXME: Hardcoded for cqtu... everywhere
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<span aria-hidden="true">«</span>
|
<span aria-hidden="true">«</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<li{% if pageNo == page.number %} class="active"{% endif %}><a href="?page={{ pageNo }}" pageNo %}">{{ pageNo }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li class="{% if not page.has_next %}disabled{% endif %}">
|
<li class="{% if not page.has_next %}disabled{% endif %}">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% include "contest/paginationNav.html" with page=qsoPage pages=qsoPager %}
|
{% include "contest/paginationNav.html" with page=qsoPage %}
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -36,4 +36,4 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% include "contest/paginationNav.html" with page=qsoPage pages=qsoPager %}
|
{% include "contest/paginationNav.html" with page=qsoPage %}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">All QSOs</div>
|
<div class="panel-heading">All QSOs</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% include "contest/qsoAdminTable.html" with qsoPage=qsoPage qsoPager=qsoPager %}
|
{% include "contest/qsoAdminTable.html" with qsoPage=qsoPage %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue