MarseyWorld/files/templates/marseys.html

46 lines
1.5 KiB
HTML

{% extends "default.html" %}
{% block pagetitle %}Marseys{% endblock %}
{% block pagetype %}marseys{% endblock %}
{% block content %}
<div class="overflow-x-auto mt-3"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th onclick="sort_table(0)">#</th>
<th onclick="sort_table(1)">Name</th>
<th>Marsey</th>
<th onclick="sort_table(3)">Usage</th>
{% if FEATURES['ASSET_SUBMISSIONS'] %}
<th onclick="sort_table(4)">Author</th>
{% endif %}
<th onclick="sort_table(5)">Added on</th>
{% if FEATURES['ASSET_SUBMISSIONS'] %}
<th>Original File</th>
{% endif %}
</tr>
</thead>
<tbody id="marseys-table">
{% for marsey in marseys %}
<tr>
<td>{{loop.index}}</td>
<td data-sort-key="{{marsey.name}}">{{marsey.name}}</td>
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":#{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp"></td>
<td>{{marsey.count}}</td>
{% if FEATURES['ASSET_SUBMISSIONS'] %}
{% set user = marsey.user %}
<td data-sort-key="{{user.username.lower() if user else ''}}">{% include "user_in_table.html" %}</td>
{% endif %}
<td data-sort-key="{{marsey.created_utc or 0}}" {% if marsey.created_utc != None %}data-time="{{marsey.created_utc}}"{% endif %}></td>
{% if FEATURES['ASSET_SUBMISSIONS'] %}
<td>
{% if marsey.og %}
<a href="/asset_submissions/marseys/original/{{marsey.og}}">{{marsey.og}}</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<script defer src="{{'js/sort_table.js' | asset}}"></script>
{% endblock %}