kopia lustrzana https://github.com/simonw/datasette
Show linked foreign key in table cells
rodzic
72e328dccf
commit
38dc1ef73b
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue