blob: 0e7aa7625b606bf9531d2b6aa9ee3502a3c7615c [file] [log] [blame]
{% extends "base.html" %}
{% block content %}
<h2>Query Analysis</h2>
<form id="form-inline" action="{{ url_for ('search') }}" method="GET">
<div class="form-group">
<input type="text" class="form-control" name="q" required=""
placeholder="Query ..."
value="{% if q %} {{ q }} {% endif %}">
</div>
<div class="form-group">
<select name="ql" id="queryLanguage" style="margin:auto 5pt;">
{% for key, value in lang.iteritems() %}
<option value="{{ key }}"
{% if ql== key %}selected="selected" {% endif %}>{{ value }}
</option>
{% endfor %}
</select>
</div>
<button type="submit" id="search" class="btn btn-primary">Search
</button>
</form>
{% include 'flash_messages.html' %}
{% if result %}
<p id="notification">
<a href="#" id="show" style="font-weight:bold;"
title="Display raw JSON">Found {{ result.totalResults | default("0") }} matches</a>
</p>
{% autoescape off %}
<pre id="message" class="i-layout" style="display:none;">
{{ result_string | safe }}
</pre>
{% for entry in result.matches %}
<div class="matches">
{{ entry.snippet }}
</div>
{% endfor %}
{% endautoescape %}
{% endif %}
{% endblock %}