Implemented ?_search=XXX + UI if a FTS table is detected

Closes #131
This commit is contained in:
Simon Willison 2017-11-19 08:59:26 -08:00
commit eed6a0fe36
No known key found for this signature in database
GPG key ID: FBB38AFE227189DB
5 changed files with 75 additions and 5 deletions

View file

@ -21,6 +21,12 @@
<h2>{{ "{:,}".format(table_rows) }} total row{% if table_rows == 1 %}{% else %}s{% endif %} in this table</h2>
{% endif %}
{% if supports_search %}
<form action="/{{ database }}-{{ database_hash }}/{{ table|quote_plus }}" method="get">
<p><input type="search" name="_search" value="{{ search }}"> <input type="submit" value="Search"></p>
</form>
{% endif %}
{% if query.params %}
<pre>{{ query.sql }}</pre>
<pre>params = {{ query.params|tojson(4) }}</pre>