feat: AssignedTicketListView removed, not needed anymore
This commit is contained in:
@@ -1,69 +0,0 @@
|
|||||||
{% extends "ticketsystem/base.html" %}
|
|
||||||
{% block content %}
|
|
||||||
<style>
|
|
||||||
.ticket-list-container {
|
|
||||||
max-width: 700px;
|
|
||||||
margin: 2rem auto;
|
|
||||||
padding: 2rem;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 8px;
|
|
||||||
background-color: #fafafa;
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ticket-list-container h1 {
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
font-size: 1.8rem;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ticket-item {
|
|
||||||
padding: 1rem;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ticket-item:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ticket-item a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #007bff;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ticket-item a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ticket-meta {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
color: #666;
|
|
||||||
margin-top: 0.3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="ticket-list-container">
|
|
||||||
<h1>🧾 Meine zugewiesenen Tickets</h1>
|
|
||||||
<p style="color: #777; font-size: 0.9rem; margin-top: -0.5rem; margin-bottom: 1.5rem;">
|
|
||||||
Hinweis: Bereits geschlossene Tickets werden hier nicht aufgelistet.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% for ticket in tickets %}
|
|
||||||
<div class="ticket-item">
|
|
||||||
<a href="{% url 'detail' ticket.pk %}">
|
|
||||||
#{{ ticket.id }} – {{ ticket.title }}
|
|
||||||
</a>
|
|
||||||
<div class="ticket-meta">
|
|
||||||
Status: {{ ticket.get_status_display }} |
|
|
||||||
Priorität: {{ ticket.get_priority_display }} |
|
|
||||||
Angelegt am {{ ticket.created_at|date:"d.m.Y H:i" }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% empty %}
|
|
||||||
<p>Es sind derzeit keine Tickets vorhanden.</p>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -14,8 +14,6 @@
|
|||||||
<div class="flex space-x-4">
|
<div class="flex space-x-4">
|
||||||
<a href="{% url 'home' %}" class="text-white hover:text-gray-300">🏠 Start</a>
|
<a href="{% url 'home' %}" class="text-white hover:text-gray-300">🏠 Start</a>
|
||||||
<a href="{% url 'ticket-list' %}" class="text-white hover:text-gray-300">📋 Tickets</a>
|
<a href="{% url 'ticket-list' %}" class="text-white hover:text-gray-300">📋 Tickets</a>
|
||||||
<a href="{% url 'assigned-tickets' %}"
|
|
||||||
class="text-white hover:text-gray-300">🧾 Meine Tickets</a>
|
|
||||||
<a href="{% url 'faq-list' %}" class="text-white hover:text-gray-300">❓ FAQ</a>
|
<a href="{% url 'faq-list' %}" class="text-white hover:text-gray-300">❓ FAQ</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center space-x-4">
|
<div class="flex items-center space-x-4">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from .views import (AssignedTicketListView, HomeView, TicketCreateView,
|
from .views import (HomeView, TicketCreateView,
|
||||||
TicketDetailUpdateView, TicketListView, TicketUpdateView,
|
TicketDetailUpdateView, TicketListView, TicketUpdateView,
|
||||||
faq_list, faq_pdf_download)
|
faq_list, faq_pdf_download)
|
||||||
|
|
||||||
@@ -14,7 +14,6 @@ urlpatterns = [
|
|||||||
# /ticketsystem/new/
|
# /ticketsystem/new/
|
||||||
path("new/", TicketCreateView.as_view(), name="create"),
|
path("new/", TicketCreateView.as_view(), name="create"),
|
||||||
path("<int:pk>/modify/", TicketUpdateView.as_view(), name="modify"),
|
path("<int:pk>/modify/", TicketUpdateView.as_view(), name="modify"),
|
||||||
path("meine-tickets/", AssignedTicketListView.as_view(), name="assigned-tickets"),
|
|
||||||
path("faq/", faq_list, name="faq-list"),
|
path("faq/", faq_list, name="faq-list"),
|
||||||
path("faq/download/", faq_pdf_download, name="faq-pdf-download"),
|
path("faq/download/", faq_pdf_download, name="faq-pdf-download"),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -233,18 +233,6 @@ class TicketDetailUpdateView(UpdateView):
|
|||||||
return super().post(request, *args, **kwargs)
|
return super().post(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class AssignedTicketListView(LoginRequiredMixin, ListView):
|
|
||||||
model = Ticket
|
|
||||||
template_name = "ticketsystem/assigned_tickets.html"
|
|
||||||
context_object_name = "tickets"
|
|
||||||
ordering = ["-created_at"]
|
|
||||||
|
|
||||||
def get_queryset(self):
|
|
||||||
return Ticket.objects.filter(assigned_to=self.request.user).exclude(
|
|
||||||
status="closed"
|
|
||||||
) # oder "geschlossen", je nach Wahl
|
|
||||||
|
|
||||||
|
|
||||||
class TicketCreateView(CreateView):
|
class TicketCreateView(CreateView):
|
||||||
model = Ticket
|
model = Ticket
|
||||||
form_class = TicketForm
|
form_class = TicketForm
|
||||||
|
|||||||
Reference in New Issue
Block a user