From e00858872fecafdc4947461f5c541e31f670a6e4 Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 6 Mar 2013 15:19:39 +0000 Subject: [PATCH] [#472] Fix dataset messages on general searches groups/orgs etc --- .../package/snippets/search_form.html | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ckan/templates/package/snippets/search_form.html b/ckan/templates/package/snippets/search_form.html index 45fcfd1f8f9..62b6ad9c354 100644 --- a/ckan/templates/package/snippets/search_form.html +++ b/ckan/templates/package/snippets/search_form.html @@ -15,13 +15,12 @@
- {% if request.params and c.page.item_count %} - {{ c.page.item_count }} datasets{% if c.q %} found for “{{ c.q }}”{% endif %} - {% elif request.params and c.page.item_count == 0 %} - Sorry no datasets found{% if c.q %} for “{{ c.q }}”{% endif %} + {% if c.q %} + {{ _('{number} datasets found for "{query}"').format(query=c.q, number=c.page.item_count) }} {% else %} - All datasets + {{ _('{number} datasets found').format(number=c.page.item_count) }} {% endif %} +
{% for field in c.fields_grouped %} @@ -37,15 +36,13 @@ {% endfor %} {% endfor %} - {% if request.params and c.q and c.page.item_count == 0 %} -

Try another search term, - browse the datasets below or add your own data.

- {% endif %}
{% if c.query_error %}

There was an error while searching. Please try again.

+{% else %} + {% if c.page.items %} + {{ h.snippet('snippets/package_list.html', packages=c.page.items, bulk_processing=c.bulk_processing) }} + {% endif %} {% endif %} - -{{ h.snippet('snippets/package_list.html', packages=c.page.items, bulk_processing=c.bulk_processing) }}