Skip to content
Snippets Groups Projects
Commit 041368a6 authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

add result count

parent f7fed4ec
Branches
No related tags found
No related merge requests found
Pipeline #13505 passed
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
{% load add %} {% load add %}
{% block content %} {% block content %}
{% include "contracts/includes/double_heading.html" with icon="ico--search" heading="Vyhledávání" %} {% if any_query_is_set %}
{% include "contracts/includes/double_heading.html" with icon="ico--search" heading="Vyhledávání" subheading=page|length|add:" výsledků" %}
{% else %}
{% include "contracts/includes/double_heading.html" with icon="ico--search" heading="Vyhledávání" %}
{% endif %}
<form method="get" class="mb-10"> <form method="get" class="mb-10">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
......
...@@ -5,4 +5,7 @@ register = template.Library() ...@@ -5,4 +5,7 @@ register = template.Library()
@register.filter @register.filter
def add(value, arg): def add(value, arg):
if isinstance(arg, str):
value = str(value)
return value + arg return value + arg
...@@ -243,8 +243,6 @@ def search(request): ...@@ -243,8 +243,6 @@ def search(request):
annotations, annotations,
) )
print(filter)
return render( return render(
request, request,
"contracts/search.html", "contracts/search.html",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment