Child: [462c18] (diff)

Download this file

search.html    30 lines (27 with data), 1.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% extends 'jinja_master/master.html' %}
{% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Search{% endblock %}
{% block header %}Search {{c.app.config.options.mount_point}}: {{q}}{% endblock %}
{% block content %}
<form method="GET" action=".">
<input type="text" name="q" value="{{q}}" class="defaultText" title="Search App"/><br/>
<input type="submit" value="Search App"/>
<input type="submit" name="project" value="Search Entire Project"/><br/>
Search history? <input type="checkbox" name="history"{% if history %} checked="checked"{% endif %}/><br/>
</form>
{% if q %}
{% if count == 0 %}
<p>No results.</p>
{% elif count==1 %}
<p>{{count}} result.</p>
{% elif count > 1 %}
<p>{{count}} results.</p>
{% endif %}
{% endif %}
{% for doc in results %}
<div>
<a href="{{doc['url_s']}}">{{doc.title_s}}</a><br/>
{% if doc.get('snippet') %}<p>{{doc.snippet}}</p>{% endif %}
<hr/>
</div>
{% endfor %}
{% endblock %}