mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Add pagination for machine history results
This commit is contained in:
parent
c891e52118
commit
3e52ac48d6
2 changed files with 11 additions and 7 deletions
|
@ -66,6 +66,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% include 'pagination.html' with list=events %}
|
||||
{% else %}
|
||||
<h3>{% trans "No result" %}</h3>
|
||||
{% endif %}
|
||||
|
|
|
@ -489,16 +489,19 @@ def stats_search_machine_history(request):
|
|||
history_form = MachineHistoryForm(request.GET or None)
|
||||
if history_form.is_valid():
|
||||
history = MachineHistory()
|
||||
return render(
|
||||
request,
|
||||
"logs/machine_history.html",
|
||||
{
|
||||
"events":
|
||||
history.get(
|
||||
events = history.get(
|
||||
history_form.cleaned_data.get("q", ""),
|
||||
history_form.cleaned_data
|
||||
)
|
||||
},
|
||||
max_result = GeneralOption.get_cached_value("search_display_page")
|
||||
re2o_paginator(request,
|
||||
events,
|
||||
max_result)
|
||||
|
||||
return render(
|
||||
request,
|
||||
"logs/machine_history.html",
|
||||
{ "events": events },
|
||||
)
|
||||
return render(request, "logs/search_machine_history.html", {"history_form": history_form})
|
||||
|
||||
|
|
Loading…
Reference in a new issue