diff --git a/forms.py b/forms.py index 1a5d6601..a74f267a 100644 --- a/forms.py +++ b/forms.py @@ -47,6 +47,11 @@ class TicketForm(forms.Form): assigned_to = forms.ChoiceField(choices=(), required=False, label=u'Case owner') + + priority = forms.ChoiceField(choices=Ticket.PRIORITY_CHOICES, + required=False, + initial='3', + label=u'Priority') def save(self, user): """ @@ -60,6 +65,7 @@ class TicketForm(forms.Form): status = Ticket.OPEN_STATUS, queue = q, description = self.cleaned_data['body'], + priority = self.cleaned_data['priority'], ) if self.cleaned_data['assigned_to']: try: diff --git a/htdocs/helpdesk.css b/htdocs/helpdesk.css index 6d32c0bb..09c2cd8c 100644 --- a/htdocs/helpdesk.css +++ b/htdocs/helpdesk.css @@ -141,3 +141,28 @@ a.ticket_link_status { color: #369; font: 12pt Garamond; } + +.priority1 { + background-color: #fcc; +} + +.priority2 { + background-color: #FFE5CE; +} + +.priority3 { + background-color: #CEE0FF; +} + +.priority4 { + background-color: #CEF5FF; +} + +.prority5 { + background-color: #CEE0FF; +} + +.priority1, .priority2, .priority3, .priority4, .priority5 { + color: #6C79A0; + border-bottom: solid #d5e7fd 1px; +} diff --git a/templates/helpdesk/create_ticket.html b/templates/helpdesk/create_ticket.html index 3ea1c4aa..277acba1 100644 --- a/templates/helpdesk/create_ticket.html +++ b/templates/helpdesk/create_ticket.html @@ -31,6 +31,11 @@
{{ form.assigned_to }}
{% if form.assigned_to.errors %}
{{ form.assigned_to.errors }}
{% endif %} + +
+
{{ form.priority }}
+ {% if form.priority.errors %} +
{{ form.priority.errors }}
{% endif %}
diff --git a/templates/helpdesk/dashboard.html b/templates/helpdesk/dashboard.html index 43787db7..2ed6e405 100644 --- a/templates/helpdesk/dashboard.html +++ b/templates/helpdesk/dashboard.html @@ -19,11 +19,12 @@ $(document).ready(function() { - - + + {% for ticket in user_tickets %} - + + @@ -33,11 +34,12 @@ $(document).ready(function() {
Your Tickets
#TitleQueueStatusLast Update
Your Tickets
#PrTitleQueueStatusLast Update
{{ ticket.ticket }}{{ ticket.ticket }}{{ ticket.priority }} {{ ticket.title }} {{ ticket.queue }} {{ ticket.get_status_display }}
- - + + {% for ticket in unassigned_tickets %} - + + diff --git a/templates/helpdesk/ticket_list.html b/templates/helpdesk/ticket_list.html index 33c5a356..b1fca976 100644 --- a/templates/helpdesk/ticket_list.html +++ b/templates/helpdesk/ticket_list.html @@ -15,6 +15,7 @@ $(document).ready(function() { + @@ -30,11 +31,12 @@ $(document).ready(function() {
Unassigned Tickets
#TitleQueueCreated 
Unassigned Tickets
#PrTitleQueueCreated 
{{ ticket.ticket }}{{ ticket.ticket }}{{ ticket.priority }} {{ ticket.title }} {{ ticket.queue }} {{ ticket.created|timesince }} ago
- - + + {% if tickets %}{% for ticket in tickets %} - + + diff --git a/views.py b/views.py index 0287c9a0..8c6d2f58 100644 --- a/views.py +++ b/views.py @@ -198,7 +198,7 @@ def ticket_list(request): ### SORTING sort = request.GET.get('sort', None) - if sort not in ('status', 'assigned_to', 'created', 'title', 'queue'): + if sort not in ('status', 'assigned_to', 'created', 'title', 'queue', 'priority'): sort = 'created' tickets = tickets.order_by(sort) context = dict(context, sort=sort)
Tickets
#TitleQueueStatusCreatedOwner
Tickets
#PrTitleQueueStatusCreatedOwner
{{ ticket.id }}{{ ticket.ticket }}{{ ticket.priority }} {{ ticket.title }} {{ ticket.queue }} {{ ticket.get_status_display }}