doorcontrol: Simplify querystring handling using new querystring
tag
This commit is contained in:
parent
bf3433bb3d
commit
e4c6fab011
@ -10,7 +10,7 @@
|
|||||||
{% for report_name, report_url in report_types %}
|
{% for report_name, report_url in report_types %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link{% if report_name == selected_report %} active{% endif %}"
|
<a class="nav-link{% if report_name == selected_report %} active{% endif %}"
|
||||||
href="{{ report_url }}?{{ query_params }}">{{ report_name }}</a>
|
href="{{ report_url }}{% querystring page=None %}">{{ report_name }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -98,11 +98,6 @@ class BaseAccessReport(
|
|||||||
context["selected_report"] = self._selected_report()
|
context["selected_report"] = self._selected_report()
|
||||||
context["items_per_page"] = self.get_paginate_by(None)
|
context["items_per_page"] = self.get_paginate_by(None)
|
||||||
|
|
||||||
query_params = self.request.GET.copy()
|
|
||||||
if "page" in query_params:
|
|
||||||
query_params.pop("page")
|
|
||||||
context["query_params"] = query_params.urlencode()
|
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user