2008-08-12 01:24:18 +02:00
|
|
|
from django.contrib import admin
|
|
|
|
from helpdesk.models import Queue, Ticket, FollowUp, PreSetReply, KBCategory
|
|
|
|
from helpdesk.models import EscalationExclusion, EmailTemplate, KBItem
|
2008-08-13 23:42:57 +02:00
|
|
|
from helpdesk.models import TicketChange, Attachment
|
2008-08-12 01:24:18 +02:00
|
|
|
|
|
|
|
class QueueAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('title', 'slug', 'email_address')
|
|
|
|
|
|
|
|
class TicketAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('title', 'status', 'assigned_to', 'submitter_email',)
|
|
|
|
date_hierarchy = 'created'
|
|
|
|
list_filter = ('assigned_to', 'status', )
|
|
|
|
|
2008-08-13 23:42:57 +02:00
|
|
|
class TicketChangeInline(admin.StackedInline):
|
|
|
|
model = TicketChange
|
|
|
|
|
|
|
|
class AttachmentInline(admin.StackedInline):
|
|
|
|
model = Attachment
|
|
|
|
|
|
|
|
class FollowUpAdmin(admin.ModelAdmin):
|
|
|
|
inlines = [TicketChangeInline, AttachmentInline]
|
2008-08-12 01:24:18 +02:00
|
|
|
|
2008-10-07 08:52:52 +02:00
|
|
|
class KBItemAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('category', 'title', 'last_updated',)
|
|
|
|
list_display_links = ('title')
|
|
|
|
|
2008-08-12 01:24:18 +02:00
|
|
|
admin.site.register(Ticket, TicketAdmin)
|
|
|
|
admin.site.register(Queue, QueueAdmin)
|
2008-08-13 23:42:57 +02:00
|
|
|
admin.site.register(FollowUp, FollowUpAdmin)
|
|
|
|
admin.site.register(PreSetReply)
|
|
|
|
admin.site.register(EscalationExclusion)
|
|
|
|
admin.site.register(EmailTemplate)
|
|
|
|
admin.site.register(KBCategory)
|
2008-10-07 08:52:52 +02:00
|
|
|
admin.site.register(KBItem, KBItemAdmin)
|