Files
korrekturmanagementsystem/ticketsystem/templates/ticketsystem/detail.html

123 lines
2.9 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.

{% block content %}
<style>
.ticket-container {
max-width: 700px;
margin: 2rem auto;
padding: 2rem;
border: 1px solid #ddd;
border-radius: 8px;
background-color: #fafafa;
font-family: sans-serif;
}
.ticket-container h1 {
margin-bottom: 1rem;
font-size: 1.8rem;
color: #333;
}
.ticket-attribute {
margin-bottom: 1rem;
}
.ticket-attribute strong {
display: inline-block;
width: 150px;
color: #555;
}
.ticket-meta {
margin-top: 2rem;
font-size: 0.9rem;
color: #666;
}
.comment {
margin: 1rem 0;
padding: 1rem;
border-left: 4px solid #007bff;
background: #f0f4ff;
border-radius: 4px;
}
.comment-form textarea {
width: 100%;
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #ccc;
}
.comment-form button {
margin-top: 0.5rem;
background: #007bff;
color: white;
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
}
</style>
<div class="ticket-container">
<h1>🎫 Ticket #{{ ticket.id }} {{ ticket.title }}</h1>
<p style="text-align: right;">
<a href="{% url 'modify' ticket.pk %}" style="text-decoration: none; font-weight: bold;">✏️ Dieses Ticket
bearbeiten</a>
</p>
<div class="ticket-attribute">
<strong>Status:</strong> {{ ticket.get_status_display }}
</div>
<div class="ticket-attribute">
<strong>Priorität:</strong> {{ ticket.get_priority_display }}
</div>
<div class="ticket-attribute">
<strong>Beschreibung:</strong><br>
<div style="margin-top: 0.5rem;">{{ ticket.description }}</div>
</div>
<div class="ticket-attribute">
<strong>Erstellt von:</strong> {{ ticket.created_by.username }}
</div>
<div class="ticket-attribute">
<strong>Zugewiesen an:</strong>
{% if ticket.assigned_to %}
{{ ticket.assigned_to.username }}
{% else %}
<em>Niemand zugewiesen</em>
{% endif %}
</div>
<div class="ticket-meta">
🕒 Erstellt am: {{ ticket.created_at|date:"d.m.Y H:i" }}<br>
🔄 Aktualisiert: {{ ticket.updated_at|date:"d.m.Y H:i" }}
</div>
</div>
<div class="ticket-container" style="margin-top: 2rem;">
<h2>💬 Kommentare</h2>
{% if ticket.comments.exists %}
{% for comment in ticket.comments.all %}
<div class="comment">
<p><strong>{{ comment.author.username }}</strong> am {{ comment.created_at|date:"d.m.Y H:i" }}</p>
<p>{{ comment.text }}</p>
</div>
{% endfor %}
{% else %}
<p>Keine Kommentare vorhanden.</p>
{% endif %}
{% if user.is_authenticated %}
<h3>📝 Neuen Kommentar schreiben</h3>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Absenden</button>
</form>
{% endif %}
</div>
{% endblock %}