Files
Fil-A-Management/templates/filament/shared_models.html
T

50 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}Modelldatenbank · Fil-A-Management{% endblock %}
{% block content %}
<div class="page-heading">
<div><h1>Modelldatenbank</h1></div>
<a class="button" href="{% url 'shared_model_upload' %}">+ Modell hochladen</a>
</div>
{% for username, entries in groups %}
<section class="panel">
<div class="panel-heading"><h2 id="models-person-{{ forloop.counter }}">Modelle von {{ username }}</h2></div>
<div class="table-wrap">
<table aria-labelledby="models-person-{{ forloop.counter }}">
<thead>
<tr><th>Modell</th><th>Beschreibung</th><th>Datei</th><th>Hochgeladen</th><th><span class="sr-only">Aktionen</span></th></tr>
</thead>
<tbody>
{% for entry in entries %}
<tr>
<td>
<div class="variant-preview">
<span class="variant-thumbnail model-thumbnail" aria-hidden="true">
<span class="variant-thumbnail-placeholder">◇</span>
<img src="{% url 'shared_model_preview' entry.pk %}" alt="" width="60" height="60" loading="lazy" decoding="async">
</span>
<strong>{{ entry.title }}</strong>
</div>
</td>
<td>{{ entry.description|default:"–"|linebreaksbr }}</td>
<td>{{ entry.original_filename }}</td>
<td>{{ entry.created_at|date:"d.m.Y" }}</td>
<td class="actions">
<a href="{% url 'shared_model_download' entry.pk %}" aria-label="{{ entry.title }} herunterladen">Download</a>
{% if entry.owner_id == user.pk %}
<a href="{% url 'shared_model_edit' entry.pk %}" aria-label="{{ entry.title }} bearbeiten">Bearbeiten</a>
{% endif %}
{% if entry.owner_id == user.pk or perms.filament.delete_sharedmodel %}
<a class="danger-link" href="{% url 'shared_model_delete' entry.pk %}" aria-label="{{ entry.title }} löschen">Löschen</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% empty %}
<section class="panel"><div class="empty"><h2>Es wurden noch keine Modelle hochgeladen.</h2></div></section>
{% endfor %}
{% endblock %}