summaryrefslogtreecommitdiff
path: root/search/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne@peacefrogs.net>2019-07-17 10:42:26 +0200
committerÉtienne Loks <etienne@peacefrogs.net>2019-07-17 10:42:26 +0200
commit68093c0cfa09735f4c6a9b7de0346ac3282730ee (patch)
treeaf31ab0e4bd4c589e86ec866000c3bd18700630b /search/templates
downloadishtar-pergamon-68093c0cfa09735f4c6a9b7de0346ac3282730ee.tar.bz2
ishtar-pergamon-68093c0cfa09735f4c6a9b7de0346ac3282730ee.zip
Initial commit
Diffstat (limited to 'search/templates')
-rw-r--r--search/templates/search/search.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/search/templates/search/search.html b/search/templates/search/search.html
new file mode 100644
index 0000000..5f222e5
--- /dev/null
+++ b/search/templates/search/search.html
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+{% load static wagtailcore_tags %}
+
+{% block body_class %}template-searchresults{% endblock %}
+
+{% block title %}Search{% endblock %}
+
+{% block content %}
+ <h1>Search</h1>
+
+ <form action="{% url 'search' %}" method="get">
+ <input type="text" name="query"{% if search_query %} value="{{ search_query }}"{% endif %}>
+ <input type="submit" value="Search" class="button">
+ </form>
+
+ {% if search_results %}
+ <ul>
+ {% for result in search_results %}
+ <li>
+ <h4><a href="{% pageurl result %}">{{ result }}</a></h4>
+ {% if result.search_description %}
+ {{ result.search_description }}
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+
+ {% if search_results.has_previous %}
+ <a href="{% url 'search' %}?query={{ search_query|urlencode }}&amp;page={{ search_results.previous_page_number }}">Previous</a>
+ {% endif %}
+
+ {% if search_results.has_next %}
+ <a href="{% url 'search' %}?query={{ search_query|urlencode }}&amp;page={{ search_results.next_page_number }}">Next</a>
+ {% endif %}
+ {% elif search_query %}
+ No results found
+ {% endif %}
+{% endblock %}