diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-09-10 14:32:59 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-09-10 14:32:59 +0300 |
commit | 7b6774fba294988693ea227717dc789db898072c (patch) | |
tree | 1cacde2cfce1ba02920eb6f28a50bc3a1dfac6ef /servo | |
parent | 444ec48edc2323d82818195709bce66db7b1ef8b (diff) | |
download | Servo-7b6774fba294988693ea227717dc789db898072c.tar.gz Servo-7b6774fba294988693ea227717dc789db898072c.tar.bz2 Servo-7b6774fba294988693ea227717dc789db898072c.zip |
UI improvements
Diffstat (limited to 'servo')
-rwxr-xr-x | servo/templates/customers/search.html | 4 | ||||
-rw-r--r-- | servo/views/customer.py | 2 | ||||
-rw-r--r-- | servo/views/order.py | 6 |
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) |