fix: code reformatted

This commit is contained in:
2025-05-05 18:59:00 +02:00
parent afa44011d0
commit 07ea49a035
13 changed files with 139 additions and 93 deletions

View File

@@ -1,16 +1,16 @@
{% block content %}
{% if messages %}
<div style="max-width: 600px; margin: 1rem auto;">
<div style="max-width: 600px; margin: 1rem auto;">
{% for message in messages %}
<div style="padding: 1rem; border-radius: 5px; margin-bottom: 1rem;
<div style="padding: 1rem; border-radius: 5px; margin-bottom: 1rem;
background-color: {% if message.tags == 'error' %}#f8d7da
{% elif message.tags == 'success' %}#d4edda
{% else %}#fff3cd{% endif %};
color: #333;">
{{ message }}
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
<style>
.ticket-container {
@@ -133,21 +133,21 @@
</form>
{% endif %}
<div style="margin-top: 3rem;">
<h2>🕓 Bearbeitungshistorie</h2>
{% if ticket.history.exists %}
<ul style="list-style: none; padding: 0;">
{% for entry in ticket.history.all %}
<li style="margin-bottom: 1rem; background-color: #f9f9f9; border-left: 4px solid #ccc; padding: 0.5rem 1rem;">
<strong>{{ entry.changed_by.username }}</strong>
hat <code>{{ entry.field }}</code> geändert:<br>
<em>{{ entry.old_value }}</em><strong>{{ entry.new_value }}</strong><br>
<small>am {{ entry.changed_at|date:"d.m.Y H:i" }}</small>
</li>
{% endfor %}
</ul>
{% else %}
<p><em>Keine Änderungen bisher.</em></p>
{% endif %}
</div>
<h2>🕓 Bearbeitungshistorie</h2>
{% if ticket.history.exists %}
<ul style="list-style: none; padding: 0;">
{% for entry in ticket.history.all %}
<li style="margin-bottom: 1rem; background-color: #f9f9f9; border-left: 4px solid #ccc; padding: 0.5rem 1rem;">
<strong>{{ entry.changed_by.username }}</strong>
hat <code>{{ entry.field }}</code> geändert:<br>
<em>{{ entry.old_value }}</em><strong>{{ entry.new_value }}</strong><br>
<small>am {{ entry.changed_at|date:"d.m.Y H:i" }}</small>
</li>
{% endfor %}
</ul>
{% else %}
<p><em>Keine Änderungen bisher.</em></p>
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -1,5 +1,5 @@
{% block content %}
<style>
<style>
.form-container {
max-width: 600px;
margin: 2rem auto;
@@ -44,14 +44,26 @@
.form-container button:hover {
background-color: #0056b3;
}
</style>
</style>
<div class="form-container">
<h1>🎫 Neues Ticket erstellen</h1>
<div class="form-container">
<h1>
{% if object.pk %}
✏️ Ticket bearbeiten
{% else %}
🎫 Neues Ticket erstellen
{% endif %}
</h1>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Erstellen</button>
{% csrf_token %}
{{ form.as_p }}
<button type="submit">
{% if object.pk %}
Speichern
{% else %}
Erstellen
{% endif %}
</button>
</form>
</div>
</div>
{% endblock %}