From f3b565e17ecd4c875381a3a212d73fb065f9a89d Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 27 Sep 2014 12:33:22 +0200 Subject: oscar template: implement first version of results page * implement results page * improve search form template * implement all result_templates * fix youtube engine --- searx/templates/oscar/results.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 searx/templates/oscar/results.html (limited to 'searx/templates/oscar/results.html') diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html new file mode 100644 index 000000000..fde65c883 --- /dev/null +++ b/searx/templates/oscar/results.html @@ -0,0 +1,22 @@ +{% extends "oscar/base.html" %} +{% block title %}{{ q }} - {% endblock %} +{% block content %} +
+
+

{{ _('Search results') }}

+ {% include 'oscar/search.html' %} + + {% for result in results %} +
+ {% set index = loop.index %} + {% if result.template %}{% include 'oscar/result_templates/'+result['template'] %}{% else %}{% include 'oscar/result_templates/default.html' %}{% endif %} +
+ {% endfor %} + +
+ +
+ +
+{% endblock %} -- cgit v1.2.3 From b91b77e335c0b0f2dca2b261c64414c96fdb2412 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 27 Sep 2014 14:44:34 +0200 Subject: oscar template: improve result page * add paging support * add suggestion panel * add links panel --- searx/templates/oscar/results.html | 80 +++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 5 deletions(-) (limited to 'searx/templates/oscar/results.html') diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index fde65c883..f4364ed48 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -5,18 +5,88 @@

{{ _('Search results') }}

{% include 'oscar/search.html' %} - + {% for result in results %}
{% set index = loop.index %} {% if result.template %}{% include 'oscar/result_templates/'+result['template'] %}{% else %}{% include 'oscar/result_templates/default.html' %}{% endif %}
{% endfor %} - +
- -
+ + {% if paging %} + +
+ {% endif %} + + + + {% if suggestions %} +
+ +
+ {% for suggestion in suggestions %} + + {% endfor %} +
+
+ {% endif %} + +
+ +
+
+
+ + +
+
+ + +
+ {% for output_type in ('csv', 'json', 'rss') %} +
+ + + {% for category in selected_categories %}{% endfor %} + + +
+ {% endfor %} +
+
+
+ + {% endblock %} -- cgit v1.2.3 From dc2c1362205ea90dae75872b316dc1d693c9a750 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 27 Sep 2014 15:46:57 +0200 Subject: oscar template: little style improvements --- searx/templates/oscar/results.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/templates/oscar/results.html') diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index f4364ed48..91070777b 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -68,7 +68,7 @@
- +
-- cgit v1.2.3 From c25aab73b72087a9a56d86c155a166bfcf018822 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Wed, 1 Oct 2014 19:46:29 +0200 Subject: oscar template: add no result message --- searx/templates/oscar/results.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'searx/templates/oscar/results.html') diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 91070777b..6b02dc7bd 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -12,6 +12,10 @@ {% if result.template %}{% include 'oscar/result_templates/'+result['template'] %}{% else %}{% include 'oscar/result_templates/default.html' %}{% endif %} {% endfor %} + + {% if not results %} + {% include 'oscar/messages/no_results.html' %} + {% endif %}
-- cgit v1.2.3 From c36c935b03cc87ddfcac5ce3ded333be73387a7a Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sun, 5 Oct 2014 15:29:21 +0200 Subject: oscar template: add infobox --- searx/templates/oscar/results.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'searx/templates/oscar/results.html') 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 %}
-

- {{ _('Suggestions') }} -

+

{{ _('Suggestions') }}

{% for suggestion in suggestions %} @@ -64,9 +62,7 @@
-

- {{ _('Links') }} -

+

{{ _('Links') }}

@@ -91,6 +87,12 @@
+ {% if infoboxes %} + {% for infobox in infoboxes %} + {% include 'oscar/infobox.html' %} + {% endfor %} + {% endif %} +
{% endblock %} -- cgit v1.2.3 From a697a1eaa56d05e3b95240cc2f6bd8954b378812 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sun, 26 Oct 2014 19:20:20 +0100 Subject: oscar template: display answers --- searx/templates/oscar/results.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'searx/templates/oscar/results.html') diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 0bf4914b4..deda276fa 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -6,6 +6,14 @@

{{ _('Search results') }}

{% include 'oscar/search.html' %} + {% if answers %} + {% for answer in answers %} +
+ {{ answer }} +
+ {% endfor %} + {% endif %} + {% for result in results %}
{% set index = loop.index %} -- cgit v1.2.3