summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorDaniel Kukula <daniel.kuku@gmail.com>2024-05-06 07:33:24 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-05-15 12:50:35 +0200
commitcc8b537e3446444cba4196b73bc49a7ef4a6def3 (patch)
tree7efd77bd05ab10ed3ba620400b1e5b2c981a98ad /searx/templates
parent645a840d8211a016d808cf7da1ab62ff12d1db56 (diff)
downloadsearxng-cc8b537e3446444cba4196b73bc49a7ef4a6def3.tar.gz
searxng-cc8b537e3446444cba4196b73bc49a7ef4a6def3.zip
[mod] package.html template: additional links (a python dict)
- Closes: https://github.com/searxng/searxng/issues/3456
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/simple/result_templates/packages.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/searx/templates/simple/result_templates/packages.html b/searx/templates/simple/result_templates/packages.html
index da7644a29..8608621ba 100644
--- a/searx/templates/simple/result_templates/packages.html
+++ b/searx/templates/simple/result_templates/packages.html
@@ -47,7 +47,7 @@
{%- endif -%}
</div>
{%- endif -%}
- {%- if result.homepage or result.source_code_url -%}
+ {%- if result.homepage or result.source_code_url or result.links -%}
<div class="result_project">{{- '' -}}
<span>{{ _('Project') }}</span>
<span>{{- '' -}}
@@ -58,6 +58,14 @@
{%- if result.source_code_url -%}
<a href="{{ result.source_code_url }}" target="_blank">{{ _('Source code') }}</a>
{%- endif -%}
+ {%- if result.links %}
+ {%- for name, link in result.links.items() -%}
+ {% if not loop.first or result.homepage or result.source_code_url %} | {% endif %}
+ <a href="{{ link }}" target="_blank">
+ {{- _(name) -}}
+ </a>
+ {%- endfor -%}
+ {%- endif -%}
</span>{{- '' -}}
</div>
{%- endif -%}