mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
115b2fbc7c
* list_display_links in admin.py changed to list * Followup view threw errors with attachments. Fixed.
35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
from django.contrib import admin
|
|
from helpdesk.models import Queue, Ticket, FollowUp, PreSetReply, KBCategory
|
|
from helpdesk.models import EscalationExclusion, EmailTemplate, KBItem
|
|
from helpdesk.models import TicketChange, Attachment
|
|
|
|
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', )
|
|
|
|
class TicketChangeInline(admin.StackedInline):
|
|
model = TicketChange
|
|
|
|
class AttachmentInline(admin.StackedInline):
|
|
model = Attachment
|
|
|
|
class FollowUpAdmin(admin.ModelAdmin):
|
|
inlines = [TicketChangeInline, AttachmentInline]
|
|
|
|
class KBItemAdmin(admin.ModelAdmin):
|
|
list_display = ('category', 'title', 'last_updated',)
|
|
list_display_links = ('title',)
|
|
|
|
admin.site.register(Ticket, TicketAdmin)
|
|
admin.site.register(Queue, QueueAdmin)
|
|
admin.site.register(FollowUp, FollowUpAdmin)
|
|
admin.site.register(PreSetReply)
|
|
admin.site.register(EscalationExclusion)
|
|
admin.site.register(EmailTemplate)
|
|
admin.site.register(KBCategory)
|
|
admin.site.register(KBItem, KBItemAdmin)
|