diff options
author | Markus Heiser <markus@darmarit.de> | 2021-04-04 13:36:33 +0200 |
---|---|---|
committer | Markus Heiser <markus@darmarit.de> | 2021-04-04 13:36:33 +0200 |
commit | ebfd0eb2b79f73eef108ac1ad89c07174ad6441c (patch) | |
tree | 44ba843797cc6daa0066c6adc9687f8d565e9e82 /searx/templates | |
parent | 76a5305ee2b64053d2cc419a312933972795e77d (diff) | |
download | searxng-ebfd0eb2b79f73eef108ac1ad89c07174ad6441c.tar.gz searxng-ebfd0eb2b79f73eef108ac1ad89c07174ad6441c.zip |
[fix] default_doi_resolver in preferences
Instead of a hard-coded `oadoi.org` default, use the default value from
`settings.yml`.
Fix an issue in the themes: The replacement 'current_doi_resolver' contains the
doi_resolver_url, not the name of the DOI resolver. Compare return value of::
searx.plugins.oa_doi_rewrite.get_doi_resolver(...)
Fix a typo in `get_doi_resolver(..)`: suggested by @kvch:
*L32 should set doi_resolver not doi_resolvers*
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/oscar/preferences.html | 2 | ||||
-rw-r--r-- | searx/templates/simple/preferences.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 6d593840a..3f9192e22 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -165,7 +165,7 @@ {{ preferences_item_header(info, label, rtl, 'doi_resolver') }} <select class="form-control {{ custom_select_class(rtl) }}" name="doi_resolver" id="doi_resolver"> {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %} - <option value="{{ doi_resolver_name }}" {% if doi_resolver_name == current_doi_resolver %}selected="selected"{% endif %}> + <option value="{{ doi_resolver_name }}" {% if doi_resolver_url == current_doi_resolver %}selected="selected"{% endif %}> {{ doi_resolver_name }} - {{ doi_resolver_url }} </option> {% endfor %} diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index 2d2529417..504610c6d 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -96,7 +96,7 @@ <p class="value"> <select id='doi_resolver' name='doi_resolver'> {%- for doi_resolver_name,doi_resolver_url in doi_resolvers.items() -%} - <option value="{{ doi_resolver_name }}" {% if doi_resolver_name == current_doi_resolver %}selected="selected"{% endif %}> + <option value="{{ doi_resolver_name }}" {% if doi_resolver_url == current_doi_resolver %}selected="selected"{% endif %}> {{- doi_resolver_name }} - {{ doi_resolver_url -}} </option> {%- endfor -%} |