33 lines
1.4 KiB
HTML
33 lines
1.4 KiB
HTML
{% 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>
|
|
{% include "filament/list_search.html" with search_url="slicer_tips" search_label="Slicer-Tipps durchsuchen" placeholder="Titel oder Tipptext" %}
|
|
{% 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>{% if search %}Keine passenden Slicer-Tipps{% else %}Es wurden noch keine Slicer-Tipps geteilt.{% endif %}</h2></div>
|
|
</section>
|
|
{% endfor %}
|
|
{% endblock %}
|