Show linked foreign key in table cells

pull/168/head
Simon Willison 2017-11-22 20:43:27 -08:00
rodzic 72e328dccf
commit 38dc1ef73b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: FBB38AFE227189DB
2 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -626,7 +626,7 @@ class TableView(BaseView):
other_table, label = expanded[(column, value)]
display_value = jinja2.Markup(
# TODO: Escape id/label/etc so no XSS here
'<a href="/{database}-{database_hash}/{table}/{id}">{label}</a>'.format(
'<a href="/{database}-{database_hash}/{table}/{id}">{label}</a> <em>{id}</em>'.format(
database=database,
database_hash=database_hash,
table=escape_sqlite_table_name(other_table),

Wyświetl plik

@ -18,6 +18,11 @@ td {
padding: 4px;
vertical-align: top;
}
td em {
font-style: normal;
font-size: 0.8em;
color: #aaa;
}
th {
padding-right: 1em;
}