{% load crispy_forms_tags %} {% load meta_attr %} {% comment %} The model_name variable was added to adjust the displayed filter name for the actstream Follow model. It would be nicer to instead add a proxy model for the actstream Follow model on which we set the verbose name accordingly. Trying this out, however, we could not get the permission checks to work for the proxy model. It might be worth debugging why the permissions for the proxy model were not set correctly and to get rid of this work-around eventually. {% endcomment %}

{% if filters_applied %}  Remove Filters {% endif %}

{% crispy filter.form %}

{% if total_count == 0 %} No {% if not model_name %}{{ filter.Meta.model|meta_attr:'verbose_name_plural' }}{% else %} {{ model_name }}s {% endif %} found. {% elif filters_applied %} Filters included {{ num_results }} of {{ total_count }} total {% if not model_name %}{{ filter.Meta.model|meta_attr:'verbose_name_plural' }}{% else %} {{ model_name }}s {% endif %} {% else %} {% if total_count == 1 %} {{ total_count }} {% if not model_name %}{{ filter.Meta.model|meta_attr:'verbose_name' }}{% else %} {{ model_name }} {% endif %} found {% else %} {{ total_count }} {% if not model_name %}{{ filter.Meta.model|meta_attr:'verbose_name_plural' }}{% else %} {{ model_name }}s {% endif %} found {% endif %} {% endif %}