* Added priority icons for list views

* Added nice buttons for Accept/Edit/Take/etc with template
This commit is contained in:
Ross Poulton 2008-01-12 05:37:45 +00:00
parent ccb5b9fd97
commit d829b1aaf6
17 changed files with 29 additions and 10 deletions

BIN
htdocs/buttons/accept.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

View File

@ -0,0 +1,5 @@
* Use this template to create new buttons
* Typeface: Delicious, Roman, 12pt, Sharp Anti-Aliasing
http://www.josbuivenga.demon.nl/delicious.html
* Icons: Diagona (10px versions)
http://www.pinvoke.com/ - I purchased these before they were creative-commons, I believe this gives me rights to use them without attribution.

BIN
htdocs/buttons/delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
htdocs/buttons/edit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
htdocs/buttons/take.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -166,3 +166,8 @@ a.ticket_link_status {
color: #6C79A0;
border-bottom: solid #d5e7fd 1px;
}
a img {
border: none;
padding: 2px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,4 @@
* Typeface: Delicious, Roman, 14pt, Sharp Anti-Aliasing
http://www.josbuivenga.demon.nl/delicious.html
* Icons: Diagona (16px versions)
http://www.pinvoke.com/ - I purchased these before they were creative-commons, I believe this gives me rights to use them without attribution.

View File

@ -140,6 +140,11 @@ class Ticket(models.Model):
return "[%s-%s]" % (self.queue.slug, self.id)
ticket = property(_get_ticket)
def _get_priority_img(self):
from django.conf import settings
return "%s/helpdesk/priorities/priority%s.png" % (settings.MEDIA_URL, self.priority)
get_priority_img = property(_get_priority_img)
class Admin:
list_display = ('title', 'status', 'assigned_to',)
date_hierarchy = 'created'

View File

@ -23,8 +23,8 @@ $(document).ready(function() {
<tr class='row_columnheads'><th>#</th><th>Pr</th><th>Title</th><th>Queue</th><th>Status</th><th>Last Update</th></tr>
{% for ticket in user_tickets %}
<tr class='row_{% cycle odd,even %} row_hover'>
<th class='priority{{ ticket.priority }}'><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></th>
<td class='priority{{ ticket.priority }}'>{{ ticket.priority }}</td>
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></th>
<td><img src='{{ ticket.get_priority_img }}' alt='Priority {{ ticket.priority }}' title='Priority {{ ticket.priority }}' height='16' width='16' /></td>
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
<td>{{ ticket.queue }}</td>
<td>{{ ticket.get_status_display }}</td>
@ -38,12 +38,12 @@ $(document).ready(function() {
<tr class='row_columnheads'><th>#</th><th>Pr</th><th>Title</th><th>Queue</th><th>Created</th><th>&nbsp;</th></tr>
{% for ticket in unassigned_tickets %}
<tr class='row_{% cycle odd,even %} row_hover'>
<th class='priority{{ ticket.priority }}'><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></th>
<td class='priority{{ ticket.priority }}'>{{ ticket.priority }}</td>
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></th>
<td><img src='{{ ticket.get_priority_img }}' alt='Priority {{ ticket.priority }}' title='Priority {{ ticket.priority }}' height='16' width='16' /></td>
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
<td>{{ ticket.queue }}</td>
<td><span title='{{ ticket.created|date:"r" }}'>{{ ticket.created|timesince }} ago</span></td>
<th><a href='{{ ticket.get_absolute_url }}?take'>Take</a></th>
<th><a href='{{ ticket.get_absolute_url }}?take'><img src='{{ MEDIA_URL }}/helpdesk/buttons/take.png' width='60' height='15' alt='Take' title='Assign this ticket to yourself' /></a></th>
</tr>
{% endfor %}
</table>

View File

@ -25,7 +25,7 @@
{% block helpdesk_body %}
<table width='100%'>
<tr class='row_tablehead'><td colspan='2'>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status_display }}]</td>
<tr class='row_tablehead'><td>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status_display }}]</td><td align='right'><a href='#edit'><img src='{{ MEDIA_URL }}/helpdesk/buttons/edit.png' alt='Edit' title='Edit' width='60' height='15' /></a><a href='?delete'><img src='{{ MEDIA_URL }}/helpdesk/buttons/delete.png' alt='Delete' title='Delete' width='60' height='15' /></a></td></tr>
<tr class='row_columnheads'><td colspan='2'>Queue: {{ ticket.queue }}</td></tr>
<tr class='row_odd'>
@ -35,7 +35,7 @@
<tr class='row_even'>
<th>Assigned To</th>
<td>{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to 'Unassigned' %} <strong><a href='?take'>Take</a></strong>{% endifequal %}</td>
<td>{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to 'Unassigned' %} <strong><a href='?take'><img src='{{ MEDIA_URL }}/helpdesk/buttons/take.png' width='60' height='15' alt='Take' title='Assign this ticket to yourself' /></a></strong>{% endifequal %}</td>
</tr>
<tr class='row_odd'>
@ -56,7 +56,7 @@
</tr>
{% if ticket.resolution %}<tr class='row_odd'>
<th colspan='2'>Resolution{% ifequal ticket.get_status_display "Resolved" %} [<a href='?close'>Accept &amp; Close</a>]{% endifequal %}</th>
<th colspan='2'>Resolution{% ifequal ticket.get_status_display "Resolved" %} <a href='?close'><img src='{{ MEDIA_URL }}/helpdesk/buttons/accept.png' alt='Accept' title='Accept and Close' width='60' height='15' /></a>{% endifequal %}</th>
</tr>
<tr class='row_even'>
<td colspan='2'>{{ ticket.resolution }}</td>

View File

@ -35,8 +35,8 @@ $(document).ready(function() {
<tr class='row_columnheads'><th>#</th><th>Pr</th><th>Title</th><th>Queue</th><th>Status</th><th>Created</th><th>Owner</th></tr>
{% if tickets %}{% for ticket in tickets %}
<tr class='row_{% cycle odd,even %} row_hover'>
<th class='priority{{ ticket.priority }}'><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></th>
<td class='priority{{ ticket.priority }}'>{{ ticket.priority }}</td>
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></th>
<td><img src='{{ ticket.get_priority_img }}' alt='Priority {{ ticket.priority }}' title='Priority {{ ticket.priority }}' height='16' width='16' /></td>
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
<td>{{ ticket.queue }}</td>
<td>{{ ticket.get_status_display }}</td>