mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Blank foreign key labels now show as hyphens, closes #1086
This commit is contained in:
parent
13d1228d80
commit
2a981e2ac1
6 changed files with 73 additions and 37 deletions
|
|
@ -156,9 +156,9 @@
|
|||
<ul class="tight-bullets">
|
||||
{% for facet_value in facet_info.results %}
|
||||
{% if not facet_value.selected %}
|
||||
<li><a href="{{ facet_value.toggle_url }}">{{ (facet_value.label if facet_value.label is not none else "_") }}</a> {{ "{:,}".format(facet_value.count) }}</li>
|
||||
<li><a href="{{ facet_value.toggle_url }}">{{ (facet_value.label | string()) or "-" }}</a> {{ "{:,}".format(facet_value.count) }}</li>
|
||||
{% else %}
|
||||
<li>{{ facet_value.label }} · {{ "{:,}".format(facet_value.count) }} <a href="{{ facet_value.toggle_url }}" class="cross">✖</a></li>
|
||||
<li>{{ facet_value.label or "-" }} · {{ "{:,}".format(facet_value.count) }} <a href="{{ facet_value.toggle_url }}" class="cross">✖</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if facet_info.truncated %}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ class RowTableShared(DataView):
|
|||
table=urllib.parse.quote_plus(other_table),
|
||||
link_id=urllib.parse.quote_plus(str(value)),
|
||||
id=str(jinja2.escape(value)),
|
||||
label=str(jinja2.escape(label)),
|
||||
label=str(jinja2.escape(label)) or "-",
|
||||
)
|
||||
)
|
||||
elif value in ("", None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue