Ticket #14735: search_results_plural.diff

File search_results_plural.diff, 1.2 KB (added by Claude Paroz, 13 years ago)

Add variable in singular form also

  • django/contrib/admin/templates/admin/search_form.html

    diff --git a/django/contrib/admin/templates/admin/search_form.html b/django/contrib/admin/templates/admin/search_form.html
    index 4133cb8..3e14a11 100644
    a b  
    77<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" />
    88<input type="submit" value="{% trans 'Search' %}" />
    99{% if show_result_count %}
    10     <span class="small quiet">{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}pop=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
     10    <span class="small quiet">{% blocktrans count cl.result_count as counter %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}pop=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
    1111{% endif %}
    1212{% for pair in cl.params.items %}
    1313    {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %}
Back to Top