diff options
author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-03 18:46:58 +0100 |
---|---|---|
committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-03 18:46:58 +0100 |
commit | c38917bb2a472429f78cd00fffb5e7057ceecc02 (patch) | |
tree | 6457f3ed76087f7f36ee719f75d77d8a725bf2f9 /searx/templates | |
parent | 2e7723a6c1ce51c6b3830470164ac818126760ae (diff) | |
download | searxng-c38917bb2a472429f78cd00fffb5e7057ceecc02.tar.gz searxng-c38917bb2a472429f78cd00fffb5e7057ceecc02.zip |
[enh] template_oscar: show addressdata if possible
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/oscar/result_templates/map.html | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/searx/templates/oscar/result_templates/map.html b/searx/templates/oscar/result_templates/map.html index 45aa76356..2c1e549e3 100644 --- a/searx/templates/oscar/result_templates/map.html +++ b/searx/templates/oscar/result_templates/map.html @@ -7,7 +7,29 @@ {% if (result.latitude and result.longitude) or result.boundingbox %}
<small> • <a class="text-info btn-collapse collapsed searx_init_map cursor-pointer" data-toggle="collapse" data-target="#result-map-{{ index }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %} data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}">{{ icon('globe') }} {{ _('show map') }}</a></small>
{% endif %}
-
+
+{% if result.address %}
+<p class="result-content result-adress" itemscope itemtype="http://schema.org/PostalAddress">
+ {% if result.address.name %}
+ <strong itemprop="name">{{ result.address.name }}</strong><br/>
+ {% endif %}
+ {% if result.address.road %}
+ <span itemprop="streetAddress">
+ {% if result.address.house_number %}{{ result.address.house_number }}, {% endif %}
+ {{ result.address.road }}
+ </span><br/>
+ {% endif %}
+ {% if result.address.locality %}
+ <span itemprop="addressLocality">{{ result.address.locality }}</span>,
+ {% if result.address.postcode %} <span itemprop="postalCode">{{ result.address.postcode }}</span>{% endif %}
+ <br/>
+ {% endif %}
+ {% if result.address.country %}
+ <span itemprop="addressCountry">{{ result.address.country }}</span>
+ {% endif %}
+</p><div class="clearfix"></div>
+{% endif %}
+
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
{% if (result.latitude and result.longitude) or result.boundingbox %}
|