{% extends "page.html" %} {% import 'macros/form.html' as form %} {% block subtitle %}{{ _("Search for a Dataset") }}{% endblock %} {% block add_action_content %} {% if h.check_access('package_create') %} {% link_for _('Add Dataset'), controller='package', action='new', class_='btn btn-primary', icon='plus-sign-alt' %} {% endif %} {% endblock %} {% block breadcrumb_content %}
  • {{ h.nav_link(_('Datasets'), controller='package', action='search', highlight_actions = 'new index') }}
  • {% endblock %} {% block primary_content %}
    {% snippet 'snippets/search_result_text.html', query=c.q, count=c.page.item_count, type='dataset' %}
    {% for field in c.fields_grouped %} {% set search_facets_items = c.search_facets.get(field)['items'] %} {{ c.facet_titles.get(field) }}: {% for value in c.fields_grouped[field] %} {%- if c.translated_fields and c.translated_fields.has_key((field,value)) -%} {{ c.translated_fields[(field,value)] }} {%- else -%} {{ h.list_dict_filter(search_facets_items , 'name', 'display_name', value) }} {%- endif %} {% endfor %} {% endfor %}
    {% if request.params and c.page.item_count == 0 %} {% trans %}

    Please try another search.

    {% endtrans %} {% endif %}
    {% if c.query_error %} {% trans %}

    There was an error while searching. Please try again.

    {% endtrans %} {% endif %} {{ h.snippet('snippets/package_list.html', packages=c.page.items) }}
    {{ c.page.pager(q=c.q) }}
    {% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %} {% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/{0}/{1}/api.html'.format(request.environ.CKAN_LANG, g.ckan_doc_version)) %} {% if g.dumps_url -%} {% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %} {% trans %} You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}. {% endtrans %} {% else %} {% trans %} You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}). {% endtrans %} {%- endif %}
    {% endblock %} {% block secondary_content %} {% for facet in c.facet_titles %} {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} {% endfor %} {% endblock %}