summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-01 19:46:29 +0200
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-05 14:40:47 +0200
commitc25aab73b72087a9a56d86c155a166bfcf018822 (patch)
tree1502eb3bf2380fd25a7c8e1685e9415dfba8b378 /searx/templates
parent451586f09f819c5a099eac7389522acd8a554466 (diff)
oscar template: add no result message
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/oscar/messages/no_results.html9
-rw-r--r--searx/templates/oscar/results.html4
2 files changed, 13 insertions, 0 deletions
diff --git a/searx/templates/oscar/messages/no_results.html b/searx/templates/oscar/messages/no_results.html
new file mode 100644
index 000000000..ac3705eb8
--- /dev/null
+++ b/searx/templates/oscar/messages/no_results.html
@@ -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>
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index 91070777b..6b02dc7bd 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -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>