Use data-sort to sort colums with complex data
This commit is contained in:
parent
75f730ae7f
commit
5dfa1d5fba
@ -7,7 +7,7 @@
|
|||||||
{% for item in table_collection %}
|
{% for item in table_collection %}
|
||||||
<tr>
|
<tr>
|
||||||
{{ table.image(item.url_for_image(), caption=item.fields.name, alt=item.fields.part, accordion=solo) }}
|
{{ 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>
|
<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 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 %}
|
{% if all %}
|
||||||
@ -15,7 +15,7 @@
|
|||||||
{{ table.bricklink(item) }}
|
{{ table.bricklink(item) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</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 %}
|
{% 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>
|
<span class="align-middle">{{ item.fields.color_name }}</span>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user