{% extends "base.html" %} {% block title %}{% if q %}Search: {{ q }}{% else %}Search{% endif %}{% endblock %} {% block content %} {#- Every group search.py finds, eight rows each; "Show all" opens one group on its own (?only=). Works without JavaScript: it is what the top bar's search box opens. Marks come from the snippet's parts, never from HTML in the data. -#} {% macro snippet(parts) -%} {%- for text, hit in parts %}{% if hit %}{{ text }}{% else %}{{ text }}{% endif %}{% endfor -%} {%- endmacro %}

Search{% if q %}: “{{ q }}”{% endif %}

{% if not q %}

Search finds companies, contacts, the subject and text of every logged message, tasks, help pages and the app's pages. Every word you type must appear. Press Ctrl K (⌘ K on a Mac) or / on any page to search without leaving it. More about search and the keyboard.

{% elif not results.total %}

Nothing matches “{{ q }}”. Every word must appear somewhere in the same record; try fewer words, or part of a word.

{% else %}

{{ results.total }} {{ 'match' if results.total == 1 else 'matches' }}{% if only %} in {{ results.groups[0].label | lower }}. All groups{% endif %}.

{% for g in results.groups if g.hits %}

{{ g.label }} ({{ g.total }})

{% if g.more %}

Show all {{ g.total }} {{ g.label | lower }}

{% endif %}
{% endfor %} {% endif %} {% endblock %}