{% spaceless %}
{% if cl.search_fields %}
    {# <form class="js-form" id="changelist-search" action="." method="get" style="display: inline; margin: 0; padding: 0; vertical-align: middle;"> #}
            {% if cl.is_popup %}
                <input type="hidden" id="id_pop" name="pop" value="" />
            {% endif %}
            <input type="text" size="32" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" />
            <a class="btn icn search def" href="">{% trans 'Search' %}</a>
            {% if show_result_count %}
                <span>{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %}
                (<a class="js-clear js-hashadr" href="?q={% if cl.is_popup %}&pop=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
            {% endif %}
            {% for pair in cl.params.items %}
                {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %}
            {% endfor %}
    {# </form> #}
    <script type="text/javascript">document.getElementById("searchbar").focus();</script>
{% endif %}
{% endspaceless %}
