From 362ecf564a01b321d43c22c5e50ee3a5c7a422b9 Mon Sep 17 00:00:00 2001 From: Dave Dash Date: Tue, 7 Dec 2010 16:47:23 -0800 Subject: [PATCH] Fixes for device/manufacture faceting. --- .../dashboard/templates/dashboard/devices.html | 17 +++++++++++------ .../dashboard/templates/dashboard/locales.html | 2 +- .../templates/dashboard/manufacturers.html | 13 +++++++++---- apps/feedback/helpers.py | 6 +++--- apps/search/client.py | 6 +++++- apps/search/forms.py | 18 ++++++++++++++---- apps/search/templates/search/search.html | 10 +++++----- apps/search/tests.py | 17 +++++++++++++++++ 8 files changed, 65 insertions(+), 24 deletions(-) diff --git a/apps/dashboard/templates/dashboard/devices.html b/apps/dashboard/templates/dashboard/devices.html index d154e395..6a6c586f 100644 --- a/apps/dashboard/templates/dashboard/devices.html +++ b/apps/dashboard/templates/dashboard/devices.html @@ -1,9 +1,11 @@ {% macro device_item(device, count=0, selected=False) %}
  • -
  • {% endmacro %} @@ -13,10 +15,13 @@ {{ filter_box_toggle(_('Devices')) }} {% endif %} diff --git a/apps/dashboard/templates/dashboard/locales.html b/apps/dashboard/templates/dashboard/locales.html index ec8c370e..507fda85 100644 --- a/apps/dashboard/templates/dashboard/locales.html +++ b/apps/dashboard/templates/dashboard/locales.html @@ -18,7 +18,7 @@ {% if defaults['locale'] %} {{ locale_item(defaults['locale'], selected=True) }} {% else %} - {% for item in locales %} + {% for item in locales[:15] %} {{ locale_item(item.locale, item.count) }} {% endfor %} {% endif %} diff --git a/apps/dashboard/templates/dashboard/manufacturers.html b/apps/dashboard/templates/dashboard/manufacturers.html index 6b3dde3c..b1cf22dd 100644 --- a/apps/dashboard/templates/dashboard/manufacturers.html +++ b/apps/dashboard/templates/dashboard/manufacturers.html @@ -1,6 +1,7 @@ {% macro brand_item(manufacturer, count=0, selected=False) %}
  • -