diff options
author | Adam Tauber <asciimoo@gmail.com> | 2020-06-09 17:01:59 +0200 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2020-06-09 17:18:44 +0200 |
commit | 2c6531b2330a5c8ca986379dbad8812a6c6d3e49 (patch) | |
tree | 479755fab6b8eda840f55e9b0bb6aabc1256176d /searx/templates | |
parent | 785f0938fdc6c0b587d5f416f005ab5046260ba6 (diff) | |
download | searxng-2c6531b2330a5c8ca986379dbad8812a6c6d3e49.tar.gz searxng-2c6531b2330a5c8ca986379dbad8812a6c6d3e49.zip |
[enh] add routing directions to osm search - closes #254
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/legacy/results.html | 8 | ||||
-rw-r--r-- | searx/templates/oscar/results.html | 8 | ||||
-rw-r--r-- | searx/templates/simple/results.html | 10 |
3 files changed, 20 insertions, 6 deletions
diff --git a/searx/templates/legacy/results.html b/searx/templates/legacy/results.html index 2e28bc91f..fd95657a4 100644 --- a/searx/templates/legacy/results.html +++ b/searx/templates/legacy/results.html @@ -33,8 +33,12 @@ {% if answers %} <div id="answers"><span>{{ _('Answers') }}</span> - {% for answer in answers %} - <span>{{ answer }}</span> + {% for answer in answers.values() %} + {% if answer.url %} + <a href="{{ answer.url }}">{{ answer.answer }}</a> + {% else %} + <span>{{ answer.answer }}</span> + {% endif %} {% endfor %} </div> {% endif %} diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index fc4efadfa..7a444d19f 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -94,9 +94,13 @@ {%- endif %} {% if answers -%} - {%- for answer in answers %} + {%- for answer in answers.values() %} <div class="result well"> - <span>{{ answer }}</span> + {% if answer.url %} + <a href="{{ answer.url }}">{{ answer.answer }}</a> + {% else %} + <span>{{ answer.answer }}</span> + {% endif %} </div> {%- endfor %} {%- endif %} diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index 8885abc30..2e393193f 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -15,8 +15,14 @@ <div id="results" class="{{ only_template }}"> {% if answers -%} <div id="answers"><h4 class="title">{{ _('Answers') }} : </h4> - {%- for answer in answers -%} - <div class="answer">{{- answer -}}</div> + {%- for answer in answers.values() -%} + <div class="answer"> + {% if answer.url %} + <a href="{{ answer.url }}">{{ answer.answer }}</a> + {% else %} + <span>{{ answer.answer }}</span> + {% endif %} + </div> {%- endfor -%} </div> {%- endif %} |