oscar template: add no result message

This commit is contained in:
Thomas Pointhuber 2014-10-01 19:46:29 +02:00
parent 451586f09f
commit c25aab73b7
9 changed files with 139 additions and 49 deletions

View file

@ -0,0 +1,9 @@
{% from 'oscar/macros.html' import icon %}
<div class="alert alert-info fade in" role="alert">
<button class="close" data-dismiss="alert" type="button">
<span aria-hidden="true">×</span>
<span class="sr-only">{{ _('Close') }}</span>
</button>
<strong class="lead">{{ icon('info-sign') }} {{ _('Sorry!') }}</strong>
{{ _('we didn\'t find any results. Please use another query or search in more categories.') }}
</div>

View file

@ -12,6 +12,10 @@
{% if result.template %}{% include 'oscar/result_templates/'+result['template'] %}{% else %}{% include 'oscar/result_templates/default.html' %}{% endif %}
</div>
{% endfor %}
{% if not results %}
{% include 'oscar/messages/no_results.html' %}
{% endif %}
<div class="clearfix"></div>