{% extends "base.html" %} {% from "macros/box.html" import m_box_menu %} {% from "macros/tag.html" import m_tags_from_hit %} {% block main %} {# Search bar on top #}
{%- if not results %}

{{ _("Your query didn't match any results.") }}

{%- else %}

{{ _('%(count)d items found', count=results_count) }}

{%- endif -%}
{%- if by_object_type %} {% call m_box_menu(title=_('Filter by type'), omit_body=True) %}
{%- for name, count, link, is_active in by_object_type %} {{ name }} {%- if count %} {{ count|roughsize }} {%- endif %} {%- endfor %}
{% endcall %} {%- endif %}
{% if results %}
{%- for hit in results %}
{%- if (filtered_by_type|length) != 1 %} {{ friendly_fqcn(hit['object_type']) }}   {%- endif %} {{ hit.highlights('name')|safe or hit['name']}} {%- if hit['tag_ids'] %}
{{ m_tags_from_hit(hit) }}
{%- endif %} {%- if 'description' in hit %}
{{ hit.highlights('description')|safe }}
{%- endif %} {%- if 'creator' in hit %} {%- set author_type, author_id = hit['creator'].split(':') %} {%- set author_href = url_for('social.' + author_type, **{(author_type + '_id'): author_id}) %} {%- endif %}
{%- endfor %}
{%- if pagecount > 1 %} {%- endif %} {%- endif %}
{% endblock %}