mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
51d7881140
commit
7e983fede6
5 changed files with 86 additions and 13 deletions
|
|
@ -105,7 +105,9 @@ class Facet:
|
|||
facet_size = self.ds.setting("default_facet_size")
|
||||
max_returned_rows = self.ds.setting("max_returned_rows")
|
||||
custom_facet_size = self.request.args.get("_facet_size")
|
||||
if custom_facet_size and custom_facet_size.isdigit():
|
||||
if custom_facet_size == "max":
|
||||
facet_size = max_returned_rows
|
||||
elif custom_facet_size and custom_facet_size.isdigit():
|
||||
facet_size = int(custom_facet_size)
|
||||
return min(facet_size, max_returned_rows)
|
||||
|
||||
|
|
|
|||
|
|
@ -645,13 +645,20 @@ form button[type=button] {
|
|||
.facet-info a.cross:active {
|
||||
text-decoration: none;
|
||||
}
|
||||
ul li.facet-truncated {
|
||||
list-style-type: none;
|
||||
position: relative;
|
||||
top: -0.35em;
|
||||
text-indent: 0.85em;
|
||||
}
|
||||
|
||||
.advanced-export {
|
||||
margin-top: 1em;
|
||||
padding: 0.01em 2em 0.01em 1em;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
box-shadow: 1px 2px 8px 2px rgba(0,0,0,0.08);
|
||||
background-color: white;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.download-sqlite em {
|
||||
|
|
|
|||
|
|
@ -162,7 +162,9 @@
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if facet_info.truncated %}
|
||||
<li>...</li>
|
||||
<li class="facet-truncated">{% if request.args._facet_size != "max" -%}
|
||||
<a href="{{ path_with_replaced_args(request, {"_facet_size": "max"}) }}">…</a>{% else -%}…{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue