* 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:
Ross Poulton
2008-10-24 22:52:34 +00:00
parent 5914e98d43
commit c97a255155
15 changed files with 273 additions and 24 deletions

10
lib.py
View File

@ -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