{% extends 'base.html' %} {%- import 'template_settings.html' as template_settings with context -%} {% block extra_js %} {{ entry_template_header_includes|safe }} {% endblock %} {% block footer_js %} {# TODO: conditionally display with some developer setting #} {# include 'developer_test_palette.html' #} {% endblock %} {% block search_li %} {% endblock %} {% block search_li_form %} {% endblock %} {% block extra_nav %} {# Dictionaries #} {% include 'mobile_nav_dictionary_list.html' %} {% endblock %} {% block bodyclass %}main_search{% endblock %} {%- set keyboard = false %} {% if current_variant_options %} {% set keyboard = current_variant_options.onscreen_keyboard %} {% endif -%} {% block content %}
{% if grouped_nav %} {% set nav_width = "span3" %} {% set dict_width = "span9" %} {% else %} {% set nav_width = "span4" %} {% set dict_width = "span8" %} {% endif %}

{% if current_variant_options %} {{ _from|iso_to_i18n }} ({{ gettext(current_variant_options.description) }}) → {{ _to|iso_to_i18n }} {% else %} {{ _from|iso_to_i18n }} → {{ _to|iso_to_i18n }} {% endif %} {% if display_swap %} ({% trans %}Swap{% endtrans %}) {% endif %}

{# figure out if there's a variant, and if the reverse has variants, because if mobile, we want to force mobile variant in swap #}
{{ index_search_form|safe }}
{# TODO: template here? #} {% if analyses and not template_settings.hide_possible_form_text %}

{{ user_input }}{% trans user_input=user_input %} is a possible form of ... {% endtrans %}

{% endif %}
{# TODO: deep link needs to go to specific lexeme when it comes from the front page #} {% if successful_entry_exists %}

{{user_input}}

{% for tpl in entry_templates %} {{ tpl|safe }} {% endfor %} {% if leftover_analyses_template %}
{% if entry_templates|length == 0 %}

{% trans input=user_input %}Word {{ input }} not found.{% endtrans %}

{% else %}   {% endif %}

{% trans user_input=user_input %}Other analyses for {{ user_input }} without a translation.{% endtrans %}

{{- leftover_analyses_template|safe -}}
{% endif %}
{% else %} {% if not show_info %}
{% if entry_templates|length == 0 %}

{% trans input=user_input %}Word {{ input }} not found.{% endtrans %}

{% else %}   {% endif %}
{% if analyses %} {{- leftover_analyses_template|safe -}} {% endif %}
{#

{% trans input=user_input %}Word {{ input }} not found.{% endtrans %}

#} {% endif %} {% endif %} {% if show_info %} {{ search_info_template|safe }} {% endif %}
{%- if analyses %}
{% if not template_settings.hide_possible_form_text %}

{{ user_input }}{% trans user_input=user_input %} is a possible form of ... {% endtrans %}

{% endif %} {{ all_analysis_template|safe }}
{%- endif -%}
{% endblock %}