diff options
author | yvesf <yvesf-git@xapek.org> | 2010-11-20 01:58:53 +0100 |
---|---|---|
committer | yvesf <yvesf-git@xapek.org> | 2010-11-20 01:58:53 +0100 |
commit | 966a17b12c9deab35ef0a804d9fa1faea9c8042d (patch) | |
tree | 7ba80df4fcfaaabded6e82a48d139e48e4978952 /templates/search.html | |
parent | 0ae1e5e802871903d73d6542252aa0a8d08fba39 (diff) | |
download | booksearch-966a17b12c9deab35ef0a804d9fa1faea9c8042d.tar.gz booksearch-966a17b12c9deab35ef0a804d9fa1faea9c8042d.zip |
page based index; download page; download file
Diffstat (limited to 'templates/search.html')
-rw-r--r-- | templates/search.html | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/templates/search.html b/templates/search.html index e6bfe07..0c5f3d6 100644 --- a/templates/search.html +++ b/templates/search.html @@ -1,14 +1,33 @@ <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> {% if objects.__len__() == 0 %} No Matches {% else %} {% for obj in objects %} <hr /> - <h2> {{ obj['title'] }} </h2> + <h2> + {{ obj['title'] }} + <a href="{{ url_for("do_download_page", docnum=obj['docnum']) }}"> + This Page + </a> + - + <a href="{{ url_for("do_download_file", docnum=obj['docnum']) }}"> + File + </a> + </h2> <pre> {{ obj['path'] }} </pre> {% autoescape false %} <div>{{ obj['excerpt'] }}</div> |