summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/search.html31
1 files changed, 16 insertions, 15 deletions
diff --git a/templates/search.html b/templates/search.html
index 5f68355..e2773ae 100644
--- a/templates/search.html
+++ b/templates/search.html
@@ -8,26 +8,27 @@
{% endblock %}
{% block searchValue %}{{ term }}{% endblock %}
{% block content %}
- {% if objects.__len__() == 0 %}
+ {% if match_groups.__len__() == 0 %}
No Matches
{% else %}
- {% for obj in objects %}
+ {{ resultlen }} Matches in {{ match_groups.__len__() }} files
+ {% for match_group in match_groups %}
<hr />
<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>
+ {{ match_group['title'] }} - {{ match_group['filename'] }}
+ (<a href="{{ url_for("do_download_file", docnum=match_group['first_docnum']) }}">
+ Download
+ </a>)
</h2>
- <pre> {{ obj['path'] }} </pre>
- {% autoescape false %}
- <div>{{ obj['excerpt'] }}</div>
- {% endautoescape %}
- <hr />
+ {% for match in match_group['matches'] %}
+ <h3>
+ Page {{ match['pagenumber'] }}
+ (<a href="{{ url_for("do_download_page", docnum=match_group['first_docnum'], page=match['pagenumber']) }}">Download</a>)
+ </h3>
+ {% autoescape false %}
+ <div>{{ match['excerpt'] }}</div>
+ {% endautoescape %}
+ {% endfor %}
{% endfor %}
{% endif %}