Ticketarten als Knöpfe oder Auswahlliste mit eigenen Kategorien (erstellt/beansprucht/ geschlossen), Kategorien automatisch anlegen, offene Tickets und Transkripte im Panel, Aufbewahrungsdauer der Transkripte. Reaktionsrollen: Verifizieren per Reaktion lässt sich durch Entfernen der Reaktion rückgängig machen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
115 lines
5.4 KiB
HTML
115 lines
5.4 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Tickets{% endblock %}
|
||
{% block content %}
|
||
<div class="page-head">
|
||
<h1>Tickets</h1>
|
||
<p class="muted">Mitglieder öffnen über ein Panel ein Ticket – Siel legt dafür einen eigenen Kanal an, den nur sie und die Ticketmanager sehen.</p>
|
||
</div>
|
||
{% if error %}<div class="flash flash-error">{{ error }}</div>{% endif %}
|
||
|
||
<section class="panel">
|
||
<div class="panel-head">
|
||
<h2>Deine Ticket-Panels</h2>
|
||
<div class="head-actions">
|
||
<span class="muted">{{ data.panels | length }} / 10</span>
|
||
<a href="/tickets/neu" class="btn btn-sm">+ Panel erstellen</a>
|
||
</div>
|
||
</div>
|
||
{% if data.panels %}
|
||
<div class="rr-list">
|
||
{% for p in data.panels %}
|
||
<div class="rr-row">
|
||
<div class="rr-main">
|
||
<a href="/tickets/{{ p.id }}" class="rr-name">{{ p.name }}</a>
|
||
<div class="muted small"># {{ p.channel_name }} · {{ styles[p.style] }} · {{ p.types | selectattr("enabled") | list | length }} Ticketarten</div>
|
||
<div class="rr-emojis">{% for t in p.types if t.enabled %}<span class="chip">{{ t.emoji }} {{ t.label }}</span>{% endfor %}</div>
|
||
</div>
|
||
<div class="rr-status">
|
||
{% if p.status == "published" %}<span class="tag tag-green">Veröffentlicht</span>
|
||
{% elif p.status == "changed" %}<span class="tag tag-gold" title="Gespeicherte Änderungen sind noch nicht im Discord">Geändert</span>
|
||
{% else %}<span class="tag">Entwurf</span>{% endif %}
|
||
<div class="muted small">{{ (p.published_at or p.updated_at) | datetime }}</div>
|
||
</div>
|
||
<div class="rr-actions">
|
||
<a href="/tickets/{{ p.id }}" class="btn btn-sm btn-secondary">Bearbeiten</a>
|
||
{% if p.status != "published" %}
|
||
<form method="post" action="/tickets/{{ p.id }}/veroeffentlichen">
|
||
<input type="hidden" name="csrf" value="{{ csrf }}">
|
||
<button type="submit" class="btn btn-sm">Veröffentlichen</button>
|
||
</form>
|
||
{% endif %}
|
||
<form method="post" action="/tickets/{{ p.id }}/loeschen" data-confirm="Panel „{{ p.name }}“ löschen? Die Panel-Nachricht verschwindet aus dem Discord, offene Ticketkanäle bleiben.">
|
||
<input type="hidden" name="csrf" value="{{ csrf }}">
|
||
<button type="submit" class="btn btn-sm btn-danger">Löschen</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
{% else %}
|
||
<p class="muted">Noch kein Panel. <a href="/tickets/neu">Erstell das erste</a> – die Vorlage übernimmt die Einrichtung vom Legionsserver (Bewerbung, Diplomatie, Sonstiges).</p>
|
||
{% endif %}
|
||
</section>
|
||
|
||
<section class="panel">
|
||
<h2>Offene Tickets <span class="muted">({{ data.open | length }})</span></h2>
|
||
{% if data.open %}
|
||
<div class="table-wrap">
|
||
<table class="table">
|
||
<thead><tr><th>#</th><th>Art</th><th>Von</th><th>Beansprucht</th><th>Seit</th><th></th></tr></thead>
|
||
<tbody>
|
||
{% for t in data.open %}
|
||
<tr>
|
||
<td class="nowrap">{{ "%04d" | format(t.number) }}</td>
|
||
<td>{{ t.type_label }}</td>
|
||
<td>{{ t.user_name }}</td>
|
||
<td>{{ t.claimed_name or "–" }}</td>
|
||
<td class="small nowrap">{{ t.created_at | datetime }}</td>
|
||
<td>{% if guild and t.channel_id %}<a href="https://discord.com/channels/{{ guild.id }}/{{ t.channel_id }}" target="_blank" rel="noopener">Im Discord öffnen</a>{% endif %}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{% else %}
|
||
<p class="muted">Gerade ist kein Ticket offen.</p>
|
||
{% endif %}
|
||
</section>
|
||
|
||
<section class="panel" id="transkripte">
|
||
<div class="panel-head">
|
||
<h2>Transkripte</h2>
|
||
<form method="post" action="/tickets/aufbewahrung" class="inline-form">
|
||
<input type="hidden" name="csrf" value="{{ csrf }}">
|
||
<label class="small muted">Aufbewahren für
|
||
<input type="number" name="days" min="7" max="730" value="{{ data.transcript_days }}" class="input-sm"> Tage
|
||
</label>
|
||
<button type="submit" class="btn btn-sm btn-secondary">Speichern</button>
|
||
</form>
|
||
</div>
|
||
<p class="muted small">Beim Schließen speichert Siel den Verlauf des Tickets. Ältere Transkripte löscht er automatisch.</p>
|
||
{% if data.transcripts %}
|
||
<div class="table-wrap">
|
||
<table class="table">
|
||
<thead><tr><th>#</th><th>Art</th><th>Von</th><th>Beansprucht</th><th>Geschlossen</th><th>Nachr.</th><th></th></tr></thead>
|
||
<tbody>
|
||
{% for t in data.transcripts %}
|
||
<tr>
|
||
<td class="nowrap">{{ "%04d" | format(t.number) }}</td>
|
||
<td>{{ t.type_label }}</td>
|
||
<td>{{ t.user_name }}</td>
|
||
<td>{{ t.claimed_name or "–" }}</td>
|
||
<td class="small nowrap">{{ t.closed_at | datetime }}{% if t.closed_name %}<div class="muted">von {{ t.closed_name }}</div>{% endif %}</td>
|
||
<td>{{ t.message_count or 0 }}</td>
|
||
<td><a href="/tickets/transkript/{{ t.transcript }}" target="_blank" rel="noopener">Ansehen</a></td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{% else %}
|
||
<p class="muted">Noch keine Transkripte.</p>
|
||
{% endif %}
|
||
</section>
|
||
<script src="/static/js/confirm.js?v=1"></script>
|
||
{% endblock %}
|