Link to pages-per-row

Closes #1
This commit is contained in:
Simon Willison 2017-10-24 07:10:58 -07:00
commit b46e370ee6
3 changed files with 32 additions and 6 deletions

View file

@ -17,10 +17,14 @@ td {
</style>
<table>
<tr>
{% if primary_keys and row_link %}<th scope="col">Link</th>{% endif %}
{% for column in columns %}<th scope="col">{{ column }}</th>{% endfor %}
</tr>
{% for row in rows %}
<tr>
{% if primary_keys and row_link %}
<td><a href="/{{ database }}-{{ database_hash }}/{{ table }}/{{ row_link(row) }}">{{ row_link(row) }}</a></td>
{% endif %}
{% for td in row %}
<td>{{ td }}</td>
{% endfor %}