fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CSS for cite background
[wolnelektury.git]
/
wolnelektury
/
templates
/
newsearch
/
search.html
diff --git
a/wolnelektury/templates/newsearch/search.html
b/wolnelektury/templates/newsearch/search.html
index
e018b21
..
c494ca6
100644
(file)
--- a/
wolnelektury/templates/newsearch/search.html
+++ b/
wolnelektury/templates/newsearch/search.html
@@
-2,35
+2,50
@@
{% load i18n %}
{% load catalogue_tags %}
{% load i18n %}
{% load catalogue_tags %}
-{% block title %}
Leśmianator w WolneLektury.pl
{% endblock %}
+{% block title %}
Search
{% endblock %}
-{% block metadescription %}
Stwórz własny wierszmiks z utworów znajdujących się na Wolnych Lekturach.
{% endblock %}
+{% block metadescription %}{% endblock %}
-{% block bodyid %}
lesmianator
{% endblock %}
+{% block bodyid %}
newsearch
{% endblock %}
{% block body %}
<h1>Search</h1>
{% block body %}
<h1>Search</h1>
- <form action="{% url
new
search %}" method="get" accept-charset="utf-8" id="search-form-x">
+ <form action="{% url search %}" method="get" accept-charset="utf-8" id="search-form-x">
<p>
<p>
- <input type="text" name="q" style="width:250px; font-size: 1.2em;">
+ <input type="text" name="q"
value="{{request.GET.q}}"
style="width:250px; font-size: 1.2em;">
<input type="submit" value="{% trans "Search" %}" />
<input type="submit" value="{% trans "Search" %}" />
+ <br />
+ <input type="checkbox" value="true" name="fuzzy" {% if fuzzy %}checked{% endif %}/> fuzzy.
</p>
</form>
</p>
</form>
+ {% if did_you_mean %}
+ Czy miałeś na mysli <a href="?q={{did_you_mean|urlencode}}">{{did_you_mean}}</a>?
+ {% endif %}
+
<div id="results">
<ol>
<div id="results">
<ol>
- {% for
score,book,parts
in results %}
+ {% for
result
in results %}
<li>
<li>
- <p>
{{book.author}} - {{book.title}} (id: {{book.id}}, score: {{
score}})</p>
+ <p>
<a href="{{result.book.get_absolute_url}}">{{result.book.pretty_title}}</a> (id: {{result.book_id}}, score: {{result.
score}})</p>
<ul>
<ul>
- {% for score,part in parts %}
+ {% for hit in result.hits %}
+ <li>
+ {% for snip in hit.3.snippets %}
+ {{snip|safe}}<br/>
+ {% endfor %}
+ </li>
+ {% endfor %}
+
+ {% for part in result.parts %}
{% if part.header %}
<li>W {{part.header}} nr {{part.position}}</li>
{% else %}
{% if part.fragment %}
<li>
{% if part.header %}
<li>W {{part.header}} nr {{part.position}}</li>
{% else %}
{% if part.fragment %}
<li>
- <div style="font-weight: bold;">{% for tag in part.fragment.tags %}{{tag.name}} {% endfor %}</div>
- {{part.fragment.text|safe}} </li>
+ <div style="">Tagi/Motywy: {% for tag in part.fragment.tags %}{{tag.name}} {% endfor %}</div>
+ {{part.fragment.short_html|safe}}
+ </li>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}