{% extends "layouts/" + render_mode + ".html" %} {% block content %} {% set view_description = view_description or [] %} {% if result %} {%- set profiles = mailpile('profiles').result %} {%- set theme_colors = theme_settings().colors %} {%- set with_top_composer = [] %} {%- for tid in result.search_tag_ids -%} {% if config.tags[tid].type == 'drafts' %}{% do with_top_composer.append(tid) %}{% endif %} {%- endfor %} {%- for qv in state.query_args.q -%} {% if '@' in qv|list %}{% do with_top_composer.append(tid) %}{% endif %} {%- endfor %} {%- set with_top_composer = (False and profiles.profiles and with_top_composer) %} {# FIXME! ^^ false #} {%- if view_description and result.stats.total > 0 and not result.data.messages %}
{%- for d in view_description %}{{ d|safe }} {% endfor %}
{%- endif %} {%- if not result.data or not result.data.messages %} {# This puts a handy composer at the top of some search results #} {%- if with_top_composer %} {%- include("partials/pile_compose.html") %} {%- endif %} {%- endif %} {%- for previous_mid, this_mid, next_mid in result.thread_ids|with_context %} {%- set mid = result.view_pairs.get(this_mid, this_mid) %} {%- if false and mid in result.data.messages and result.data.metadata[mid].urls.editing %} {# FIXME! ^^ false #} {%- include("partials/pile_compose.html") %} {%- else %} {%- include("partials/search_item.html") %} {%- endif %} {%- endfor %}
{% if result.stats.total > 0 %} {%- include("search/prev_more_next.html") %} {% elif not with_top_composer %}
{%- if profiles.profiles|length <= 0 %}

{{_("Nothing Happened.")}}

{{_("Usually, matching e-mails would be listed here.")}}


{{_("You need to create an account and add some mail first!")}}

{{_("Manage your Accounts")}}

{%- else %} {%- if 'in:spam' in result.search_terms %}

{{_("No Spam Found, Hooray!")}}

{%- elif 'in:inbox' in result.search_terms %}

{{_("Inbox zero? Impressive!")}}

{%- else %}

{{_("Nothing Happened.")}}

{{_("It seems your Mailpile does not contain any messages for the search")}}:

"{% for term in result.search_terms %}{{term}}{% if not loop.last %} {% endif %}{% endfor %}"

{%- endif %}

{{_("Here are some other options for you")}}:

{{_("Browse for mailboxes")}}   {{_("Compose a message")}}

{{_("Search Tips & Tricks")}}

{% endif %}
{% endif %} {% else %}

{{_("Hrm, We Could Not Find Anything")}}

{% endif %} {% endblock %}