mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 10:32:21 +02:00
[mod] drop usage of the searx.brand namespace (templates & /config)
In the templates and the /config (JSON) the usage of the 'brand.*' name space is replaced by 'searx.get_setting' function. - new_issue_url --> get_setting('brand.new_issue_url') - brand.GIT_URL --> get_setting('brand.git_url') - brand.PUBLIC_INSTANCES --> get_setting('brand.public_instances') - brand.DOCS_URL --> get_setting('brand.docs_url') - brand.ISSUE_URL --> get_setting('brand.issue_url') - brand.CONTACT_URL --> get_setting('general.contact_url', '') The macro 'new_issue' from searx/templates/*/messages/no_results.html is now imported with context:: {% from '__common__/new_issue.html' import new_issue with context %} To get *public instances URL* from context's 'get_setting()' function:: get_setting('brand.public_instances','') Macro's prototype does no longer need the 'new_issue_url' argument and has been changed to:: macro new_issue(engine_name, engine_reliability) Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
c9220de690
commit
3f638ed196
9 changed files with 32 additions and 32 deletions
|
@ -51,10 +51,10 @@
|
|||
<footer>
|
||||
<p>
|
||||
{{ _('Powered by') }} <a href="{{ url_for('about') }}">searxng</a> - {{ searx_version }} — {{ _('a privacy-respecting, hackable metasearch engine') }}<br/>
|
||||
<a href="{{ brand.GIT_URL }}">{{ _('Source code') }}</a> |
|
||||
<a href="{{ brand.ISSUE_URL }}">{{ _('Issue tracker') }}</a> |
|
||||
<a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a>{% if brand.CONTACT_URL %} |
|
||||
<a href="{{ brand.CONTACT_URL }}">{{ _('Contact instance maintainer') }}</a>{% endif %}
|
||||
<a href="{{ get_setting('brand.git_url') }}">{{ _('Source code') }}</a> |
|
||||
<a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a> |
|
||||
<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>{% if get_setting('general.contact_url') %} |
|
||||
<a href="{{ get_setting('general.contact_url') }}">{{ _('Contact instance maintainer') }}</a>{% endif %}
|
||||
</p>
|
||||
</footer>
|
||||
<!--[if gte IE 9]>-->
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</p>
|
||||
{%- endfor %}
|
||||
|
||||
<p><small>{{ _('Please, try again later or find another searx instance.') }} (<a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a>) </small></p>
|
||||
<p><small>{{ _('Please, try again later or find another searx instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>) </small></p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="dialog-error" role="alert">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% from 'simple/macros.html' import icon %}
|
||||
{% from '__common__/new_issue.html' import new_issue %}
|
||||
{% from '__common__/new_issue.html' import new_issue with context %}
|
||||
|
||||
{% extends "simple/base.html" %}
|
||||
|
||||
|
@ -147,7 +147,7 @@
|
|||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{{ new_issue(brand.NEW_ISSUE_URL, selected_engine_name, engine_reliabilities[selected_engine_name]) }}
|
||||
{{ new_issue(selected_engine_name, engine_reliabilities[selected_engine_name]) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue