Use data-sort to sort colums with complex data
This commit is contained in:
parent
d08b7bb063
commit
e033dec988
@ -7,7 +7,7 @@
|
||||
{% for item in table_collection %}
|
||||
<tr>
|
||||
{{ table.image(item.url_for_image(), caption=item.fields.name, alt=item.fields.part, accordion=solo) }}
|
||||
<td>
|
||||
<td data-sort="{{ item.fields.name }}">
|
||||
<a class="text-reset" href="{{ item.url() }}">{{ item.fields.name }}</a>
|
||||
{% if item.fields.spare %}<span class="badge rounded-pill text-bg-warning fw-normal"><i class="ri-loop-left-line"></i> Spare</span>{% endif %}
|
||||
{% if all %}
|
||||
@ -15,7 +15,7 @@
|
||||
{{ table.bricklink(item) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<td data-sort="{{ item.fields.color_name }}">
|
||||
{% if item.fields.color_rgb %}<span class="color-rgb align-middle border border-black" style="background-color: #{{ item.fields.color_rgb }};"></span>{% endif %}
|
||||
<span class="align-middle">{{ item.fields.color_name }}</span>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user