[enh] show spelling corrections

This commit is contained in:
David A Roberts 2017-01-14 18:40:37 +10:00
parent d6cbc6b78b
commit 1d30141c20
5 changed files with 23 additions and 0 deletions

View file

@ -16,6 +16,18 @@
<h1 class="sr-only">{{ _('Search results') }}</h1>
{% include 'oscar/search.html' %}
{% if corrections %}
<div class="result">
<span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span>
{% for correction in corrections %}
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-left suggestion_item">
<input type="hidden" name="q" value="{{ correction }}">
<button type="submit" class="btn btn-default btn-xs">{{ correction }}</button>
</form>
{% endfor %}
</div>
{% endif %}
{% if answers %}
{% for answer in answers %}
<div class="result well">