summaryrefslogtreecommitdiff
path: root/templates/search.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/search.html')
-rw-r--r--templates/search.html44
1 files changed, 20 insertions, 24 deletions
diff --git a/templates/search.html b/templates/search.html
index 0c5f3d6..5f68355 100644
--- a/templates/search.html
+++ b/templates/search.html
@@ -1,18 +1,13 @@
-<html>
- <head>
- <title>{{ objects.__len__() + skip}} matches</title>
-<script>
-function start() {
-var inputField = document.getElementById("search");
-window.location = "/search/" + inputField.value;
-}
-</script>
- </head>
- <body>
-<div>
-<input id="search" type="text"/>
-<button onclick="start()">Go</button>
-</div>
+{% extends "_base.html" %}
+{% block title %}
+ {% if term != "" %}
+ {{ term }}
+ {% else %}
+ Start a new Search
+ {% endif %}
+{% endblock %}
+{% block searchValue %}{{ term }}{% endblock %}
+{% block content %}
{% if objects.__len__() == 0 %}
No Matches
{% else %}
@@ -36,14 +31,15 @@ window.location = "/search/" + inputField.value;
{% endfor %}
{% endif %}
- <div>
- {% if skip > 0 %}
- <a href="{{ url_for("do_search", term=term, skip=skip-5) }}">Previous 5</a>
- {% else %}
- Previous 5
+ <div id="navigation">
+ {% if term != "" %}
+ {% if skip > 0 %}
+ <a href="{{ url_for("do_search", term=term, skip=skip-5) }}">Previous 5</a>
+ {% else %}
+ Previous 5
+ {% endif %}
+ -
+ <a href="{{ url_for("do_search", term=term, skip=skip+5) }}">Next 5</a>
{% endif %}
- -
- <a href="{{ url_for("do_search", term=term, skip=skip+5) }}">Next 5</a>
</div>
- </body>
-</html>
+{% endblock %}