Add model previews and shared slicer tips
This commit is contained in:
1 parent
619f9c200b
commit
b3b775b196
14 files changed
+736
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{% extends "admin/delete_confirmation.html" %}
|
||||
|
||||
{% block delete_confirm %}
|
||||
<p>Mit dem Konto werden auch dessen Filamentbestand, Bestellwünsche samt Bestellhistorie, Drucker, Freigaben, gesendetes Feedback und geteilte Modelle dauerhaft gelöscht.</p>
|
||||
<p>Mit dem Konto werden auch dessen Filamentbestand, Bestellwünsche samt Bestellhistorie, Drucker, Freigaben, gesendetes Feedback, geteilte Modelle und Slicer-Tipps dauerhaft gelöscht.</p>
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
@@ -33,6 +33,7 @@
|
||||
{% if '/bestellung/' in request.path and '/bestellung/historie/' not in request.path %}aria-current="page"{% endif %}><span class="nav-icon" aria-hidden="true">↗</span><span>Sammelbestellung</span></a>
|
||||
<a href="{% url 'order_history' %}"{% if '/bestellung/historie/' in request.path %} aria-current="page"{% endif %}><span class="nav-icon" aria-hidden="true">◫</span><span>Bestellhistorie</span></a>
|
||||
<a href="{% url 'shared_models' %}"{% if '/modelle/' in request.path %} aria-current="page"{% endif %}><span class="nav-icon" aria-hidden="true">◇</span><span>Modelldatenbank</span></a>
|
||||
<a href="{% url 'slicer_tips' %}"{% if '/slicer-tipps/' in request.path %} aria-current="page"{% endif %}><span class="nav-icon" aria-hidden="true">≡</span><span>Slicer-Tipps</span></a>
|
||||
<a href="{% url 'feedback' %}"{% if request.resolver_match.url_name == 'feedback' %} aria-current="page"{% endif %}><span class="nav-icon" aria-hidden="true">✉</span><span>Feedback</span></a>
|
||||
{% if user.is_superuser %}<a href="/admin/"><span class="nav-icon" aria-hidden="true">⚙</span><span>Administration</span></a>{% endif %}
|
||||
</nav>
|
||||
|
||||
@@ -16,7 +16,15 @@
|
||||
<tbody>
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td><strong>{{ entry.title }}</strong></td>
|
||||
<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>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Slicer-Tipps · Fil-A-Management{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-heading">
|
||||
<h1>Slicer-Tipps</h1>
|
||||
<a class="button" href="{% url 'slicer_tip_add' %}">+ Tipp hinzufügen</a>
|
||||
</div>
|
||||
{% for tip in tips %}
|
||||
<article class="panel slicer-tip">
|
||||
<div class="panel-heading">
|
||||
<div>
|
||||
<h2>{{ tip.title }}</h2>
|
||||
<small class="muted">{{ tip.author.username }} · <time datetime="{{ tip.created_at|date:'c' }}">{{ tip.created_at|date:"d.m.Y" }}</time></small>
|
||||
</div>
|
||||
{% if tip.author_id == user.pk or perms.filament.delete_slicertip %}
|
||||
<div class="actions">
|
||||
{% if tip.author_id == user.pk %}
|
||||
<a href="{% url 'slicer_tip_edit' tip.pk %}" aria-label="{{ tip.title }} bearbeiten">Bearbeiten</a>
|
||||
{% endif %}
|
||||
<a class="danger-link" href="{% url 'slicer_tip_delete' tip.pk %}" aria-label="{{ tip.title }} löschen">Löschen</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<p>{{ tip.text|linebreaksbr }}</p>
|
||||
</article>
|
||||
{% empty %}
|
||||
<section class="panel">
|
||||
<div class="empty"><h2>Es wurden noch keine Slicer-Tipps geteilt.</h2></div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user