mirror of https://github.com/searxng/searxng.git
add engine's name in infobox's header
This commit is contained in:
parent
574e99c4de
commit
c9c39b3e79
|
@ -60,6 +60,8 @@ def merge_two_infoboxes(infobox1, infobox2):
|
|||
if weight2 > weight1:
|
||||
infobox1['engine'] = infobox2['engine']
|
||||
|
||||
infobox1['engines'] |= infobox2['engines']
|
||||
|
||||
if 'urls' in infobox2:
|
||||
urls1 = infobox1.get('urls', None)
|
||||
if urls1 is None:
|
||||
|
@ -189,6 +191,7 @@ class ResultContainer(object):
|
|||
def _merge_infobox(self, infobox):
|
||||
add_infobox = True
|
||||
infobox_id = infobox.get('id', None)
|
||||
infobox['engines'] = set([infobox['engine']])
|
||||
if infobox_id is not None:
|
||||
parsed_url_infobox_id = urlparse(infobox_id)
|
||||
for existingIndex in self.infoboxes:
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
<div class="panel panel-default infobox">
|
||||
<div class="panel-heading">{{- "" -}}
|
||||
<div class="infobox_part">
|
||||
<div class="{% if not rtl %}pull-right{% endif %}">
|
||||
{% for engine in infobox.engines %}
|
||||
<span class="label label-default">{{ engine }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<h4 class="panel-title"><bdi>{{ infobox.infobox }}</bdi></h4>{{- "" -}}
|
||||
{% for u in infobox.urls %}{% if u.official %} <a href="{{ u.url }}">{{ u.domain }}</a>{% endif %}{% endfor %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue