Big checkin that adds a number of features and makes some changes:

* Updated jQuery to 1.2.6
* Add jQuery UI 1.6b for interface effects as needed
    * 'Smoothness' theme from ThemeRoller.com added.
* Clean up 'Filter' dialog on Ticket List, long way to go still.
    * Uses tabs to save a query or load a saved query
    * Lots of misuse of space here, can be cleaned up somewhat still.
* Add ability for users to save filters/queries
    * Saved queries can be shared, so other users can use them
    * Users can run saved queries instead of re-filtering
    * Filter mechanism in Ticket List had to be reworked significantly
* Merged 3rd party licenses into LICENSE.3RDPARTY
* Updated messages files for EN locale

To update, ensure you run './manage.py syncdb' to add the SavedSearch
table.
This commit is contained in:
Ross Poulton
2008-08-28 09:06:24 +00:00
parent 5f9b85fbbf
commit 0068eccbf4
61 changed files with 1593 additions and 234 deletions

View File

@ -817,3 +817,41 @@ class KBItem(models.Model):
return ('helpdesk_kb_item', [str(self.id)])
get_absolute_url = models.permalink(get_absolute_url)
class SavedSearch(models.Model):
"""
Allow a user to save a ticket search, eg their filtering and sorting
options, and optionally share it with other users. This lets people
easily create a set of commonly-used filters, such as:
* My tickets waiting on me
* My tickets waiting on submitter
* My tickets in 'Priority Support' queue with priority of 1
* All tickets containing the word 'billing'.
etc...
"""
user = models.ForeignKey(User)
title = models.CharField(
_('Query Name'),
max_length=100,
help_text=_('User-provided name for this query'),
)
shared = models.BooleanField(
_('Shared With Other Users?'),
default=False,
blank=True,
null=True,
help_text=_('Should other users see this query?'),
)
query = models.TextField(
_('Search Query'),
help_text=_('Pickled query object. Be wary changing this.'),
)
def __unicode__(self):
if self.shared:
return u'%s (*)' % self.title
else:
return u'%s' % self.title