mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-09 00:04:50 +02:00
Initial general clean-up of stuff
This commit is contained in:
@ -5,10 +5,14 @@ from helpdesk.models import EscalationExclusion, EmailTemplate, KBItem
|
||||
from helpdesk.models import TicketChange, Attachment, IgnoreEmail
|
||||
from helpdesk.models import CustomField
|
||||
|
||||
|
||||
@admin.register(Queue)
|
||||
class QueueAdmin(admin.ModelAdmin):
|
||||
list_display = ('title', 'slug', 'email_address', 'locale')
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
|
||||
|
||||
@admin.register(Ticket)
|
||||
class TicketAdmin(admin.ModelAdmin):
|
||||
list_display = ('title', 'status', 'assigned_to', 'queue', 'hidden_submitter_email',)
|
||||
date_hierarchy = 'created'
|
||||
@ -24,34 +28,38 @@ class TicketAdmin(admin.ModelAdmin):
|
||||
return ticket.submitter_email
|
||||
hidden_submitter_email.short_description = _('Submitter E-Mail')
|
||||
|
||||
|
||||
class TicketChangeInline(admin.StackedInline):
|
||||
model = TicketChange
|
||||
|
||||
|
||||
class AttachmentInline(admin.StackedInline):
|
||||
model = Attachment
|
||||
|
||||
|
||||
@admin.register(FollowUp)
|
||||
class FollowUpAdmin(admin.ModelAdmin):
|
||||
inlines = [TicketChangeInline, AttachmentInline]
|
||||
|
||||
|
||||
@admin.register(KBItem)
|
||||
class KBItemAdmin(admin.ModelAdmin):
|
||||
list_display = ('category', 'title', 'last_updated',)
|
||||
list_display_links = ('title',)
|
||||
|
||||
|
||||
@admin.register(CustomField)
|
||||
class CustomFieldAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'label', 'data_type')
|
||||
|
||||
|
||||
@admin.register(EmailTemplate)
|
||||
class EmailTemplateAdmin(admin.ModelAdmin):
|
||||
list_display = ('template_name', 'heading', 'locale')
|
||||
list_filter = ('locale', )
|
||||
|
||||
|
||||
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, EmailTemplateAdmin)
|
||||
admin.site.register(KBCategory)
|
||||
admin.site.register(KBItem, KBItemAdmin)
|
||||
admin.site.register(IgnoreEmail)
|
||||
admin.site.register(CustomField, CustomFieldAdmin)
|
||||
|
Reference in New Issue
Block a user