?_where= parameter on table views, closes #429

From pull request #430
This commit is contained in:
Simon Willison 2019-04-12 18:37:22 -07:00 committed by GitHub
commit bc6a9b4564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 92 additions and 2 deletions

View file

@ -91,6 +91,17 @@
</div>
</form>
{% if extra_wheres_for_ui %}
<div class="extra-wheres">
<h3>{{ extra_wheres_for_ui|length }} extra where clause{% if extra_wheres_for_ui|length != 1 %}s{% endif %}</h3>
<ul>
{% for extra_where in extra_wheres_for_ui %}
<li><code>{{ extra_where.text }}</code> [<a href="{{ extra_where.remove_url }}">remove</a>]</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if query.sql and config.allow_sql %}
<p><a class="not-underlined" title="{{ query.sql }}" href="{{ database_url(database) }}?{{ {'sql': query.sql}|urlencode|safe }}{% if query.params %}&amp;{{ query.params|urlencode|safe }}{% endif %}">&#x270e; <span class="underlined">View and edit SQL</span></a></p>
{% endif %}