mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-30 22:30:14 +02:00
* Enlarged Chart sizes to allow more data to be displayed
* Added superuser 'System settings' page with links to admin * Added ability to ignore e-mail addresses (using wildcards) from the e-mail parser * Added link to ignore email address from ticket details page (for superusers only) * Cleaned up report output by styling text & labels in the same way as tables in other views * Cleaned up dashboard lists to show text in place of tickets if no tickets are found * Added ability to sort in reverse order NOTE: REQUIRES A 'syncdb' TO CREATE THE EMAIL-IGNORE TABLES. No other DB changes were made.
This commit is contained in:
10
lib.py
10
lib.py
@ -165,8 +165,8 @@ def line_chart(data):
|
||||
max = field
|
||||
|
||||
|
||||
# Set width to '65px * number of months'.
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=lc&chs=%sx90&chd=t:' % (len(column_headings)*65)
|
||||
# Set width to '65px * number of months + 100 for headings.'.
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=lc&chs=%sx150&chd=t:' % (len(column_headings)*65+100)
|
||||
first_row = True
|
||||
row_headings = []
|
||||
for row in data[1:]:
|
||||
@ -210,8 +210,8 @@ def bar_chart(data):
|
||||
max = field
|
||||
|
||||
|
||||
# Set width to '150px * number of months'.
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=bvg&chs=%sx90&chd=t:' % (len(column_headings) * 150)
|
||||
# Set width to '220px * number of months'.
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=bvg&chs=%sx150&chd=t:' % (len(column_headings) * 220)
|
||||
first_row = True
|
||||
row_headings = []
|
||||
for row in data[1:]:
|
||||
@ -276,6 +276,8 @@ def apply_query(queryset, params):
|
||||
queryset = queryset.filter(params['other_filter'])
|
||||
|
||||
if params.get('sorting', None):
|
||||
if params.get('sortreverse', None):
|
||||
params['sorting'] = "-%s" % params['sorting']
|
||||
queryset = queryset.order_by(params['sorting'])
|
||||
|
||||
return queryset
|
||||
|
Reference in New Issue
Block a user