aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xservo/templates/customers/search.html4
-rw-r--r--servo/views/customer.py2
-rw-r--r--servo/views/order.py6
3 files changed, 10 insertions, 2 deletions
diff --git a/servo/templates/customers/search.html b/servo/templates/customers/search.html
index 39cccb8..53b416b 100755
--- a/servo/templates/customers/search.html
+++ b/servo/templates/customers/search.html
@@ -5,6 +5,10 @@
<a href="{% url 'customers-create_customer' group='all' %}?name={{ query }}" class="btn"><i class="icon-plus"></i> {% trans "New Customer" %}</a>
{% endblock toolbar %}
+{% block header_row %}
+ <h2>{{ title }}</h2>
+{% endblock header_row %}
+
{% block first_column %}
<ul class="nav nav-list">
<li class="nav-header">{% trans "Show" %}</li>
diff --git a/servo/views/customer.py b/servo/views/customer.py
index 455126e..71beff5 100644
--- a/servo/views/customer.py
+++ b/servo/views/customer.py
@@ -346,7 +346,7 @@ def search(request):
if kind == 'contact':
customers = customers.filter(is_company=False)
- title = _('Search results for "%s"') % query
+ title = _('%d results for "%s"') % (customers.count(), query)
return render(request, "customers/search.html", locals())
diff --git a/servo/views/order.py b/servo/views/order.py
index ade41ac..dcd44f8 100644
--- a/servo/views/order.py
+++ b/servo/views/order.py
@@ -929,7 +929,11 @@ def search(request):
Q(repair__reference=query)
)
- data = {'title': _(u'Search results for "%s"') % query}
+ data = {
+ 'title': _('Orders'),
+ 'subtitle': _(u'%d results for "%s"') % (orders.count(), query)
+ }
+
data['orders'] = orders.distinct()
return render(request, "orders/index.html", data)