summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-05 15:29:21 +0200
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-05 15:46:43 +0200
commitc36c935b03cc87ddfcac5ce3ded333be73387a7a (patch)
tree5c850f1f4520e5c0082cbdf8c63be48705aab645 /searx/templates
parent517e57b996aaeceda08afd0e80bfd30ad6192971 (diff)
oscar template: add infobox
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/oscar/infobox.html28
-rw-r--r--searx/templates/oscar/results.html14
2 files changed, 36 insertions, 6 deletions
diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html
new file mode 100644
index 000000000..541da8ba7
--- /dev/null
+++ b/searx/templates/oscar/infobox.html
@@ -0,0 +1,28 @@
+<div class="panel panel-default infobox">
+ <div class="panel-heading">
+ <h4 class="panel-title">{{ infobox.infobox }}</h4>
+ </div>
+ <div class="panel-body">
+ {% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ infobox.img_src }}" />{% endif %}
+ {% if infobox.content %}<p class="infobox_part">{{ infobox.content }}</p>{% endif %}
+
+ {% if infobox.attributes %}
+ <table class="table table-striped infobox_part">
+ {% for attribute in infobox.attributes %}
+ <tr>
+ <td>{{ attribute.label }}</td>
+ <td>{{ attribute.value }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+ {% endif %}
+
+ {% if infobox.urls %}
+ <div class="infobox_part">
+ {% for url in infobox.urls %}
+ <p class="btn btn-default btn-xs"><a href="{{ url.url }}">{{ url.title }}</a></p>
+ {% endfor %}
+ </div>
+ {% endif %}
+ </div>
+</div>
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index 6b02dc7bd..0bf4914b4 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -47,9 +47,7 @@
{% if suggestions %}
<div class="panel panel-default">
<div class="panel-heading">
- <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#suggestions">{{ _('Suggestions') }}</a>
- </h4>
+ <h4 class="panel-title">{{ _('Suggestions') }}</h4>
</div>
<div class="panel-body">
{% for suggestion in suggestions %}
@@ -64,9 +62,7 @@
<div class="panel panel-default">
<div class="panel-heading">
- <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#links">{{ _('Links') }}</a>
- </h4>
+ <h4 class="panel-title">{{ _('Links') }}</h4>
</div>
<div class="panel-body">
<form role="form">
@@ -91,6 +87,12 @@
</div>
</div>
+ {% if infoboxes %}
+ {% for infobox in infoboxes %}
+ {% include 'oscar/infobox.html' %}
+ {% endfor %}
+ {% endif %}
+
</div><!-- /#sidebar_results -->
</div>
{% endblock %}