diff options
author | yvesf <yvesf-git@xapek.org> | 2010-11-20 18:20:32 +0100 |
---|---|---|
committer | yvesf <yvesf-git@xapek.org> | 2010-11-20 18:20:32 +0100 |
commit | f78911646cf53e37c47921f9dcd9702d6e946f54 (patch) | |
tree | 013c97eeae02c9abfdfa205ff4e6258a120464a0 /templates | |
parent | d66c0d42b678408921f5c3cb43c18df5b1f87338 (diff) | |
download | booksearch-f78911646cf53e37c47921f9dcd9702d6e946f54.tar.gz booksearch-f78911646cf53e37c47921f9dcd9702d6e946f54.zip |
ergebnisliste unbefriedigend
Diffstat (limited to 'templates')
-rw-r--r-- | templates/search.html | 31 |
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 %} |