Highlight current page in custom tables

This commit is contained in:
Elijah 2024-02-22 19:20:16 +01:00
parent b9da23b3d5
commit 53f7c97942
2 changed files with 9 additions and 3 deletions

View file

@ -159,6 +159,10 @@ h3 {
background-color: #f3f3f3;
}
.btn-grey-selected {
background-color: #b0b0b0;
}
.btn-green-user {
background-color: #c7e3a3;
}

View file

@ -71,13 +71,15 @@
{% block pagination.range %}
{% for p in table.page|table_page_range:table.paginator %}
<li {% if p == table.page.number %}class="active"{% endif %}>
<a type="button" class="btn btn-grey{% if p == table.page.number %}-selected{% endif %}
border border-dark"
{% if p == '...' %}
<a type="button" class="btn btn-grey border border-dark" href="#">{{ p }}</a>
href="#">
{% else %}
<a type="button" class="btn btn-grey border border-dark" href="{% querystring table.prefixed_page_field=p %}">
href="{% querystring table.prefixed_page_field=p %}">
{% endif %}
{{ p }}
</a>
{% endif %}
</li>
{% endfor %}
{% endblock pagination.range %}